CN115357237A - Page generation method and device, computer equipment and storage medium - Google Patents

Page generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115357237A
CN115357237A CN202211039204.7A CN202211039204A CN115357237A CN 115357237 A CN115357237 A CN 115357237A CN 202211039204 A CN202211039204 A CN 202211039204A CN 115357237 A CN115357237 A CN 115357237A
Authority
CN
China
Prior art keywords
page
page display
target file
display element
primitive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211039204.7A
Other languages
Chinese (zh)
Inventor
徐康
许华平
邱荣发
孙一民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Dianyan Electric Power Automation Co ltd
Original Assignee
Nanjing Dianyan Electric Power Automation 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 Nanjing Dianyan Electric Power Automation Co ltd filed Critical Nanjing Dianyan Electric Power Automation Co ltd
Priority to CN202211039204.7A priority Critical patent/CN115357237A/en
Publication of CN115357237A publication Critical patent/CN115357237A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The application relates to a page generation method, a page generation device, a computer device, a storage medium and a computer program product. The method comprises the following steps: responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram, and obtaining a vector diagram file; analyzing the vector diagram file to obtain configuration parameters of display elements of each page in the vector diagram; generating a first target file based on the configuration parameters, wherein the first target file comprises element identification and positioning information of each page display element; creating a second target file corresponding to the first target file, wherein the second target file comprises an element processing interface of each page display element; based on the respective element identification of each page display element, calling the element processing interface of the corresponding type in the second target file respectively to draw the page display element; and generating the page based on the respective positioning information of each page display element. By adopting the method, the page generation efficiency can be improved.

Description

Page generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of web page development technologies, and in particular, to a method and an apparatus for generating a page, a computer device, a storage medium, and a computer program product.
Background
With the development of computer technology, transformer substation monitoring systems have appeared, which can be applied to monitoring transformer substations. A B/S (Browser/Server) framework WEB (World Wide Web) interface is mostly used in the transformer substation monitoring system, and the WEB interface has various display modes and supports remote access.
In the conventional technology, the WEB Interface development method is that a UI (User Interface) engineer is used to design the style and style of the WEB Interface, a front-end engineer is used to select a suitable front-end frame to develop the front-end Interface, and a rear-end engineer is used to develop the rear-end Interface and Interface the data of the front-end Interface to complete the development.
However, the WEB interface development method adopted in the conventional technology has a high development threshold, and is difficult to complete the demand conversion quickly, so that the problem of low page generation efficiency exists.
Disclosure of Invention
In view of the above, it is necessary to provide a page generation method apparatus, a computer device, a computer readable storage medium and a computer program product, which can improve page generation efficiency.
In a first aspect, the present application provides a page generation method. The method comprises the following steps:
responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram, and obtaining a vector diagram file;
analyzing the vector diagram file to obtain configuration parameters of display elements of each page in the vector diagram;
generating a first target file based on the configuration parameters, wherein the first target file comprises element identification and positioning information of each page display element;
creating a second target file corresponding to the first target file, wherein the second target file comprises an element processing interface of each page display element;
based on the respective element identification of each page display element, calling the element processing interface of the corresponding type in the second target file respectively to draw the page display element;
and generating a page based on the respective positioning information of each page display element, wherein the page comprises the drawn page display elements.
In one embodiment, in response to a selection operation on the preconfigured editable primitive, obtaining a page drawing result includes:
responding to the selection operation of the pre-configured editable graphic elements, and determining the selected graphic elements;
responding to the editing operation of the selected primitive, and obtaining the primitive parameter of the selected primitive;
and obtaining a page drawing result based on the primitive parameters of the selected primitive.
In one embodiment, parsing the vector diagram file to obtain the configuration parameters of each page display element in the vector diagram further includes:
adding an element processing interface corresponding to each page display element to an analysis tool in a plug-in mode;
analyzing the vector diagram file to obtain the configuration parameters of each page display element in the vector diagram comprises the following steps:
determining information to be analyzed corresponding to each page display element through an analysis tool based on an element processing interface, analyzing the vector diagram file according to the information to be analyzed corresponding to each page display element, and obtaining configuration parameters of each page display element in the vector diagram.
In one embodiment, the element processing interface includes an element definition interface and an element rendering interface, and based on the respective element identifier of each page display element, respectively invoking the element processing interface of the corresponding type in the second target file to render the page display element includes:
respectively calling element drawing interfaces of corresponding types in the second target file based on respective element identifiers of each page display element;
calling the same type of element definition interfaces through the element drawing interfaces to obtain element drawing parameters, and drawing the page display elements based on the element drawing parameters.
In one embodiment, generating a first target file based on the configuration parameters, the first target file including respective element identification and positioning information of each page display element includes:
generating an element identifier of the page display element based on the element type in the configuration parameter, and generating positioning information of the page display element based on the coordinate parameter of the page display element in the configuration parameter;
and obtaining a first target file based on the element identification and the positioning information of each page display element.
In one embodiment, the second target file includes a preconfigured timing function, and after generating the page based on the respective positioning information of each page presentation element, the method further includes:
and based on a pre-configured timing function, refreshing the page at a fixed time to obtain a refreshed page.
In a second aspect, the present application provides a page generating apparatus. The device comprises:
the first processing module is used for responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram and obtaining a vector diagram file;
the second processing module is used for analyzing the vector diagram file to obtain the configuration parameters of each page display element in the vector diagram;
the first target file generation module is used for generating a first target file based on the configuration parameters, and the first target file comprises the element identification and the positioning information of each page display element;
the second target file creating module is used for creating a second target file corresponding to the first target file, and the second target file comprises an element processing interface of each page display element;
the element processing interface calling module is used for calling the element processing interfaces of the corresponding types in the second target file to draw the page display elements respectively based on the respective element identifiers of the page display elements;
and the page generation module is used for generating a page based on the respective positioning information of each page display element, and the page comprises the drawn page display elements.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram, and obtaining a vector diagram file;
analyzing the vector diagram file to obtain configuration parameters of display elements of each page in the vector diagram;
generating a first target file based on the configuration parameters, wherein the first target file comprises the respective element identification and the positioning information of each page display element;
creating a second target file corresponding to the first target file, wherein the second target file comprises an element processing interface of each page display element;
based on the respective element identification of each page display element, calling the element processing interface of the corresponding type in the second target file respectively to draw the page display element;
and generating a page based on the respective positioning information of each page display element, wherein the page comprises the drawn page display elements.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram, and obtaining a vector diagram file;
analyzing the vector diagram file to obtain configuration parameters of display elements of each page in the vector diagram;
generating a first target file based on the configuration parameters, wherein the first target file comprises the respective element identification and the positioning information of each page display element;
creating a second target file corresponding to the first target file, wherein the second target file comprises an element processing interface of each page display element;
based on the respective element identification of each page display element, calling the element processing interface of the corresponding type in the second target file respectively to draw the page display element;
and generating a page based on the respective positioning information of each page display element, wherein the page comprises the drawn page display elements.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram, and obtaining a vector diagram file;
analyzing the vector diagram file to obtain configuration parameters of display elements of each page in the vector diagram;
generating a first target file based on the configuration parameters, wherein the first target file comprises element identification and positioning information of each page display element;
creating a second target file corresponding to the first target file, wherein the second target file comprises an element processing interface of each page display element;
based on the respective element identification of each page display element, calling the element processing interface of the corresponding type in the second target file respectively to draw the page display element;
and generating a page based on the respective positioning information of each page display element, wherein the page comprises the drawn page display elements.
The page generation method, the page generation device, the computer equipment, the storage medium and the computer program product obtain a page drawing result by responding to the selection operation of the pre-configured editable primitive, derive the page drawing result into a vector diagram, obtain a vector diagram file, use the vector diagram as a carrier of the page drawing result, obtain the configuration parameters of each page display element in the vector diagram by analyzing the vector diagram file, generate a first target file comprising the respective element identification and the positioning information of each page display element based on the configuration parameters, create a second target file comprising the element processing interface of each page display element corresponding to the first target file, respectively call the element processing interface of the corresponding type in the second target file to draw the page display element based on the respective element identification of each page display element, generate a page comprising the drawn page display elements based on the respective positioning information of each page display element, and realize the rapid conversion of the page drawing result and improve the page generation efficiency.
Drawings
FIG. 1 is a schematic flow chart diagram of a page generation method in one embodiment;
FIG. 2 is a diagram of an instrument panel primitive in the primitive editor, according to an embodiment;
FIG. 3 is a diagram illustrating the results of rendering a page in the primitive rendering tool in one embodiment;
FIG. 4 is a schematic diagram of a process for generating an HTML file and a JS file, in one embodiment;
FIG. 5 is a flowchart showing the generation of an HTML file and a JS file in another embodiment;
FIG. 6 is a schematic diagram of a page generated in another embodiment;
FIG. 7 is a flowchart illustrating a page generation method according to another embodiment;
FIG. 8 is a schematic flowchart of an apparatus for page generation in one embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a page generation method is provided, and this embodiment is illustrated by applying the method to a terminal, it is to be understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
and 102, responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram, and obtaining a vector diagram file.
The preset editable primitive is an editable primitive preset in the primitive editor, the primitive editor is a tool used for drawing various types of primitives, and the preset editable primitive drawn in the primitive editor is stored in the primitive browser.
Specifically, the terminal responds to the selection operation of the pre-configured editable primitive, determines the selected primitive, adds the selected primitive to a primitive drawing tool from a primitive browser, carries out the editing operation on the selected primitive in the primitive drawing tool to obtain a page drawing result, derives the page drawing result as a vector diagram, and obtains a vector diagram file.
In a specific application, as shown in fig. 2, taking a primitive dashboard as an example, in a primitive editor, a terminal draws a primitive corresponding to an echart (data visualization chart library) dashboard to obtain a dashboard primitive, and after the dashboard primitive is drawn, the dashboard primitive is stored in a primitive browser. Based on a similar manner, the terminal stores various pre-configured editable primitives drawn by the primitive editor to the primitive browser, the various pre-configured editable primitives stored in the primitive browser may specifically be a thermometer, an instrument panel, a sign, a calendar, a button, and the like, and the type of the pre-configured editable primitives is not limited in this embodiment.
In a specific application, in the process of obtaining a page drawing result, the terminal first creates a page frame of the vector diagram in the primitive drawing tool, for example, setting the total width, the total height, and the background color of a page in the vector diagram. And then, responding to the selection operation of the pre-configured editable primitive, adding the selected primitive to the page frame from the primitive browser, and performing the editing operation on the selected primitive in the page frame based on the pre-configured page display requirement. The pre-configured page display requirements can be configured according to actual application scenes.
In a specific application, after the editing operation on the selected primitive is completed, the terminal can obtain a page drawing result in the primitive drawing tool. Taking a page drawing result of the source grid charge and storage energy management system in a primitive drawing tool (drawing configuration tool) as an example, as shown in fig. 3, the page drawing result specifically includes a graph primitive, a histogram primitive, a three-dimensional surface graph primitive, a dashboard primitive, a state information primitive and other primitives, and primitive titles such as a "system real-time load curve", "system daily charge and discharge capacity and efficiency", "energy storage unit battery voltage", "energy storage unit battery temperature" and the like. The terminal can derive the page drawing result of the source network charge storage energy management system into a vector diagram to obtain a vector diagram file.
And 104, analyzing the vector diagram file to obtain the configuration parameters of the display elements of each page in the vector diagram.
Each page display element has a selected primitive corresponding to each page display element, and the page display elements can be texts, alarm signals, buttons, calendars, cards, combined cards, 3D echart, echart bar charts, echart line charts, echart instrument panels, echart pie charts, echart progress bars, echart thermometers, echart water drop charts, pictures, links, menus, status lights, sub-pages, tables and the like in the pages. The configuration parameters of the page display elements can be specifically divided into text type configuration parameters and non-text type configuration parameters. For example, the primitive title of the selected primitive corresponding to the page display element is a text-type configuration parameter, and the primitive size, the primitive color and transparency, the position of the primitive in the page frame, the associated remote value, and the associated remote signaling value of the selected primitive corresponding to the page display element are non-text-type configuration parameters.
Specifically, the terminal analyzes the page frame segment, the text segment and the non-text segment in the vector diagram file based on an analysis tool to obtain the configuration parameters of the page frame, the text type configuration parameters of each selected primitive and the non-text type configuration parameters in the vector diagram, and then obtains the text type configuration parameters and the non-text type configuration parameters corresponding to each page display element based on the corresponding relationship between the selected primitive and the page display element.
In a specific application, the terminal analyzes the page frame segment in the vector diagram file based on the analysis tool to obtain the configuration parameters of the page frame in the vector diagram, for example, the total width, the total height and the background color of the page in the vector diagram.
In a specific application, after completing the analysis of the page frame segments in the vector image file, the terminal analyzes the text segments in the vector image file to obtain the text type configuration parameters corresponding to each page display element, wherein the text segments comprise a plurality of text label segments, and each text label segment corresponds to the configuration parameters of the primitive title of a selected primitive. The terminal analyzes the text label fragments one by one to obtain a text coordinate parameter, a text width parameter, a text font color parameter and a text font size parameter of a primitive title corresponding to each page display element. The lower left corner of the page frame can be set as an origin of a coordinate axis, and the text coordinate parameter of each page display element can specifically correspond to the X-axis coordinate parameter and the Y-axis coordinate parameter of the primitive title of the selected primitive in the page frame.
In a specific application, while the text segment in the vector graphics file is analyzed, the terminal can also analyze the non-text segment in the vector graphics file based on an analysis tool to obtain the non-text type configuration parameters corresponding to the page display elements. For example, the non-text segment in the vector diagram file is analyzed, and an element type, an element coordinate parameter (an X-axis coordinate parameter and a Y-axis coordinate parameter), an element width parameter, an element height parameter, an element type, a scaling of element coordinate axes, and an offset size of the element coordinate axes corresponding to the page display element may be obtained.
And 106, generating a first target file based on the configuration parameters, wherein the first target file comprises the element identification and the positioning information of each page display element.
The element identifier is composed of an element type and an element sequence number, and each page display element has a unique element identifier corresponding to each page display element.
Specifically, in the process of analyzing the vector graphics file, the terminal automatically generates an element sequence number corresponding to each page display element based on the analysis sequence of each page display element, automatically generates an element identifier corresponding to each page display element based on the element type and the element sequence number of each page display element, and generates a first target file based on the element identifier corresponding to each page display element.
In a specific application, the terminal analyzes the text fragment and the non-text fragment in the vector graph file based on an analysis tool to obtain the element type and the element sequence number of each page display element in the text fragment and the non-text fragment, so that element identifiers of all the page display elements in the text fragment and the non-text fragment are generated, and a first target file is generated based on the element identifiers of all the page display elements in the text fragment and the non-text fragment. And setting positioning information for the respective element identifier of each page display element in the first target file, and realizing the setting of the respective positioning information for each page display element based on the corresponding relation between the element identifier and the page display element. Wherein, the first object file also comprises the total width, the total height and the background color of the page frame in the vector diagram.
Step 108, creating a second target file corresponding to the first target file, wherein the second target file comprises an element processing interface of each page display element.
The first target file may be an HTML (Hyper Text Markup Language) file. HTML is a hypertext markup language that includes a series of tags. An HTML file is descriptive text consisting of HTML commands that can describe words, graphics, animations, sounds, tables, links, etc. The mode of displaying characters, pictures and pictures in the HTML file by the browser can be set by adding various markers in the HTML file, and the browser reads the HTML file according to the order of HTML commands in the HTML file and then displays the marked contents according to the markers in the HTML file. Combining the HTML document with other web page development technologies, such as scripting languages, public gateway interfaces, components, etc., powerful web pages can be created.
Specifically, after the first target file is automatically generated, the terminal creates a second target file with the same file name and different file format as the first target file, and adds an element processing interface of each page display element in the second target file.
In a specific application, after a first target file is generated, a terminal creates a second target file with the same file name and a different file format as the first target file, where the second target file may specifically be a JS (JavaScript) file, and adds an element processing interface of each page display element in the second target file.
JS is a lightweight, interpreted or just-in-time programming language with function precedence. JS, as a high-level scripting language of a network, has been widely used for WEB application development, and is often used to add various dynamic functions to a WEB page, so as to provide a smoother and more beautiful browsing effect for a user. Usually the JS script implements its own functionality by embedding in HTML.
In one embodiment, as shown in fig. 4, the process of generating the HTML file and the JS file is illustrated by a flowchart.
The terminal analyzes the vector diagram file based on an analysis tool, the total height, the total width and the background color of the page in the vector diagram are analyzed, and then the text and the WEB control in the vector diagram file are analyzed, wherein the WEB control corresponds to the page display element. And analyzing the text and the WEB control in the vector graphics file to obtain the configuration parameters and the element identifications of the text and the configuration parameters and the element identifications of the WEB control in the vector graphics file, and generating an HTML file based on the text and the element identifications of the WEB control. When the configuration parameters of the WEB controls are analyzed, the associated remote measurement value and the associated remote signaling value corresponding to each WEB control are analyzed, and the associated remote measurement value and the associated remote signaling value corresponding to each WEB control are configured in the corresponding WEB control. And then, creating a JS file corresponding to the HTML file, and adding a definition interface and a drawing interface corresponding to each control in the WEB control library in the JS file, wherein control drawing parameters for drawing the WEB controls are defined in the definition interface. And obtaining drawing parameters by calling the drawing interface, drawing the WEB control based on the drawing parameters, adding the obtained drawing parameters into the drawing interface in the JS file, and finally outputting the JS file to finish the analysis process of the vector diagram file.
In one embodiment, the process of generating the HTML file and the JS file is illustrated by another flowchart, as shown in fig. 5.
The terminal firstly defines the WEB elements displayed in the WEB page, edits the graphics primitives corresponding to the WEB elements in a graphics primitive editor, and adds the element processing interface corresponding to each WEB element to an analysis tool in a plug-in mode. And then calling a graphics primitive corresponding to the WEB element in a graphics primitive drawing tool, drawing a vector diagram corresponding to the WEB page, exporting the vector diagram into a vector diagram file, analyzing the vector diagram file based on a Python script, and generating an HTML file and a JS file. The Python script can be configured according to an actual application scene.
And step 110, respectively calling the element processing interfaces of the corresponding types in the second target file to draw the page display elements based on the respective element identifiers of the page display elements.
Specifically, the terminal traverses the element identifiers corresponding to each page display element in the first target file, and sequentially and respectively calls the element processing interfaces of the corresponding types in the second target file to draw the page display elements based on the sequence of traversing the element identifiers in the first target file.
In a specific application, in the process of drawing a first button in a page display element, when traversing to an element identifier corresponding to the first button in a first target file, a terminal calls an element processing interface corresponding to a button type in a second target file, and draws the first button in a page based on the element processing interface corresponding to the button type, wherein the element processing interfaces corresponding to elements of the same type are the same. And based on a similar mode, based on the sequence of traversing the element identifiers in the first target file, respectively calling the element processing interfaces of the corresponding types in the second target file to draw the page display elements.
And step 112, generating a page based on the respective positioning information of each page display element, wherein the page comprises the drawn page display elements.
Specifically, the terminal draws the page based on the setting of the positioning information of each page display element in the first target file, and generates the page, so that the relative position of the drawn page display element in the page is consistent with the relative position of the page display element in the page frame.
In a specific application, after the drawing of the first button in the page display element is completed, the terminal determines the relative position of the first button in the page based on the element coordinate parameter of the first button obtained in the parsing process and the setting of the positioning information of the first button in the first target file, and draws the first button in the page. And based on a similar mode, the terminal draws all page display elements in the page to generate the page.
In the page generation method, a page drawing result is obtained by responding to the selection operation of the pre-configured editable primitive, the page drawing result is derived to be a vector diagram, a vector diagram file is obtained, the vector diagram can be used as a carrier of the page drawing result, the configuration parameters of each page display element in the vector diagram are obtained by analyzing the vector diagram file, a first target file comprising the element identification and the positioning information of each page display element is generated based on the configuration parameters, a second target file comprising the element processing interface of each page display element corresponding to the first target file is created, the page display element can be drawn by respectively calling the element processing interface of the corresponding type in the second target file based on the element identification of each page display element, a page comprising the page display element after drawing is generated based on the positioning information of each page display element, and the whole process can realize the rapid conversion of the page drawing result by analyzing the vector diagram of the carrier as the page drawing result, and can improve the page generation efficiency.
In one embodiment, in response to a selection operation on the preconfigured editable primitive, obtaining a page drawing result includes:
responding to the selection operation of the pre-configured editable graphic elements, and determining the selected graphic elements;
responding to the editing operation of the selected primitive, and obtaining a primitive parameter of the selected primitive;
and obtaining a page drawing result based on the primitive parameters of the selected primitive.
Specifically, the terminal determines the selected primitive in response to the selection operation of the pre-configured editable primitive, adds the selected primitive to the primitive drawing tool from the primitive browser, obtains the primitive parameter of the selected primitive in response to the editing operation of the selected primitive, and obtains the page drawing result based on the primitive parameter of the selected primitive.
In a specific application, after the selected primitive is determined and added to the primitive drawing tool, the terminal edits the selected primitive in response to the editing operation on the selected primitive. For example, the primitive size, primitive title, primitive color and transparency, relative position of the primitive in the page frame, associated telemetry values, and associated telemetry values for the extracted primitive are edited. And after the editing operation of the selected primitive is finished, the terminal responds to the editing operation of the selected primitive to obtain the primitive parameter of the edited selected primitive, and a page drawing result is obtained based on the primitive parameter of the edited selected primitive.
Wherein the selected cells may correspond to one or more associated telemetry values or associated telemetry values. The associated remote measurement values of the selected primitives are the main parameter variables of the monitored plant and station, such as power, voltage and current of the plant and station. The associated remote signaling value of the selected graphic element is an equipment state signal, such as an alarm signal, of the monitored plant and station.
In a specific application, the terminal may edit the primitive title corresponding to the selected primitive by adding the title field in the coverage of the selected primitive, and may also edit the primitive color and transparency corresponding to the selected primitive by adding the primitive fill color and primitive transparency value field in the coverage of the selected primitive. The color of the primitive is an RGB (red, green and blue) color mode, the transparency value of the primitive is between 0 and 1, the smaller the transparency value of the primitive is, the more transparent the representation primitive is, the transparency value of the primitive is 0, the representation primitive is completely transparent, and the transparency value of the primitive is 1, the representation primitive is not transparent.
In a specific application, when the terminal edits the associated remote measurement value and the associated remote signaling value of the selected primitive, the active power of a certain device in the energy storage station may be used as the associated remote measurement value of a primitive of a dashboard, a BMS (BATTERY MANAGEMENT SYSTEM) alarm signal may also be used as the associated remote signaling value of a primitive of a BMS alarm, and the real-time load powers of a plurality of devices may also be used as the associated remote measurement value of a primitive of a graph, that is, a graph corresponds to a plurality of associated remote measurement values.
In a specific application, the operation and maintenance personnel can move the position of the selected primitive and zoom the size of the primitive in the primitive drawing tool through a mouse, namely, the size and the position of the primitive of the selected primitive are edited, and can also select a corresponding associated remote measurement value or an associated remote signaling value from a toolbar of the primitive drawing tool, drag the selected associated remote measurement value or the selected associated remote signaling value into a coverage range of the corresponding selected primitive, and realize the editing of the associated remote measurement value or the associated remote signaling value of the selected primitive.
In this embodiment, by performing an editing operation on the selected primitive, the primitive parameters of the edited selected primitive can be obtained, and a page drawing result is generated.
In one embodiment, parsing the vector diagram file to obtain the configuration parameters of each page display element in the vector diagram further includes:
adding an element processing interface corresponding to each page display element to an analysis tool in a plug-in mode;
analyzing the vector diagram file to obtain the configuration parameters of each page display element in the vector diagram comprises the following steps:
determining information to be analyzed corresponding to each page display element through an analysis tool based on an element processing interface, analyzing the vector diagram file according to the information to be analyzed corresponding to each page display element, and obtaining configuration parameters of each page display element in the vector diagram.
The information to be analyzed corresponding to each page display element may specifically be an element type, an element identifier, a ratio of an X-axis coordinate parameter to a total width of the page frame in the element coordinate parameters, a ratio of a Y-axis coordinate parameter to a total height of the page frame in the element coordinate parameters, an element width parameter, an element height parameter, an associated remote measurement value, or an associated remote signaling value of each page display element. In this embodiment, the information to be analyzed is not limited.
Specifically, an element processing interface corresponding to each page display element defines information to be analyzed in each page display element, after the element processing interface corresponding to each page display element is added to an analysis tool in a plug-in mode, the terminal can determine the information to be analyzed corresponding to each page display element through the element processing interface of each page display element, analyze the vector diagram file according to the information to be analyzed corresponding to each page display element, and obtain configuration parameters of each page display element in the vector diagram.
In a specific application, the element processing interfaces corresponding to the alarm signal and the BMS alarm signal in the page display element are taken as an example for explanation, and the element processing interfaces corresponding to the alarm signal and the BMS alarm signal define respective element identifiers, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter, and an associated remote signaling value. The X-axis coordinate parameter of the element starting point is an X-axis coordinate parameter closest to the origin in the page display element, and the Y-axis coordinate parameter of the element starting point is a Y-axis coordinate parameter closest to the origin in the page display element.
In a specific application, an element processing interface corresponding to a button in a page display element is taken as an example for explanation, and the element processing interface corresponding to the button defines an element identifier of the button, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter and a button display text.
In a specific application, an element processing interface corresponding to a calendar in a page display element is taken as an example for explanation, and the element processing interface corresponding to the calendar defines an element identifier of the calendar, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter and an element height parameter.
In a specific application, an element processing interface corresponding to a label in a page display element is taken as an example for explanation, and the element processing interface corresponding to the label defines an element identifier of the label, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter, an element filling color and an element transparency.
In a specific application, the element processing interfaces corresponding to the three-dimensional curved surface, the histogram, the graph, the pie chart, the progress bar, the water drop map and the thermometer in the page display element are taken as examples for explanation, and the element processing interfaces corresponding to the three-dimensional curved surface, the histogram, the graph, the pie chart, the progress bar, the water drop map and the thermometer define respective element identifications, a ratio of an element starting point X-axis coordinate parameter to a total width of the vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter, an element title and element display data.
In a specific application, an element processing interface corresponding to an instrument panel in page display elements is taken as an example for explanation, and the element processing interface corresponding to the instrument panel defines an element identifier of the instrument panel, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter, an element title, element display data, a minimum value of the element display data, and a maximum value of the element display data.
In a specific application, an element processing interface corresponding to a picture in a page display element is taken as an example for explanation, and the element processing interface corresponding to the picture defines an element identifier of the picture, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter and an element name.
In a specific application, state information in a page display element and an element processing interface corresponding to a polymorphic table are taken as examples for explanation, and the state information and the element processing interface corresponding to the polymorphic table define respective element identifiers, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter, an associated remote signaling value and an element display text.
In a specific application, an element processing interface corresponding to a table in a page display element is taken as an example for explanation, and the element processing interface corresponding to the table defines an element identifier of the table, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter, and element display content.
In this embodiment, the information to be analyzed in each page display element is defined through the element processing interface of each page display element in the analysis tool, the information to be analyzed corresponding to each page display element is determined, the vector diagram file is analyzed according to the information to be analyzed corresponding to each page display element, and the configuration parameters of each page display element in the vector diagram can be obtained.
In one embodiment, the element processing interface includes an element definition interface and an element rendering interface, and based on the respective element identifier of each page display element, respectively invoking the element processing interface of the corresponding type in the second target file to render the page display element includes:
respectively calling element drawing interfaces of corresponding types in the second target file based on respective element identifiers of the page display elements;
calling the same type of element definition interfaces through the element drawing interfaces to obtain element drawing parameters, and drawing the page display elements based on the element drawing parameters.
Specifically, the terminal calls corresponding types of element drawing interfaces in the second target file respectively based on respective element identifiers of each page display element in the first target file, calls the same type of element definition interfaces through the element drawing interfaces to obtain element drawing parameters defined in the element definition interfaces, and then calls the element drawing interfaces to draw the page display elements based on the element drawing parameters.
In a specific application, a description is given by taking an example of drawing a first button in a page display element, a terminal calls an element drawing interface corresponding to a button type in a second object file based on an element identifier of the first button in the page display element in a first object file, calls an element definition interface corresponding to the button type through the element drawing interface corresponding to the button type, obtains information to be analyzed defined by the element definition interface corresponding to the button type, and obtains an element drawing parameter corresponding to the first button based on the information to be analyzed corresponding to the button type, where the element drawing parameter corresponding to the first button may be specifically an element type, an element identifier, a ratio of an element starting point X-axis coordinate parameter to a total width of a vector diagram, a ratio of an element starting point Y-axis coordinate parameter to a total height of the vector diagram, an element width parameter, an element height parameter, and a button display text of the first button. And then, the terminal calls an element drawing parameter corresponding to the first button based on an element drawing interface corresponding to the button type, and draws the first button in the page. In a similar way, the terminal finishes drawing all page display elements in the page.
In this embodiment, element drawing interfaces of corresponding types in the second target file are respectively called based on respective element identifiers of each page display element, element definition interfaces of the same type are called through the element drawing interfaces, element drawing parameters are obtained, and the page display elements can be drawn based on the element drawing parameters.
In one embodiment, generating a first target file based on the configuration parameters, the first target file including the respective element identifier and the positioning information of each page display element includes:
generating an element identifier of the page display element based on the element type in the configuration parameter, and generating positioning information of the page display element based on the coordinate parameter of the page display element in the configuration parameter;
and acquiring a first target file based on the element identification and the positioning information of each page display element.
The positioning information is used for describing the position of the page display element. For example, the positioning information may specifically be absolute positioning, where absolute positioning refers to fixing a page presentation element by specifying the position of the page presentation element in the horizontal and vertical directions.
Specifically, the terminal determines the element type of each page display element based on the configuration parameters of each page display element, generates the element sequence number of each page display element based on the analysis sequence of each page display element, and generates the element identifier of each page display element based on the element type and the element sequence number of each page display element. Then, the terminal generates positioning information of the page display elements based on the coordinate parameters of the page display elements in the configuration parameters, and obtains a first target file based on the element identification and the positioning information of each page display element.
In a specific application, in the process of generating the element identifiers of all the page display elements in the text segment, the element types generated by the terminal are all the text type "text", and the element sequence number of each text title is determined based on the resolution sequence of the text titles in the page display elements, so that the element identifiers of all the page display elements in the text segment are generated. For example, when the terminal parses a first text title in the page presentation elements, an element identifier "text _1" corresponding to the first text title is generated, where the "text" indicates that the element type of the first text title is a text type, and the "1" indicates an element sequence number of the first text title. When the terminal resolves to the second text title in the page display element, the element identifier 'text _ 2' corresponding to the second text title is generated. In a similar manner, element identifications of all page presentation elements in the text segment are generated.
In a specific application, in the process of generating the element identifiers of all the page display elements in the non-text segment, for different types of page display elements, the terminal generates different element types, and generates the element sequence number of each page display element based on the analysis sequence of each element type. For example, when the terminal parses a first button "in the page presentation element, an element identifier" button _1 "corresponding to the first button is generated, where the button" represents that the element type of the first button is the button type, and "1" represents the element sequence number of the first button. When the second button in the page display element is resolved, the element identifier button _2 corresponding to the second button is generated. When the first placard "card" in the page presentation element is resolved, the element identification "card _1" corresponding to the first placard is generated. And generating element identifications corresponding to all page display elements in the non-text segment based on a similar mode.
In a specific application, after generating element identifiers corresponding to all page display elements in a text fragment and a non-text fragment, the terminal sets absolute positioning for the element identifier corresponding to each page display element in a first target file, and fixes the relative position of each page display element in a page.
In a specific application, the terminal may further set, based on a div (division) tag, an element identifier corresponding to each page display element in the first target file and positioning information corresponding to each page display element. For example, based on the div tag, "button _1" of the first button and the location information "position: absolute" of the first button are defined as separate parts in the first object file. In a similar manner, the element identification and positioning information of each page presentation element in the first target document are defined as separate parts. Where div is a positioning technique in a cascading style sheet and a div element is an element used to provide structure and context for large blocks of content within an HTML document. div tags define partitions or parts in HTML documents, often used to combine block-level elements for formatting these elements by style sheets. div tags may split a document into separate, distinct parts.
In this embodiment, the element identifier of the page display element is generated based on the element type in the configuration parameter, and the positioning information of the page display element is generated based on the coordinate parameter of the page display element in the configuration parameter, so that the first destination file can be obtained based on the element identifier and the positioning information of each page display element.
In one embodiment, the second target file includes a preconfigured timing function, and after generating the page based on the respective positioning information of each page presentation element, the method further includes:
and based on a pre-configured timing function, refreshing the page at a fixed time to obtain a refreshed page.
Wherein the preconfigured timing function may be set at an end portion of file content of the second target file.
Specifically, the second target file comprises a preconfigured timing function, and after a page is generated based on the respective positioning information of each page display element, the terminal performs timing refresh on the page display elements in the page based on the preconfigured timing function in the second target file, so as to obtain real-time page display data, and obtain a refreshed page.
In a specific application, the generated first target file and the second target file are placed into a browser, a terminal in the browser traverses element identifiers in the first target file, element drawing interfaces in the second target file are sequentially called based on the traversal sequence of the element identifiers to obtain element drawing parameters, a page is drawn based on the element drawing parameters, and the obtained element drawing parameters are stored in the second target file. And after the browser finishes drawing the page, periodically refreshing the page based on the preconfigured timing function in the second target file, namely periodically acquiring real-time page display data, such as real-time associated remote measurement values and real-time associated remote signaling values. The timing refresh time of the preconfigured timing function may be specifically set to perform page refresh every 1 minute.
In an embodiment, taking the source network energy storage management system as an example for explanation, after the page drawing result in fig. 3 is processed, based on the page drawing result in fig. 3, a page as shown in fig. 6 may be generated in a browser. The page shown in fig. 6 may specifically display the commercial power, the load power, and the charge and discharge power based on the graphic elements of the graph preconfigured in fig. 3, may also display the daily charge and discharge capacity and efficiency of the system based on the graphic elements of the histogram preconfigured in fig. 3, and may display the voltage of the energy storage unit battery, the temperature of the energy storage unit battery, and the like based on the graphic elements of the three-dimensional curved surface graph preconfigured in fig. 3.
In the embodiment, the page is refreshed at regular time by pre-configuring the timing function, so that the real-time associated remote measuring signal and the associated remote signaling signal can be obtained, and the refreshed page can be obtained.
The inventor thinks that, in the above-mentioned page generating method, a page drawing result is obtained by responding to a selection operation on a pre-configured editable primitive, the page drawing result is derived as a vector diagram, a vector diagram file is obtained, the vector diagram can be used as a carrier of the page drawing result, a configuration parameter of each page display element in the vector diagram is obtained by analyzing the vector diagram file, a first target file including respective element identification and positioning information of each page display element is generated based on the configuration parameter, a second target file including an element processing interface of each page display element corresponding to the first target file is created, the page display element can be drawn by respectively calling the element processing interface of the corresponding type in the second target file based on the respective element identification of each page display element, a page including the page display element after drawing is generated based on the respective positioning information of each page display element, and the whole process can realize rapid conversion of the page drawing result by analyzing the vector diagram of the carrier as the page drawing result, and can improve the page generating efficiency.
In one embodiment, as shown in fig. 7, the page generation method in this embodiment is described by applying to a WEB page of an NSA3000T power station integrated automation monitoring system in a substation.
Step 702, determining page display elements in the WEB page, drawing a primitive corresponding to each page display element in a primitive editor, obtaining a pre-configured editable primitive, and storing the pre-configured editable primitive to a primitive browser.
Step 704, in response to the selection operation on the pre-configured editable primitive, determining the primitive to be selected, adding the primitive to be selected from the primitive browser to the primitive drawing tool, and in response to the editing operation on the selected primitive in the primitive drawing tool, obtaining the primitive parameter of the selected primitive.
And step 706, obtaining a page drawing result based on the primitive parameters of the selected primitive, and deriving the page drawing result into a vector diagram to obtain a vector diagram file.
Step 708, adding the element processing interface corresponding to each page display element to the analysis tool in a plug-in form, and determining the information to be analyzed corresponding to each page display element by the analysis tool based on the element processing interface.
Step 710, analyzing the vector diagram file according to the information to be analyzed corresponding to each page display element, and obtaining the configuration parameters of each page display element in the vector diagram.
And 712, generating an element identifier of the page display element based on the element type in the configuration parameter, and generating positioning information of the page display element based on the coordinate parameter of the page display element in the configuration parameter.
Step 714, based on the element identifier and the positioning information of each page display element, a first target file is obtained.
Step 716, creating a second target file corresponding to the first target file, wherein the second target file includes an element processing interface of each page display element, and the element processing interface includes an element definition interface and an element drawing interface.
Step 718, based on the respective element identifier of each page display element, respectively calling element drawing interfaces of corresponding types in the second target file, and calling element definition interfaces of the same type through the element drawing interfaces to obtain element drawing parameters, and drawing the page display elements based on the element drawing parameters.
And 720, generating a page based on the respective positioning information of each page display element, wherein the page comprises the drawn page display elements.
And step 722, refreshing the page at regular time based on the pre-configured timing function, updating the data displayed on the WEB page of the monitoring system into real-time data, and obtaining the refreshed page.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application further provides a page generation device for implementing the page generation method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the page generation device provided below may refer to the limitations of the page generation method in the foregoing, and details are not described here.
In one embodiment, as shown in fig. 8, there is provided a page generating apparatus including: a first processing module 802, a second processing module 804, a first target file generating module 806, a second target file creating module 808, an element processing interface calling module 810, and a page generating module 812, wherein:
the first processing module 802 is configured to obtain a page drawing result in response to a selection operation on a preconfigured editable primitive, derive the page drawing result as a vector diagram, and obtain a vector diagram file;
the second processing module 804 is configured to parse the vector diagram file to obtain a configuration parameter of each page display element in the vector diagram;
a first target file generating module 806, configured to generate a first target file based on the configuration parameter, where the first target file includes an element identifier and positioning information of each page display element;
a second target file creating module 808, configured to create a second target file corresponding to the first target file, where the second target file includes an element processing interface of each page display element;
the element processing interface calling module 810 is configured to respectively call the element processing interfaces of the corresponding types in the second target file to draw the page display elements based on the respective element identifiers of the page display elements;
and a page generating module 812, configured to generate a page based on the respective positioning information of each page display element, where the page includes the rendered page display element.
In one embodiment, the first processing module is further configured to determine the selected primitive in response to a selection operation on a preconfigured editable primitive, obtain a primitive parameter of the selected primitive in response to the editing operation on the selected primitive, and obtain a page drawing result based on the primitive parameter of the selected primitive.
In one embodiment, the page generating apparatus further includes an element processing interface adding module, where the element processing interface adding module is configured to add the element processing interface corresponding to each page display element to the parsing tool in a plug-in form.
In one embodiment, the second processing module is further configured to determine, by an analysis tool, information to be analyzed corresponding to each page display element based on the element processing interface, and analyze the vector diagram file according to the information to be analyzed corresponding to each page display element, to obtain the configuration parameter of each page display element in the vector diagram.
In one embodiment, the element processing interface calling module is further configured to call element drawing interfaces of corresponding types in the second target file respectively based on respective element identifiers of each page display element, call element definition interfaces of the same type through the element drawing interfaces, obtain element drawing parameters, and draw the page display elements based on the element drawing parameters.
In one embodiment, the first target file generating module is further configured to generate an element identifier of the page display element based on the element type in the configuration parameter, generate positioning information of the page display element based on the coordinate parameter of the page display element in the configuration parameter, and obtain the first target file based on the element identifier and the positioning information of each page display element.
In one embodiment, the page generating device further includes a timing refresh module, and the timing refresh module is configured to perform timing refresh on the page based on a preconfigured timing function, so as to obtain a refreshed page.
The various modules in the page generating device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device comprises a processor, a memory, an Input/Output (I/O) interface and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store page generation data. The input/output interface of the computer device is used for exchanging information between the processor and an external device. The communication interface of the computer device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a page generation method.
It will be appreciated by those skilled in the art that the configuration shown in fig. 9 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the relevant laws and regulations and standards of the relevant country and region.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, databases, or other media used in the embodiments provided herein can include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A page generation method, characterized in that the method comprises:
responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram, and obtaining a vector diagram file;
analyzing the vector diagram file to obtain configuration parameters of display elements of each page in the vector diagram;
generating a first target file based on the configuration parameters, wherein the first target file comprises element identification and positioning information of each page display element;
creating a second target file corresponding to the first target file, wherein the second target file comprises an element processing interface of each page display element;
calling the element processing interfaces of the corresponding types in the second target file respectively to draw the page display elements based on the respective element identifiers of the page display elements;
and generating a page based on the respective positioning information of each page display element, wherein the page comprises the drawn page display elements.
2. The method of claim 1, wherein obtaining a page drawing result in response to a pick operation on a preconfigured editable primitive comprises:
in response to a selection operation on a pre-configured editable primitive, determining a selected primitive;
responding to the editing operation of the selected graphic primitive, and obtaining the graphic primitive parameter of the selected graphic primitive;
and obtaining a page drawing result based on the primitive parameters of the selected primitive.
3. The method according to claim 1, wherein said parsing said vector graphics file to obtain configuration parameters for each page-showing element in said vector graphics file further comprises:
adding an element processing interface corresponding to each page display element to an analysis tool in a plug-in mode;
the analyzing the vector diagram file to obtain the configuration parameters of each page display element in the vector diagram comprises:
and determining information to be analyzed corresponding to each page display element through the analysis tool based on the element processing interface, and analyzing the vector diagram file according to the information to be analyzed corresponding to each page display element to obtain the configuration parameters of each page display element in the vector diagram.
4. The method of claim 1, wherein the element processing interface comprises an element definition interface and an element drawing interface;
the respectively calling the element processing interfaces of the corresponding types in the second target file to draw the page display elements based on the respective element identifiers of the page display elements comprises:
respectively calling element drawing interfaces of corresponding types in the second target file based on respective element identifiers of the page display elements;
and calling element definition interfaces of the same type through the element drawing interfaces to obtain element drawing parameters, and drawing page display elements based on the element drawing parameters.
5. The method of claim 1, wherein generating the first object file based on the configuration parameters comprises:
generating an element identifier of the page display element based on the element type in the configuration parameter, and generating positioning information of the page display element based on the coordinate parameter of the page display element in the configuration parameter;
and obtaining a first target file based on the element identification and the positioning information of each page display element.
6. The method of claim 1, wherein the second target file comprises a preconfigured timing function;
after the page is generated based on the respective positioning information of each page display element, the method further includes:
and based on the pre-configured timing function, performing timing refreshing on the page to obtain a refreshed page.
7. An apparatus for generating a page, the apparatus comprising:
the first processing module is used for responding to the selection operation of the pre-configured editable graphic elements, obtaining a page drawing result, deriving the page drawing result into a vector diagram and obtaining a vector diagram file;
the second processing module is used for analyzing the vector diagram file to obtain the configuration parameters of each page display element in the vector diagram;
a first target file generation module, configured to generate a first target file based on the configuration parameter, where the first target file includes an element identifier and positioning information of each page display element;
a second target file creating module, configured to create a second target file corresponding to the first target file, where the second target file includes an element processing interface of each page display element;
the element processing interface calling module is used for calling the element processing interfaces of the corresponding types in the second target file to draw the page display elements respectively based on the respective element identifiers of the page display elements;
and the page generation module is used for generating a page based on the respective positioning information of each page display element, and the page comprises the drawn page display elements.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202211039204.7A 2022-08-29 2022-08-29 Page generation method and device, computer equipment and storage medium Pending CN115357237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211039204.7A CN115357237A (en) 2022-08-29 2022-08-29 Page generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211039204.7A CN115357237A (en) 2022-08-29 2022-08-29 Page generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115357237A true CN115357237A (en) 2022-11-18

Family

ID=84004147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211039204.7A Pending CN115357237A (en) 2022-08-29 2022-08-29 Page generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115357237A (en)

Similar Documents

Publication Publication Date Title
US10984177B2 (en) System and method providing responsive editing and viewing, integrating hierarchical fluid components and dynamic layout
CN109801347B (en) Method, device, equipment and medium for generating editable image template
KR101494844B1 (en) System for Transforming Chart Using Metadata and Method thereof
CN103034502B (en) A kind of method embedding dynamic realtime monitoring chart in SVG interface
CN111553131B (en) PSD file analysis method, device, equipment and readable storage medium
CN103279455B (en) The pattern treatment process of electrical form and device
US20210406615A1 (en) Learning device, classification device, learning method, classification method, learning program, and classification program
CN111240669B (en) Interface generation method and device, electronic equipment and computer storage medium
CN108984175B (en) Object-oriented power grid SVG single line diagram display method suitable for mobile equipment
CN102662921B (en) A kind of document processing method, device and editing machine
CN103559184A (en) Form page display method and device
CN107977205A (en) Gui interface automatically creates method and system
CN113268233A (en) Page generation method and device, computer equipment and storage medium
CN109829127A (en) Fast resolving PSD file is the method for webpage
CN115439609B (en) Three-dimensional model rendering method, system, equipment and medium based on map service
CN111459501A (en) SVG-based Web configuration picture storage and display system, method and medium
CN106933887A (en) A kind of data visualization method and device
CN105956133B (en) Method and device for displaying file on intelligent terminal
CN111291533A (en) Sentence segment to be displayed display method and device, computer equipment and storage medium
CN104298705A (en) Converting method of relational data and unstructured data
CN109032599B (en) Method, device, equipment and medium for generating interactive flow chart based on XML (extensive Makeup language) representation
CN114647409A (en) Large-screen visualization application creation platform, method, computing device and storage medium
CN109086515B (en) Modeling method for primary equipment drawing information in SSD (solid State drive) of intelligent substation based on SVG (scalable vector graphics)
CN114416056A (en) Page generation method, system, computer equipment and readable storage medium
CN115357237A (en) Page generation method and device, computer 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