CN116206031A - Data visualization method and device and electronic equipment - Google Patents

Data visualization method and device and electronic equipment Download PDF

Info

Publication number
CN116206031A
CN116206031A CN202211674675.5A CN202211674675A CN116206031A CN 116206031 A CN116206031 A CN 116206031A CN 202211674675 A CN202211674675 A CN 202211674675A CN 116206031 A CN116206031 A CN 116206031A
Authority
CN
China
Prior art keywords
rendering
image
server
dimensional
instruction
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
CN202211674675.5A
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.)
Wuhan Dayun Data Technology Co ltd
Original Assignee
Wuhan Dayun Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Dayun Data Technology Co ltd filed Critical Wuhan Dayun Data Technology Co ltd
Priority to CN202211674675.5A priority Critical patent/CN116206031A/en
Publication of CN116206031A publication Critical patent/CN116206031A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a data visualization method, a data visualization device and electronic equipment, wherein the method comprises the following steps: sending a first rendering instruction to a push server, so as to forward the first rendering instruction to the rendering server based on the push server; receiving a rendering image sent by a pushing server, and displaying the rendering image; acquiring a click command, and acquiring corresponding two-dimensional image data from an image data server based on the click command; sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server; receiving two-dimensional coordinates of an image sent by a pushing server, and performing chart rendering based on two-dimensional image data and the two-dimensional coordinates of the image; the two-dimensional coordinates of the image are obtained by converting the rendering server based on the second rendering instruction. The invention can solve the technical problem that the high-quality three-dimensional image cannot be displayed on a low-performance terminal in a low-cost mode at present.

Description

Data visualization method and device and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a data visualization method, a data visualization device, and an electronic device.
Background
With the vigorous development of big data industry, the big screen display system does not only show the chart and the data instrument panel developed by the visualization tool, but also can more vividly and friendly activate data by carrying the technologies of geographical track, flying line, heat, block, three-dimensional map/earth, electronic sand table and the like on the present visualized big screen, and meanwhile, the method can combine rich interactive functions and real-time performance. Rendering of three-dimensional images becomes a very important link in large screen visualization systems.
Three-dimensional image rendering for large screen visualization systems typically takes place in several ways: 1. front-end WebGL rendering, wherein a front-end browser firstly downloads a three-dimensional model generated offline from a server and then delivers the three-dimensional model to WebGL rendering, and all rendering and interaction are completed by the browser. The disadvantage is that the front-end hardware requirements are very high if the model is too large. 2. The three-dimensional model is rendered into a plurality of two-dimensional pictures with fixed angles in an off-line manner, and the three-dimensional model has the advantages of very low performance requirements and good visual effect through art designing. The disadvantage is poor interactivity and the loss of the advantage of three-dimensional images. 3. And the back-end cloud rendering is that a visualization program is placed in a remote server for rendering, a user terminal sends an operation instruction to the server through a browser, the server renders a visual image in real time, and the rendered image is pushed to the browser in a video stream mode through technologies such as webrtc. The disadvantage is that image rendering requires very high GPU requirements, and in order to meet the simultaneous online rendering of multiple terminals, compared with conventional cloud computing applications, the required hardware performance of cloud rendering is at least several times to tens of times higher than that of cloud computing when meeting the same number of user requirements.
In summary, the current image rendering method cannot meet the requirement of displaying high-quality three-dimensional images on low-performance terminals in a low-cost manner.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a data visualization method, apparatus and electronic device for solving the technical problem that the high-quality three-dimensional image cannot be displayed on the low-performance terminal in a low-cost manner.
In order to achieve the above object, the present invention provides a data visualization method, including:
sending a first rendering instruction to a push server, so as to forward the first rendering instruction to a rendering server based on the push server;
receiving a rendering image sent by the pushing server and displaying the rendering image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server;
acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command;
sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server;
Receiving the two-dimensional image coordinates sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server.
Further, the data visualization method further comprises the following steps:
before the first rendering instruction is sent to the pushing server, a webtc protocol communication channel is established between terminal equipment and the pushing server, so that the first rendering instruction and the second rendering instruction are sent to the pushing server from the terminal equipment based on the webtc protocol communication channel, and the rendered image and the two-dimensional coordinates of the image sent by the pushing server are received.
Further, the presenting the rendered image includes:
displaying the rendered image to a browser based on a backend image canvas;
the chart rendering based on the two-dimensional image data and the two-dimensional image coordinates comprises the following steps:
and performing chart rendering on a front-end rendering canvas based on the two-dimensional image data and the two-dimensional coordinates of the image.
Further, the two-dimensional coordinates of the image are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on a matrix projection algorithm.
Further, the data visualization method further comprises the following steps:
transmitting a third rendering instruction containing a drag object to the push server under the condition that an image drag instruction is received, so as to transmit the third rendering instruction to the rendering server based on the push server;
receiving new two-dimensional coordinates of the image sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the new two-dimensional coordinates of the image; the new two-dimensional coordinates of the image are obtained by converting the three-dimensional coordinates of the dragging object by the rendering server based on the third rendering instruction and are sent to the pushing server.
The invention also provides a data visualization method, which comprises the following steps:
receiving a first rendering instruction sent by a push server;
rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server so as to send the rendered image to a terminal device based on the push server;
Receiving a second rendering instruction which is sent by the pushing server and contains a click object, converting the three-dimensional coordinate of the click object into a corresponding image two-dimensional coordinate based on the second rendering instruction, and sending the image two-dimensional coordinate to the pushing server so as to forward the image two-dimensional coordinate to the terminal equipment based on the pushing server;
the two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
Further, the rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server, including:
under the condition that the rendering image corresponding to the first rendering instruction does not exist in a cache pool of the rendering server, rendering a target model in a rendering engine of the rendering server based on the first rendering instruction to obtain the rendering image, sending the rendering image to the cache pool for caching, and sending the rendering image to the push server;
and under the condition that the rendering image exists in the cache pool, after the rendering image is acquired from the cache pool, the rendering image is sent to the push server.
The invention also provides a data visualization device, comprising:
the first sending module is used for sending a first rendering instruction to the push server so as to forward the first rendering instruction to the rendering server based on the push server;
the display module is used for receiving the rendering image sent by the pushing server and displaying the rendering image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server;
the acquisition module is used for acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command;
the second sending module is used for sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server;
the rendering module is used for receiving the two-dimensional image coordinates sent by the pushing server and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server.
The invention also provides a data visualization device, comprising:
the receiving module is used for receiving a first rendering instruction sent by the push server;
the rendering module is used for rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server so as to send the rendered image to a terminal device based on the push server;
the coordinate determining module is used for receiving a second rendering instruction which is sent by the pushing server and contains the click object, converting the three-dimensional coordinate of the click object into a corresponding image two-dimensional coordinate based on the second rendering instruction, and sending the image two-dimensional coordinate to the pushing server so as to forward the image two-dimensional coordinate to the terminal equipment based on the pushing server;
the two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
The invention also provides an electronic device comprising a memory and a processor, wherein,
the memory is used for storing programs;
the processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps in the data visualization method described in any one of the above.
The beneficial effects of the implementation mode are that: according to the data visualization method, the data visualization device and the electronic equipment, the first rendering instruction is sent to the rendering server, the rendering server renders the target model to obtain the three-dimensional image, namely the rendering image, and the rendering image is returned to be displayed; when the rendered image is clicked, two-dimensional image data are obtained from the image data server, a second rendering instruction containing a clicked object is sent to the rendering server, the rendering server converts the three-dimensional coordinates of the clicked object into two-dimensional coordinates of the image, the two-dimensional coordinates of the image are returned, and the terminal equipment can conduct chart rendering based on the two-dimensional image data and the two-dimensional coordinates of the image, so that the visualized operation of the data is realized. The invention obtains the two-dimensional coordinates of the image by carrying out image rendering on the rendering server and displaying the three-dimensional coordinates of the clicking object by the rendering server, and then carrying out chart rendering on the two-dimensional coordinates of the image by the terminal device based on the two-dimensional image data, the whole process of the terminal device does not need to carry out image rendering, and the image rendering and the coordinate conversion are realized by the rendering server, so that the hardware requirement on the terminal device is low, and meanwhile, the interactivity of the three-dimensional image is reserved; in addition, when three-dimensional image interaction is carried out, two-dimensional image data are acquired from the image data server, subsequent rendering is performed on the terminal equipment, repeated rendering is not needed by the rendering server, and the hardware requirement of the rendering server is not improved, so that the technical problem that high-quality three-dimensional images cannot be displayed on a low-performance terminal in a low-cost mode is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an embodiment of a data visualization method according to the present invention;
FIG. 2 is a flow chart of another embodiment of a data visualization method according to the present invention;
FIG. 3 is an interactive schematic diagram of an embodiment of a data visualization method according to the present invention;
FIG. 4 is a schematic diagram of an embodiment of a data visualization device according to the present invention;
FIG. 5 is a schematic diagram of another embodiment of a data visualization device according to the present invention;
fig. 6 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or modules is not necessarily limited to those steps or modules that are expressly listed or inherent to such process, method, article, or device.
The naming or numbering of the steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed according to the time/logic sequence indicated by the naming or numbering, and the named or numbered flow steps may change the execution order according to the technical purpose to be achieved, so long as the same or similar technical effects can be achieved.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention provides a data visualization method, a data visualization device and electronic equipment, and the data visualization method, the data visualization device and the electronic equipment are respectively described below.
As shown in fig. 1, the present invention provides a data visualization method, including:
step 110, a first rendering instruction is sent to a push server, so that the first rendering instruction is forwarded to a rendering server based on the push server.
It will be appreciated that the data visualization method provided in this embodiment is applied to, i.e. performed by, a terminal device, which may be a personal computer terminal or a mobile terminal device.
The terminal equipment is provided with an event interaction center, a user triggers an initialization event through the event interaction center on the terminal equipment, and sends out an instruction for rendering the machine room model, namely a first rendering instruction, and the pushing server forwards the first rendering instruction to a rendering engine of the rendering server.
The rendering server can be a cloud server, a three-dimensional machine room model to be used is stored in a model management module of the rendering server, and the rendering server can automatically select and allocate appropriate computing resources according to the model scale to realize rendering. After receiving the rendering instruction, the rendering server finds out the computing resource where the model to be rendered is located, searches for a rendering image in a cache pool, and if the rendering image exists in the cache pool, directly pushes the rendering image to a terminal device; if the rendering image does not exist in the cache pool, rendering is directly carried out in real time, the rendering image is directly pushed to the terminal equipment, and the rendering image is placed in the cache pool.
Step 120, receiving the rendered image sent by the pushing server and displaying the rendered image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server.
It can be understood that after receiving the first rendering instruction, the rendering engine of the rendering server finds the machine room model from the model management according to the first rendering instruction, and invokes the computing resource allocated by the computing resource scheduling engine to perform real-time rendering of the image, so as to obtain a rendered image. After the rendered image is obtained, the rendered image is sent to a cache pool for caching by the rendering engine so as to be called next time, and the rendered image is sent to a pushing server so as to send a first rendering instruction to the terminal equipment through the pushing server.
And 130, acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command.
It can be appreciated that the user obtains the server ID by clicking on the server identifier on the rendered image, and invokes the interface of the image data server through the server ID to obtain the two-dimensional image data in the image data server. The image data server may be a local server.
Step 140, sending a second rendering instruction including the clicked object to the push server, so as to send the second rendering instruction to the rendering server based on the push server.
It will be appreciated that after the two-dimensional image data from the image data server is obtained, a second rendering instruction containing the clicked object is sent to the push server, and the second rendering instruction is sent to the rendering engine of the rendering server through the push server.
Step 150, receiving the two-dimensional image coordinates sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server.
It can be understood that the rendering engine converts the three-dimensional coordinates of the click object contained in the second rendering instruction into two-dimensional coordinates of the image through the matrix projection algorithm of OpenGL, the rendering server sends the two-dimensional coordinates of the converted image to the pushing server, and the two-dimensional coordinates of the image are sent to the terminal device through the pushing server so as to be used for rendering the chart by the terminal device, so that the data visualization operation is completed.
In some embodiments, the data visualization method further comprises:
before the first rendering instruction is sent to the pushing server, a webtc protocol communication channel is established between terminal equipment and the pushing server, so that the first rendering instruction and the second rendering instruction are sent to the pushing server from the terminal equipment based on the webtc protocol communication channel, and the rendered image and the two-dimensional coordinates of the image sent by the pushing server are received.
It can be understood that a user can open an operation page on the terminal device, load a front-end rendering canvas and a rear-end image canvas, the rear-end image canvas and the push server establish a webrtc protocol communication channel for receiving the image pushed by the push server, and the event interaction center and the push server establish a webrtc protocol communication channel for sending instructions.
In some embodiments, the method for visualizing data, the presenting the rendered image, comprises:
displaying the rendered image to a browser based on a backend image canvas;
the chart rendering based on the two-dimensional image data and the two-dimensional image coordinates comprises the following steps:
And performing chart rendering on a front-end rendering canvas based on the two-dimensional image data and the two-dimensional coordinates of the image.
It is appreciated that the backend image canvas may render rendered images to the browser via the webtc protocol.
Two broad categories of visualization components, front-end rendering components and back-end rendering components, are defined for the rendering mode of the visualization components. The back-end rendering component is typically a three-dimensional component, such as a three-dimensional earth, a three-dimensional GIS, a custom three-dimensional model, and so on. The front-end rendering component is typically an echartite chart, text, picture, etc., two-dimensional web component. The visual page is composed of two layers of canvas, a bottom layer of canvas (i.e. a back end image canvas) is used for placing the back end rendering component, and a top layer of canvas (i.e. a front end rendering canvas) is used for placing the front end rendering component. The problem of interaction operation such as coordinate mapping, event transfer and the like between different types of components of different canvas is solved between the two layers of canvas through the event interaction center.
Event delivery typically occurs when a user clicks or enters an operation on a canvas, converting to different rendering instructions, including rotation, movement, scaling, display, hiding, switching, etc., of the three-dimensional model, according to different event needs.
In some embodiments, the two-dimensional coordinates of the image are obtained by converting three-dimensional coordinates of the click object by the rendering server based on a matrix projection algorithm.
It will be appreciated that coordinate mapping typically occurs after an underlying canvas drag event occurs and that the two-dimensional component rendered by the backend image canvas needs to be positioned in real time to some fixed location of the three-dimensional component. The two-dimensional component and the three-dimensional component adopt different coordinate systems, so that coordinate conversion is needed. The method comprises the specific steps that the two-dimensional component records the position of the two-dimensional component in a three-dimensional coordinate system and sends the position of the two-dimensional component to a rendering server, and the rendering server converts the coordinates of the three-dimensional component into two-dimensional component coordinates through a matrix projection algorithm of OpenGL in the rendering process and returns the two-dimensional component coordinates to terminal equipment for positioning and using the two-dimensional component on a front-end rendering canvas.
In some embodiments, the data visualization method further comprises:
transmitting a third rendering instruction containing a drag object to the push server under the condition that an image drag instruction is received, so as to transmit the third rendering instruction to the rendering server based on the push server;
receiving new two-dimensional coordinates of the image sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the new two-dimensional coordinates of the image; the new two-dimensional coordinates of the image are obtained by converting the three-dimensional coordinates of the dragging object by the rendering server based on the third rendering instruction and are sent to the pushing server.
It can be understood that when a user drags a page on the terminal device, an instruction (namely, a third rendering instruction) of model movement generated by the event interaction center of the terminal device is transmitted to the rendering server to render the target model, so as to obtain new two-dimensional coordinates of the image, the new two-dimensional coordinates of the image are pushed to the terminal device through the pushing server, the terminal device utilizes the two-dimensional image data acquired before and the new two-dimensional coordinates of the image acquired at present to render a chart on a front rendering canvas, and the two-dimensional covering is rendered at a new position.
In summary, the data visualization method provided by the invention comprises the following steps: sending a first rendering instruction to a push server, so as to forward the first rendering instruction to a rendering server based on the push server; receiving a rendering image sent by the pushing server and displaying the rendering image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server; acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command; sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server; receiving the two-dimensional image coordinates sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server.
In the data visualization method provided by the invention, a first rendering instruction is sent to a rendering server, a target model is rendered at the rendering server, a three-dimensional image, namely a rendering image, is obtained, and the rendering image is returned to be displayed; when the rendered image is clicked, two-dimensional image data are obtained from the image data server, a second rendering instruction containing a clicked object is sent to the rendering server, the rendering server converts the three-dimensional coordinates of the clicked object into two-dimensional coordinates of the image, the two-dimensional coordinates of the image are returned, and the terminal equipment can conduct chart rendering based on the two-dimensional image data and the two-dimensional coordinates of the image, so that the visualized operation of the data is realized. The invention obtains the two-dimensional coordinates of the image by carrying out image rendering on the rendering server and displaying the three-dimensional coordinates of the clicking object by the rendering server, and then carrying out chart rendering on the two-dimensional coordinates of the image by the terminal device based on the two-dimensional image data, the whole process of the terminal device does not need to carry out image rendering, and the image rendering and the coordinate conversion are realized by the rendering server, so that the hardware requirement on the terminal device is low, and meanwhile, the interactivity of the three-dimensional image is reserved; in addition, when three-dimensional image interaction is carried out, two-dimensional image data are acquired from the image data server, subsequent rendering is performed on the terminal equipment, repeated rendering is not needed by the rendering server, and the hardware requirement of the rendering server is not improved, so that the technical problem that high-quality three-dimensional images cannot be displayed on a low-performance terminal in a low-cost mode is solved.
In another embodiment, as shown in fig. 2, the data visualization method provided by the present invention includes:
step 210, receiving a first rendering instruction sent by a push server.
It will be appreciated that the method in this embodiment is applied to a rendering server, and the method is performed by the rendering server, and the method steps performed by the rendering server in the method in this embodiment correspond to the method steps performed by the terminal device in the above embodiment, and may be referred to each other.
The model management module of the rendering server stores a three-dimensional machine room model to be used, and the rendering server automatically selects and distributes proper computing resources according to the model scale to realize rendering.
And 220, rendering the target model based on the first rendering instruction to obtain a rendering image, and sending the rendering image to the push server so as to send the rendering image to a terminal device based on the push server.
It can be understood that after receiving the first rendering instruction, the rendering engine of the rendering server finds the machine room model from the model management according to the first rendering instruction, and invokes the computing resource allocated by the computing resource scheduling engine to perform real-time rendering of the image, so as to obtain a rendered image. After the rendered image is obtained, the rendered image is sent to a cache pool for caching by the rendering engine so as to be called next time, and the rendered image is sent to a pushing server so as to send a first rendering instruction to the terminal equipment through the pushing server.
Step 230, receiving a second rendering instruction including a click object sent by the push server, converting a three-dimensional coordinate of the click object into a corresponding two-dimensional image coordinate based on the second rendering instruction, and sending the two-dimensional image coordinate to the push server, so as to forward the two-dimensional image coordinate to the terminal device based on the push server;
the two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
It can be understood that the rendering engine of the rendering server converts the three-dimensional coordinates of the click object contained in the second rendering instruction into two-dimensional coordinates of the image through the matrix projection algorithm of OpenGL, the rendering server sends the two-dimensional coordinates of the converted image to the pushing server, and the two-dimensional coordinates of the image are sent to the terminal device through the pushing server so as to be used for rendering the chart by the terminal device, so that the data visualization operation is completed.
In some embodiments, the rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server includes:
under the condition that the rendering image corresponding to the first rendering instruction does not exist in a cache pool of the rendering server, rendering a target model in a rendering engine of the rendering server based on the first rendering instruction to obtain the rendering image, sending the rendering image to the cache pool for caching, and sending the rendering image to the push server;
And under the condition that the rendering image exists in the cache pool, after the rendering image is acquired from the cache pool, the rendering image is sent to the push server. It can be understood that the rendering server finds the computing resource where the model to be rendered is located after receiving the rendering instruction, searches the cache pool for the rendering image, and if the rendering image is in the cache pool, directly pushes the rendering image to the terminal device; if the rendering image does not exist in the cache pool, rendering is directly carried out in real time, the rendering image is directly pushed to the terminal equipment, and the rendering image is placed in the cache pool.
In still other embodiments, referring to fig. 3, an interaction schematic diagram of the data visualization method provided by the present invention may take smart machine room data visualization as an example, where a machine room three-dimensional model is a back-end rendering component to render a target model, and each server renders the target model in a browser through the front-end rendering component by using two-dimensional elements such as characters, diagrams, and the like for displaying real-time running conditions.
The data visualization method specifically comprises the following steps:
step 3010, a user A opens a page at a terminal device, loads a front-end rendering canvas and a rear-end image canvas, establishes a webrtc protocol communication channel with a push server for receiving a pushed image, and establishes a webrtc protocol communication channel with the push server for sending instructions.
In step 3020, the event interaction center triggers an initialization event, and issues an instruction for rendering the machine room model, i.e. a first rendering instruction.
Step 3030, the push server forwards the first rendering instruction to a rendering engine of the rendering server.
Step 3040, the rendering engine finds a machine room model from the model management according to the first rendering instruction, invokes the computing resources distributed by the computing resource scheduling engine to conduct real-time rendering of the image, and puts the rendering result, namely the rendering image, into a cache pool and pushes the rendering result to the pushing server.
Step 3050, the back-end image canvas presents the rendered image acquired from the push server to the browser through the webrtc protocol.
Step 360, the user a clicks the server identifier on the corresponding layer of the rendered image on the browser, obtains the server ID, and invokes the interface of the data service through the server ID to obtain the server data, i.e. the two-dimensional image data.
In step 3070, the user a sends a second rendering instruction containing the clicked object to a rendering engine of the rendering server while clicking the server identifier, converts the three-dimensional coordinates of the clicked object into two-dimensional coordinates through the matrix projection algorithm of OpenGL, returns the two-dimensional coordinates to a canvas of the terminal device, obtains the coordinates of the rendered image in the browser, and renders the chart on the front rendering canvas by utilizing the two-dimensional image data obtained in step 3060, thereby completing the data visualization of the image data server.
Step 3080, the user a drags the page of the terminal device, and the command of the event interaction center of the terminal device for generating the model movement (i.e. the third rendering command) is delivered to the back end for rendering, and at the same time, step 370 is repeated to render the two-dimensional overlay at the new position.
Step 3090, user B opens the same page at the terminal device, and repeats steps 2, 3, and 4, since the rendered image has been cached Chi Huancun, the image pushing service will directly obtain the image from the cache pool and push it to the layer.
Step 3010, user B clicks on another server representation on the layer, and repeats steps 3060, 3070 to complete the data visualization of another image data server.
In an embodiment, as shown in fig. 4, the present invention further provides a data visualization apparatus 400, including:
a first sending module 410, configured to send a first rendering instruction to a push server, so as to forward the first rendering instruction to a rendering server based on the push server;
the display module 420 is configured to receive the rendered image sent by the push server, and display the rendered image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server;
An obtaining module 430, configured to obtain a click command when the rendered image is clicked, and obtain corresponding two-dimensional image data from an image data server based on the click command;
a second sending module 440, configured to send a second rendering instruction including the clicked object to the push server, so as to send the second rendering instruction to the rendering server based on the push server;
the rendering module 450 is configured to receive the two-dimensional coordinates of the image sent by the push server, and perform graph rendering based on the two-dimensional image data and the two-dimensional coordinates of the image; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server.
In other embodiments, the present invention provides a data visualization apparatus 500, comprising:
a receiving module 510, configured to receive a first rendering instruction sent by a push server;
the rendering module 520 is configured to render the target model based on the first rendering instruction to obtain a rendered image, and send the rendered image to the push server, so that the rendered image is sent to a terminal device based on the push server;
The coordinate determining module 530 is configured to receive a second rendering instruction including a click object sent by the push server, convert, based on the second rendering instruction, a three-dimensional coordinate of the click object into a corresponding two-dimensional image coordinate, and send the two-dimensional image coordinate to the push server, so as to forward, based on the push server, the two-dimensional image coordinate to the terminal device;
the two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
The data visualization device provided in the foregoing embodiment may implement the technical solution described in the foregoing data visualization method embodiment, and the specific implementation principle of each module or unit may refer to the corresponding content in the foregoing data visualization method embodiment, which is not described herein again.
As shown in fig. 6, the present invention further provides an electronic device 600 accordingly. The electronic device 600 comprises a processor 601, a memory 602 and a display 603. Fig. 6 shows only a portion of the components of the electronic device 600, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead.
The memory 602 may be an internal storage unit of the electronic device 600 in some embodiments, such as a hard disk or memory of the electronic device 600. The memory 602 may also be an external storage device of the electronic device 600 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 600.
Further, the memory 602 may also include both internal storage units and external storage devices of the electronic device 600. The memory 602 is used for storing application software and various types of data for installing the electronic device 600.
The processor 601 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for executing program code or processing data stored in the memory 602, such as the data visualization method of the present invention.
The display 603 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like in some embodiments. The display 603 is used for displaying information at the electronic device 600 and for displaying a visual user interface. The components 601-603 of the electronic device 600 communicate with each other via a system bus.
In some embodiments of the present invention, when the processor 601 executes the front-to-back end hybrid rendered data visualization program in the memory 602, the following steps may be implemented:
sending a first rendering instruction to a push server, so as to forward the first rendering instruction to a rendering server based on the push server;
Receiving a rendering image sent by the pushing server and displaying the rendering image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server;
acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command;
sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server;
receiving the two-dimensional image coordinates sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server;
alternatively, it includes:
receiving a first rendering instruction sent by a push server;
rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server so as to send the rendered image to a terminal device based on the push server;
Receiving a second rendering instruction which is sent by the pushing server and contains a click object, converting the three-dimensional coordinate of the click object into a corresponding image two-dimensional coordinate based on the second rendering instruction, and sending the image two-dimensional coordinate to the pushing server so as to forward the image two-dimensional coordinate to the terminal equipment based on the pushing server;
the two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
It should be understood that: the processor 601 may perform other functions in addition to the above functions when executing the front-to-back end hybrid rendered data visualization program in the memory 602, see in particular the description of the corresponding method embodiments above.
Further, the type of the electronic device 600 is not particularly limited, and the electronic device 600 may be a mobile phone, a tablet computer, a personal digital assistant (personal digitalassistant, PDA), a wearable device, a laptop (laptop), or other portable electronic devices. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices that carry IOS, android, microsoft or other operating systems. The portable electronic device described above may also be other portable electronic devices, such as a laptop computer (laptop) or the like having a touch-sensitive surface, e.g. a touch panel. It should also be appreciated that in other embodiments of the invention, the electronic device 600 may not be a portable electronic device, but rather a desktop computer having a touch-sensitive surface (e.g., a touch panel).
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a data visualization method provided by the above methods, the method comprising:
sending a first rendering instruction to a push server, so as to forward the first rendering instruction to a rendering server based on the push server;
receiving a rendering image sent by the pushing server and displaying the rendering image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server;
acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command;
sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server;
receiving the two-dimensional image coordinates sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server;
Alternatively, it includes:
receiving a first rendering instruction sent by a push server;
rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server so as to send the rendered image to a terminal device based on the push server;
receiving a second rendering instruction which is sent by the pushing server and contains a click object, converting the three-dimensional coordinate of the click object into a corresponding image two-dimensional coordinate based on the second rendering instruction, and sending the image two-dimensional coordinate to the pushing server so as to forward the image two-dimensional coordinate to the terminal equipment based on the pushing server;
the two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
Those skilled in the art will appreciate that all or part of the flow of the methods of the embodiments described above may be accomplished by way of a computer program that instructs associated hardware, and that the program may be stored in a computer readable storage medium. The computer readable storage medium is a magnetic disk, an optical disk, a read-only memory or a random access memory.
The data visualization method, device and electronic equipment provided by the invention are described in detail, and specific examples are applied to illustrate the principle and implementation of the invention, and the description of the examples is only used for helping to understand the method and core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present invention, the present description should not be construed as limiting the present invention.

Claims (10)

1. A method of visualizing data, comprising:
sending a first rendering instruction to a push server, so as to forward the first rendering instruction to a rendering server based on the push server;
receiving a rendering image sent by the pushing server and displaying the rendering image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server;
acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command;
sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server;
receiving the two-dimensional image coordinates sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server.
2. The data visualization method of claim 1, further comprising:
before the first rendering instruction is sent to the pushing server, a webtc protocol communication channel is established between terminal equipment and the pushing server, so that the first rendering instruction and the second rendering instruction are sent to the pushing server from the terminal equipment based on the webtc protocol communication channel, and the rendered image and the two-dimensional coordinates of the image sent by the pushing server are received.
3. The method of claim 1, wherein the presenting the rendered image comprises:
displaying the rendered image to a browser based on a backend image canvas;
the chart rendering based on the two-dimensional image data and the two-dimensional image coordinates comprises the following steps:
and performing chart rendering on a front-end rendering canvas based on the two-dimensional image data and the two-dimensional coordinates of the image.
4. The data visualization method according to claim 1, wherein the two-dimensional coordinates of the image are obtained by converting three-dimensional coordinates of the click object by the rendering server based on a matrix projection algorithm.
5. The method of visualizing data of any one of claims 1-4, further comprising:
transmitting a third rendering instruction containing a drag object to the push server under the condition that an image drag instruction is received, so as to transmit the third rendering instruction to the rendering server based on the push server;
receiving new two-dimensional coordinates of the image sent by the pushing server, and performing chart rendering based on the two-dimensional image data and the new two-dimensional coordinates of the image; the new two-dimensional coordinates of the image are obtained by converting the three-dimensional coordinates of the dragging object by the rendering server based on the third rendering instruction and are sent to the pushing server.
6. A method of visualizing data, comprising:
receiving a first rendering instruction sent by a push server;
rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server so as to send the rendered image to a terminal device based on the push server;
receiving a second rendering instruction which is sent by the pushing server and contains a click object, converting the three-dimensional coordinate of the click object into a corresponding image two-dimensional coordinate based on the second rendering instruction, and sending the image two-dimensional coordinate to the pushing server so as to forward the image two-dimensional coordinate to the terminal equipment based on the pushing server;
The two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
7. The method of data visualization according to claim 6, wherein the rendering the object model based on the first rendering instruction results in a rendered image, and transmitting the rendered image to the push server, comprises:
under the condition that the rendering image corresponding to the first rendering instruction does not exist in a cache pool of the rendering server, rendering a target model in a rendering engine of the rendering server based on the first rendering instruction to obtain the rendering image, sending the rendering image to the cache pool for caching, and sending the rendering image to the push server;
and under the condition that the rendering image exists in the cache pool, after the rendering image is acquired from the cache pool, the rendering image is sent to the push server.
8. A data visualization apparatus, comprising:
the first sending module is used for sending a first rendering instruction to the push server so as to forward the first rendering instruction to the rendering server based on the push server;
The display module is used for receiving the rendering image sent by the pushing server and displaying the rendering image; the rendering image is a three-dimensional image which is obtained by rendering the target model by the rendering server based on the first rendering instruction and is sent to the pushing server;
the acquisition module is used for acquiring a click command under the condition that the rendered image is clicked, and acquiring corresponding two-dimensional image data from an image data server based on the click command;
the second sending module is used for sending a second rendering instruction containing the clicked object to the pushing server so as to send the second rendering instruction to the rendering server based on the pushing server;
the rendering module is used for receiving the two-dimensional image coordinates sent by the pushing server and performing chart rendering based on the two-dimensional image data and the two-dimensional image coordinates; the two-dimensional image coordinates are obtained by converting the three-dimensional coordinates of the click object by the rendering server based on the second rendering instruction and are sent to the pushing server.
9. A data visualization apparatus, comprising:
The receiving module is used for receiving a first rendering instruction sent by the push server;
the rendering module is used for rendering the target model based on the first rendering instruction to obtain a rendered image, and sending the rendered image to the push server so as to send the rendered image to a terminal device based on the push server;
the coordinate determining module is used for receiving a second rendering instruction which is sent by the pushing server and contains the click object, converting the three-dimensional coordinate of the click object into a corresponding image two-dimensional coordinate based on the second rendering instruction, and sending the image two-dimensional coordinate to the pushing server so as to forward the image two-dimensional coordinate to the terminal equipment based on the pushing server;
the two-dimensional coordinates of the image are used for the terminal equipment to conduct chart rendering.
10. An electronic device comprising a memory and a processor, wherein,
the memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory to implement the steps in the data visualization method of any of the above claims 1 to 7.
CN202211674675.5A 2022-12-26 2022-12-26 Data visualization method and device and electronic equipment Pending CN116206031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211674675.5A CN116206031A (en) 2022-12-26 2022-12-26 Data visualization method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211674675.5A CN116206031A (en) 2022-12-26 2022-12-26 Data visualization method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116206031A true CN116206031A (en) 2023-06-02

Family

ID=86512084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211674675.5A Pending CN116206031A (en) 2022-12-26 2022-12-26 Data visualization method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116206031A (en)

Similar Documents

Publication Publication Date Title
AU2020201699B2 (en) Reducing latency in map interfaces
JP2018066995A (en) Rendering map images using modifications of non-raster map data
CN110572591B (en) KVM (keyboard, video and mouse) agent system signal source preview system and method
CN105321142B (en) Sampling, mistake manages and/or the context switching carried out via assembly line is calculated
CN103679813B (en) The construction method of three-dimensional digital earth and three-dimensional digital earth system
CN109920056B (en) Building rendering method, device, equipment and medium
CN103677970A (en) System and method for achieving combination display of terminal local desktop and far-end virtual desktop
CN104065953B (en) The method and device controlled based on the visualization display of display device multi views
CN108074210B (en) Object acquisition system and method for cloud rendering
CN103778591A (en) Method and system for processing graphic operation load balance
CN109445760B (en) Image rendering method and system
CN108335342B (en) Method, apparatus and computer program product for multi-person drawing on a web browser
CN102546793A (en) Self-adaption method and system of mobile terminal based on cloud computing
CN113590878A (en) Method and device for planning path on video picture and terminal equipment
Grimstead et al. Automatic distribution of rendering workloads in a grid enabled collaborative visualization environment
CN112614210B (en) Engineering drawing display method, system and related device
CN116206031A (en) Data visualization method and device and electronic equipment
CN111752619A (en) Image processing method and system
CN109933735A (en) Dispatching method, webpage rendering method, Webpage display process and its equipment
CN107766436A (en) A kind of address correlation data processing method, user terminal and server
CN109144453A (en) Massive information high-resolution collaborative work cloud platform based on parallel computation
CN107896251A (en) A kind of cloud computing system applied to enterprise
CN110750316A (en) Method for processing internal task or input event and application program architecture system
US20230119741A1 (en) Picture annotation method, apparatus, electronic device, and storage medium
CN117788609A (en) Method, device, equipment and storage medium for picking up interface graphic elements

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