CN111581233B - Real-time slicing method for vector graphic data of power grid equipment and storage medium - Google Patents

Real-time slicing method for vector graphic data of power grid equipment and storage medium Download PDF

Info

Publication number
CN111581233B
CN111581233B CN202010375564.9A CN202010375564A CN111581233B CN 111581233 B CN111581233 B CN 111581233B CN 202010375564 A CN202010375564 A CN 202010375564A CN 111581233 B CN111581233 B CN 111581233B
Authority
CN
China
Prior art keywords
power grid
data
grid equipment
drawing data
configuration scheme
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010375564.9A
Other languages
Chinese (zh)
Other versions
CN111581233A (en
Inventor
苗璐
杨诚
易杨
龙霏
林建熙
夏伟
李志坚
蔡文婷
孙刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Electric Power Dispatch Control Center of Guangdong Power Grid Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
Electric Power Dispatch Control Center of Guangdong Power Grid 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 Southern Power Grid Digital Grid Research Institute Co Ltd, Electric Power Dispatch Control Center of Guangdong Power Grid Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202010375564.9A priority Critical patent/CN111581233B/en
Publication of CN111581233A publication Critical patent/CN111581233A/en
Application granted granted Critical
Publication of CN111581233B publication Critical patent/CN111581233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Computational Linguistics (AREA)
  • Water Supply & Treatment (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Physics (AREA)
  • Public Health (AREA)
  • Remote Sensing (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a real-time slicing method and a storage medium for vector graphic data of power grid equipment, wherein the method comprises the following steps: the method comprises the steps that a server side obtains drawing data and a graph rendering configuration table of power grid equipment and loads the drawing data and the graph rendering configuration table to a memory; receiving a data query request sent by a front end, wherein the data query request comprises a coordinate range, a device type and a user-defined condition; inquiring drawing data of the corresponding power grid equipment according to the data inquiry request; calculating a scale according to the coordinate range and the size of the drawing interface at the front end; according to the scale and the equipment type, acquiring a configuration scheme of the corresponding power grid equipment from the graphic rendering configuration table; the drawing data and the configuration scheme of the corresponding power grid equipment are returned to the front end; and the front end draws the power grid equipment on a drawing interface according to the returned drawing data and the configuration scheme of the power grid equipment. The invention can improve the system performance of graphic inquiry and rendering.

Description

Real-time slicing method for vector graphic data of power grid equipment and storage medium
Technical Field
The invention relates to the technical field of graphic data processing, in particular to a real-time slicing method and a storage medium of vector graphic data of power grid equipment.
Background
At present, the access and rendering of graphic data are mainly divided into two modes, one is that the data is tiled in advance and processed into a file format, and the file is directly acquired during access; the other is to directly access the structured data by the front end, where the data is processed and rendered. The first mode is generally used for applications such as electronic maps which do not need frequent updating, and meanwhile, the defects that a large amount of early tile processing work is needed exist; the second mode is generally used for applications requiring frequent data update, such as industry graphic display, and has the disadvantage of lower performance.
The second mode is usually adopted for displaying the power grid equipment graph, and although the optimization processing can be performed on the application level, the second mode is still limited by the architecture, and the requirements of high performance and real-time updating cannot be met.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: the real-time slicing method and the storage medium for the vector graphic data of the power grid equipment are provided, and the system performance of graphic query and rendering can be improved.
In order to solve the technical problems, the invention adopts the following technical scheme: a real-time slicing method for vector graphics data of power grid equipment, comprising:
the method comprises the steps that a server side obtains drawing data of power grid equipment and loads the drawing data into a memory, wherein the drawing data comprise coordinate data and preset attribute data of the power grid equipment;
acquiring a preset graphic rendering configuration table, and loading the graphic rendering configuration table into a memory, wherein the graphic rendering configuration table stores the association relation among the equipment type, the scale range and the graphic rendering configuration scheme, and the graphic rendering configuration scheme comprises whether to display, icon, color and size;
receiving a data query request sent by a front end, wherein the data query request comprises a coordinate range, a device type and a user-defined condition;
inquiring drawing data of corresponding power grid equipment according to the data inquiry request;
calculating a scale according to the coordinate range and the size of the drawing interface at the front end;
acquiring a configuration scheme of the corresponding power grid equipment from the graphic rendering configuration table according to the scale and the equipment type;
returning the drawing data and the configuration scheme of the corresponding power grid equipment to the front end;
and the front end draws the power grid equipment on a drawing interface according to the returned drawing data and the configuration scheme of the power grid equipment.
The invention also relates to a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps as described above.
The invention has the beneficial effects that: by caching the drawing data and the graphic rendering configuration table of the power grid equipment in the memory of the server, and carrying out data retrieval in the memory of the server, the characteristics of large memory, multiple CPUs, multiple cores and the like provided by the computer hardware technology are fully utilized, and the capability of real-time slicing is achieved. According to the invention, through the memory caching technology of the server, the system performance of graphic inquiry and rendering is greatly improved, and the work efficiency and the work quality of power grid equipment management are improved.
Drawings
Fig. 1 is a flowchart of a real-time slicing method of vector graphics data of a power grid device according to a first embodiment of the present invention.
Detailed Description
In order to describe the technical contents, the achieved objects and effects of the present invention in detail, the following description will be made with reference to the embodiments in conjunction with the accompanying drawings.
The most critical concept of the invention is as follows: and caching the power grid model and the graph in the memory of the application server, processing logic for acquiring and constructing the graph data in the memory of the server, and acquiring updated data from the database in real time to achieve the capability of real-time slicing.
Referring to fig. 1, a real-time slicing method for vector graphic data of a power grid device includes:
the method comprises the steps that a server side obtains drawing data of power grid equipment and loads the drawing data into a memory, wherein the drawing data comprise coordinate data and preset attribute data of the power grid equipment;
acquiring a preset graphic rendering configuration table, and loading the graphic rendering configuration table into a memory, wherein the graphic rendering configuration table stores the association relation among the equipment type, the scale range and the graphic rendering configuration scheme, and the graphic rendering configuration scheme comprises whether to display, icon, color and size;
receiving a data query request sent by a front end, wherein the data query request comprises a coordinate range, a device type and a user-defined condition;
inquiring drawing data of corresponding power grid equipment according to the data inquiry request;
calculating a scale according to the coordinate range and the size of the drawing interface at the front end;
acquiring a configuration scheme of the corresponding power grid equipment from the graphic rendering configuration table according to the scale and the equipment type;
returning the drawing data and the configuration scheme of the corresponding power grid equipment to the front end;
and the front end draws the power grid equipment on a drawing interface according to the returned drawing data and the configuration scheme of the power grid equipment.
From the above description, the beneficial effects of the invention are as follows: the system performance of graphic inquiry and rendering can be greatly improved, and the work efficiency and the work quality of power grid equipment management are improved.
Further, the server obtains drawing data of the power grid equipment and loads the drawing data to the memory specifically as follows:
the server establishes a long connection with the database;
the server side obtains drawing data of the power grid equipment from the database and loads the drawing data to the memory;
the server side inquires whether drawing data in the database are changed according to the preset period time;
if yes, synchronously updating the drawing data in the memory.
The above description shows that the purpose of updating the data in real time can be achieved by detecting the change condition of the data and synchronously updating the data in the memory through the long link database.
Further, the server side queries whether the drawing data in the database is changed according to the preset cycle time, specifically:
the method comprises the steps that a server side obtains and stores global numbers of a database, wherein the global numbers are used for representing data change times of the database;
the server side queries the global number of the database according to the preset period time and compares the global number with the global number stored by the server side;
if the global number stored by the server is smaller than the global number of the database, the drawing data in the database is judged to be changed, and the global number stored by the server is updated.
From the above description, it can be seen that by setting the global number to record the number of data changes, it can be quickly determined whether the data in the database is changed.
Further, the server saves the drawing data of the same type of power grid equipment to the same memory block.
As can be seen from the above description, the following searching can be performed in the corresponding memory block according to the device type in the data query request, so as to improve the query efficiency. .
Further, according to the coordinate range and the size of the drawing interface at the front end, the calculating scale is specifically:
calculating an actual distance corresponding to the maximum longitude difference value according to the longitude range in the coordinate range;
and calculating a scale according to the length of the drawing interface and the actual distance corresponding to the maximum longitude difference value.
As can be seen from the above description, according to the requested coordinate range, a corresponding scale is calculated, and then a corresponding graphic rendering configuration scheme is obtained according to the scale, so that finally, a drawing icon with a proper size can be drawn in the drawing interface.
Further, the returning the drawing data and the configuration scheme of the corresponding power grid equipment to the front end specifically includes:
packaging the drawing data and the configuration scheme of the corresponding power grid equipment into a file in a binary stream format;
compressing the file, and returning the compressed file to the front end.
Further, the front end draws the power grid equipment on a drawing interface according to the drawing data and the configuration scheme of the returned power grid equipment, specifically:
the front end decompresses the compressed file to obtain a file in a binary stream format;
decoding the file in the binary stream format to obtain drawing data and a configuration scheme of the power grid equipment corresponding to the data query request;
and drawing the power grid equipment on a drawing interface according to the drawing data and the configuration scheme of the obtained power grid equipment.
From the above description, it is apparent that the efficiency of data transmission can be improved by performing packing and compression and then transmitting.
The invention also relates to a computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps as described above.
Example 1
Referring to fig. 1, a first embodiment of the present invention is as follows: a real-time slicing method of vector graphic data of power grid equipment can be applied to a graphic display application system of the power grid equipment, and comprises the following steps:
s1: and the server acquires drawing data of the power grid equipment and loads the drawing data to the memory. Specifically, when the server is started, connection is established with a power grid database, then full graphic data of the database is read, coordinate data of power grid equipment and preset attribute data are obtained according to preset configuration information, wherein the coordinate data are longitude and latitude data, and the attribute data comprise but are not limited to equipment names, units, voltage levels and running numbers.
Preferably, the server saves the drawing data of the same type of power grid equipment to the same memory block, namely the same memory area, so that the rate of inquiring the data according to the equipment type can be improved. Since one data table in the database generally stores only data of the same type of power grid equipment, drawing data of the same type of power grid equipment can be stored into the same memory block by storing the data obtained from the same data table into the same memory area. Preferably, the coordinate data and the attribute data of each grid device are loaded into a memory object at the same time.
Preferably, the server establishes a long connection with the database. Further, the server side inquires whether the drawing data of the power grid equipment in the database are changed or not according to the preset period time, namely, whether the equipment is newly added, modified or deleted is judged, if yes, the drawing data in the memory are synchronously updated according to the data change information, and the purpose of updating the data in real time is achieved.
Preferably, in order to improve the judging efficiency, a global number StateID is set in advance for the database, and the value of the StateID is incremented by 1 each time a record is newly added, modified or deleted. When the server side obtains the drawing data initially, the server side also obtains the global number of the database, then queries the global number of the database according to the preset cycle time (such as 1 second), compares the global number with the global number stored by the server side, and if the global number stored by the server side is smaller than the global number of the database, the server side indicates that the data in the database is updated, the drawing data in the internal memory is synchronously updated, and the global number stored by the server side is updated.
S2: the method comprises the steps that a server side obtains a preset graphic rendering configuration table and loads the graphic rendering configuration table into a memory, wherein the graphic rendering configuration table stores the association relation among equipment types, scale ranges and graphic rendering configuration schemes, and the graphic rendering configuration schemes comprise whether display, icons, colors and sizes are carried out.
For example, for a power distribution tower, when the scale range is 0-1000, the corresponding graphic rendering configuration scheme is: display, icon 1, red, size 5; when the scale range is 1000-5000, the corresponding graphic rendering configuration scheme is as follows: display, icon 1, red, size 2; when the scale range is 5000-10000, the corresponding graphic rendering configuration scheme is as follows: display, icon 1, red, size 1; when the scale range is 10000 or above, the corresponding graphic rendering configuration scheme is as follows: not shown.
S3: and receiving a data query request sent by the front end, wherein the data query request comprises a coordinate range, a device type and a custom condition. Wherein the coordinate ranges may simultaneously define shapes such as rectangles, polygons, circles, etc.; the custom condition may be used to define an attribute of the grid device to be queried, for example, "the unit to which the device belongs is unit a".
S4: inquiring drawing data of corresponding power grid equipment according to the data inquiry request; the method comprises the steps of searching power grid equipment with the coordinate data in a coordinate range in the data query request in a memory of a server, wherein the equipment type is the equipment type in the data query request and meets the self-defined condition, and then obtaining memory object data, namely coordinate data and attribute data, of the power grid equipment.
Further, in step S1, the drawing data of the same type of power grid device is saved to the same memory block, so in this step, according to the device type in the data query request, the corresponding memory block may be searched to improve the query efficiency.
For example, assume that the parameters in the data query request are: the rectangular range with longitude and latitude (118.12, 24.46;118.15, 24.50), the query tower and the wire, and the self-defined condition 'the unit of equipment is unit A'. And the server side inquires the memory object of which the coordinate data is in the rectangular range and the unit of which is unit A in the memory block corresponding to the tower and the wire equipment according to the parameters.
S5: and calculating a scale according to the coordinate range and the size of the drawing interface at the front end. Specifically, calculating an actual distance corresponding to the maximum longitude difference value according to the longitude range in the coordinate range; and calculating a scale according to the length of the drawing interface and the actual distance corresponding to the maximum longitude difference value.
Namely, according to the longitude range in the coordinate range in the data query request, the maximum longitude difference value can be calculated, and then according to a conversion formula of the longitude and the actual distance (each longitude differs by one degree, and the actual ground distance differs by 111 km), the maximum longitude difference value is converted into the actual distance; and then calculating the ratio of the length of the drawing interface at the front end to the actual distance to obtain a scale.
S6: acquiring a configuration scheme of the corresponding power grid equipment from the graphic rendering configuration table according to the scale and the equipment type; the device type in the data query request and the graphic rendering configuration scheme corresponding to the scale calculated in the step S5 are queried according to the association relation of the device type, the scale range and the graphic rendering configuration scheme in the graphic rendering configuration table, so that the configuration scheme corresponding to each power grid device queried in the step S4 is determined.
Further, the drawing data and the configuration scheme of the same power grid equipment are organized and classified into the data objects of the power grid equipment, so that the drawing data and the configuration scheme of the power grid equipment can be conveniently and simultaneously acquired later.
S7: returning the drawing data and the configuration scheme of the corresponding power grid equipment to the front end; and returning the drawing data and the configuration scheme corresponding to each power grid device obtained by inquiring according to the data inquiry request to the front end.
Further, according to a preset coding format, the drawing data and the configuration scheme of the corresponding power grid equipment are coded to obtain a file in a binary stream format; then compressing the file to reduce the data size; and finally returning the compressed file to the front end.
S8: and the front end draws the power grid equipment on a drawing interface according to the returned drawing data and the configuration scheme of the power grid equipment.
Further, the front end decompresses the compressed file to obtain a file in a binary stream format; then decoding the file in the binary stream format according to a preset decoding format to obtain drawing data and a configuration scheme of the power grid equipment corresponding to the data query request; and finally, drawing the power grid equipment on a drawing interface according to the drawing data and the configuration scheme of the obtained power grid equipment.
And for the data to be rendered, the front end uses each graphic data to match the data with the configuration scheme thereof for rendering. Taking a tower as an example, drawing longitude and latitude coordinates (such as 118.12 and 24.46) of the tower on a view interface according to a configuration size (such as 5) by combining equipment icons (such as squares connecting two diagonal lines) and colors (such as red), and repeating the steps to draw all queried equipment. And after the drawing is completed, obtaining the vector graphic slice.
Further, the drawing data obtained by the server in step S1 further includes a graph Fu Bianhao (icon ID) of the power grid device, and when the configuration scheme corresponding to the calculated scale cannot be found in the graph rendering configuration table in step S6, that is, when the graph rendering configuration scheme corresponding to the scale is not configured in the graph rendering configuration table, the corresponding icon, color and size can be obtained in the relevant file according to the graph Fu Bianhao of the power grid device, that is, the corresponding rendering configuration data is obtained, and the rendering configuration data is used as the configuration scheme of the power grid device.
In actual implementation, the server may issue a REST service interface of the real-time vector slice, that is, issue a service of the real-time vector slice as the REST service interface, where the receivable parameters include a coordinate range (rectangle, polygon, circle, etc.), a device type, a query condition, and the like. Wherein the query conditions may be used for data queries. The front end transmits the request parameters through the calling interface, the server returns the query result to the front end after searching, and the front end draws the vector slice of the power grid image according to the query result.
The embodiment provides an application mode for optimizing graphic data in a framework level, fully utilizes the characteristics of large memory, multiple CPU (Central processing units), multiple cores and the like provided by a computer hardware technology, caches the power grid model and the graphics in the memory of an application server, processes logic for acquiring and constructing the graphic data in the memory of the server, acquires updated data from a database in real time, and achieves the capability of slicing in real time.
Compared with the graphic query rendering method of the power grid equipment in the prior art, the method combines the memory graphic objects and the real-time slicing, is an expanded real-time slicing method of the power grid graphics, improves the performance and effect displayed by the visual query of the power grid, can meet the requirements of graphic data read-write performance, meets the requirements of large-scale power grid data application, better supports business application, and achieves satisfactory effects in the aspect of real-time slicing of the power grid graphics. The server terminal automatically processes the request, updates the data in real time, does not need the prior data processing and continuous data operation and maintenance updating, greatly shortens the time consumption of data updating and improves the working efficiency.
Example two
The present embodiment is a computer-readable storage medium corresponding to the above embodiment, having stored thereon a computer program which, when executed by a processor, realizes the steps of:
the method comprises the steps that a server side obtains drawing data of power grid equipment and loads the drawing data into a memory, wherein the drawing data comprise coordinate data and preset attribute data of the power grid equipment;
acquiring a preset graphic rendering configuration table, and loading the graphic rendering configuration table into a memory, wherein the graphic rendering configuration table stores the association relation among the equipment type, the scale range and the graphic rendering configuration scheme, and the graphic rendering configuration scheme comprises whether to display, icon, color and size;
receiving a data query request sent by a front end, wherein the data query request comprises a coordinate range, a device type and a user-defined condition;
inquiring drawing data of corresponding power grid equipment according to the data inquiry request;
calculating a scale according to the coordinate range and the size of the drawing interface at the front end;
acquiring a configuration scheme of the corresponding power grid equipment from the graphic rendering configuration table according to the scale and the equipment type;
returning the drawing data and the configuration scheme of the corresponding power grid equipment to the front end;
and the front end draws the power grid equipment on a drawing interface according to the returned drawing data and the configuration scheme of the power grid equipment.
Further, the server obtains drawing data of the power grid equipment and loads the drawing data to the memory specifically as follows:
the server establishes a long connection with the database;
the server side obtains drawing data of the power grid equipment from the database and loads the drawing data to the memory;
the server side inquires whether drawing data in the database are changed according to the preset period time;
if yes, synchronously updating the drawing data in the memory.
Further, the server side queries whether the drawing data in the database is changed according to the preset cycle time, specifically:
the method comprises the steps that a server side obtains and stores global numbers of a database, wherein the global numbers are used for representing data change times of the database;
the server side queries the global number of the database according to the preset period time and compares the global number with the global number stored by the server side;
if the global number stored by the server is smaller than the global number of the database, the drawing data in the database is judged to be changed, and the global number stored by the server is updated.
Further, the server saves the drawing data of the same type of power grid equipment to the same memory block.
Further, according to the coordinate range and the size of the drawing interface at the front end, the calculating scale is specifically:
calculating an actual distance corresponding to the maximum longitude difference value according to the longitude range in the coordinate range;
and calculating a scale according to the length of the drawing interface and the actual distance corresponding to the maximum longitude difference value.
Further, the returning the drawing data and the configuration scheme of the corresponding power grid equipment to the front end specifically includes:
packaging the drawing data and the configuration scheme of the corresponding power grid equipment into a file in a binary stream format;
compressing the file, and returning the compressed file to the front end.
Further, the front end draws the power grid equipment on a drawing interface according to the drawing data and the configuration scheme of the returned power grid equipment, specifically:
the front end decompresses the compressed file to obtain a file in a binary stream format;
decoding the file in the binary stream format to obtain drawing data and a configuration scheme of the power grid equipment corresponding to the data query request;
and drawing the power grid equipment on a drawing interface according to the drawing data and the configuration scheme of the obtained power grid equipment.
In summary, according to the real-time slicing method and the storage medium for vector graphics data of the power grid equipment provided by the invention, the drawing data and the graphics rendering configuration table of the power grid equipment are cached in the memory of the server, and the data retrieval is performed in the memory of the server, so that the characteristics of large memory, multiple CPU (Central processing Unit) multiple cores and the like provided by the computer hardware technology are fully utilized, and the real-time slicing capability is achieved; the server can automatically process the request, update the data in real time, and do not need the prior data processing and continuous data operation and maintenance updating, thereby greatly shortening the time consumption of data updating and improving the working efficiency. According to the invention, through the memory caching technology of the server, the system performance of graphic inquiry and rendering is greatly improved, and the work efficiency and the work quality of power grid equipment management are improved.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent changes made by the specification and drawings of the present invention, or direct or indirect application in the relevant art, are included in the scope of the present invention.

Claims (8)

1. A real-time slicing method for vector graphic data of power grid equipment, which is characterized by comprising the following steps:
the method comprises the steps that a server side obtains drawing data of power grid equipment and loads the drawing data into a memory, wherein the drawing data comprise coordinate data and preset attribute data of the power grid equipment;
acquiring a preset graphic rendering configuration table, and loading the graphic rendering configuration table into a memory, wherein the graphic rendering configuration table stores the association relation among the equipment type, the scale range and the graphic rendering configuration scheme, and the graphic rendering configuration scheme comprises whether to display, icon, color and size;
receiving a data query request sent by a front end, wherein the data query request comprises a coordinate range, a device type and a user-defined condition;
inquiring drawing data of corresponding power grid equipment according to the data inquiry request;
calculating a scale according to the coordinate range and the size of the drawing interface at the front end;
acquiring a configuration scheme of the corresponding power grid equipment from the graphic rendering configuration table according to the scale and the equipment type;
returning the drawing data and the configuration scheme of the corresponding power grid equipment to the front end;
and the front end draws the power grid equipment on a drawing interface according to the returned drawing data and the configuration scheme of the power grid equipment.
2. The method for slicing vector graphics data of power grid equipment in real time according to claim 1, wherein the server obtains drawing data of the power grid equipment and loads the drawing data into a memory specifically comprises:
the server establishes a long connection with the database;
the server side obtains drawing data of the power grid equipment from the database and loads the drawing data to the memory;
the server side inquires whether drawing data in the database are changed according to the preset period time;
if yes, synchronously updating the drawing data in the memory.
3. The method for slicing vector graphics data of power grid equipment in real time according to claim 2, wherein the server queries whether the drawing data in the database is changed according to a preset cycle time, specifically:
the method comprises the steps that a server side obtains and stores global numbers of a database, wherein the global numbers are used for representing data change times of the database;
the server side queries the global number of the database according to the preset period time and compares the global number with the global number stored by the server side;
if the global number stored by the server is smaller than the global number of the database, the drawing data in the database is judged to be changed, and the global number stored by the server is updated.
4. The method for slicing vector graphics data of power grid equipment in real time according to claim 1, wherein the server side stores drawing data of the power grid equipment of the same type into the same memory block.
5. The method for real-time slicing of vector graphics data of power grid equipment according to claim 1, wherein the calculating scale is specifically as follows:
calculating an actual distance corresponding to the maximum longitude difference value according to the longitude range in the coordinate range;
and calculating a scale according to the length of the drawing interface and the actual distance corresponding to the maximum longitude difference value.
6. The method for real-time slicing of vector graphics data of a power grid device according to claim 1, wherein the returning of the drawing data and the configuration scheme of the corresponding power grid device to the front end specifically includes:
packaging the drawing data and the configuration scheme of the corresponding power grid equipment into a file in a binary stream format;
compressing the file, and returning the compressed file to the front end.
7. The method for real-time slicing of vector graphics data of a power grid device according to claim 6, wherein the front end draws the power grid device on a drawing interface according to the drawing data and the configuration scheme of the returned power grid device specifically comprises:
the front end decompresses the compressed file to obtain a file in a binary stream format;
decoding the file in the binary stream format to obtain drawing data and a configuration scheme of the power grid equipment corresponding to the data query request;
and drawing the power grid equipment on a drawing interface according to the drawing data and the configuration scheme of the obtained power grid equipment.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202010375564.9A 2020-05-07 2020-05-07 Real-time slicing method for vector graphic data of power grid equipment and storage medium Active CN111581233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010375564.9A CN111581233B (en) 2020-05-07 2020-05-07 Real-time slicing method for vector graphic data of power grid equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010375564.9A CN111581233B (en) 2020-05-07 2020-05-07 Real-time slicing method for vector graphic data of power grid equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111581233A CN111581233A (en) 2020-08-25
CN111581233B true CN111581233B (en) 2023-11-24

Family

ID=72115202

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010375564.9A Active CN111581233B (en) 2020-05-07 2020-05-07 Real-time slicing method for vector graphic data of power grid equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111581233B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115952244B (en) * 2022-08-08 2023-12-01 中国城市规划设计研究院 On-line loading method, device and medium for vector slicing service in drawing software
CN117893637A (en) * 2024-03-15 2024-04-16 杭州广立微电子股份有限公司 Data processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468691A (en) * 2015-11-17 2016-04-06 江苏省基础地理信息中心 Multisource tile map acquiring method and device
CN106934058A (en) * 2017-03-22 2017-07-07 武汉中地数码科技有限公司 Vector data read method and system, vector data method for visualizing and system
CN107133272A (en) * 2017-04-07 2017-09-05 南京南瑞集团公司 A kind of Web ends magnanimity power network resources GIS data dynamic dispatching and rendering intent
CN107423445A (en) * 2017-08-10 2017-12-01 腾讯科技(深圳)有限公司 A kind of map data processing method, device and storage medium
CN110399441A (en) * 2019-07-04 2019-11-01 佳都新太科技股份有限公司 A kind of massive point data aggregate rendering method, device, equipment and storage medium
CN110795195A (en) * 2019-10-31 2020-02-14 百度在线网络技术(北京)有限公司 Webpage rendering method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468691A (en) * 2015-11-17 2016-04-06 江苏省基础地理信息中心 Multisource tile map acquiring method and device
CN106934058A (en) * 2017-03-22 2017-07-07 武汉中地数码科技有限公司 Vector data read method and system, vector data method for visualizing and system
CN107133272A (en) * 2017-04-07 2017-09-05 南京南瑞集团公司 A kind of Web ends magnanimity power network resources GIS data dynamic dispatching and rendering intent
CN107423445A (en) * 2017-08-10 2017-12-01 腾讯科技(深圳)有限公司 A kind of map data processing method, device and storage medium
CN110399441A (en) * 2019-07-04 2019-11-01 佳都新太科技股份有限公司 A kind of massive point data aggregate rendering method, device, equipment and storage medium
CN110795195A (en) * 2019-10-31 2020-02-14 百度在线网络技术(北京)有限公司 Webpage rendering method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
程伟 等."Web端海量电网资源GIS数据动态调度与渲染方法.《计算机系统应用》.2018,第27卷(第2期),第138-143页. *

Also Published As

Publication number Publication date
CN111581233A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111581233B (en) Real-time slicing method for vector graphic data of power grid equipment and storage medium
CN111090657B (en) Automatic updating and instant service system for vector tiles
CN110597900B (en) Method for generating vector slice by GDB data in real time according to needs
CN112115534A (en) Method for converting three-dimensional house model into two-dimensional vector plane with height attribute
CN101568065A (en) Intelligent terminal call system and method for downloading electronic map
CN103915033A (en) Method and apparatus for rendering map, and mobile terminal
CN112650782B (en) Big data geographic information visualization method, system and storage medium
CN112948439A (en) Method, device, medium and equipment for processing GIS data query request in real time
US20240087228A1 (en) Method for scheduling and displaying three-dimensional annotations
CN111222301A (en) 3D character drawing method, system, readable storage medium and device
CN106649882A (en) Spatial data management middleware applied to telecom field and implementation method thereof
CN111339599B (en) Conversion method from BIM model to GIS model
CN110580273A (en) map GIS data processing and storing method and device and readable storage medium
CN115761130A (en) Three-dimensional scene rapid construction method and device, electronic equipment and storage medium
CN103677930B (en) Based on GIS data loading method and the device of spelling wall system
CN111125237B (en) NoSql database-based dynamic mapping method for weather numerical forecast products
CN112115226B (en) Map rendering method and map rendering device
CN110689608B (en) Three-dimensional display method and system for digital power grid
CN102508888B (en) File compression storage and indexing method for improving map access efficiency
CN114416796A (en) Tile generation method, device, equipment and storage medium
CN112669426B (en) Three-dimensional geographic information model rendering method and system based on generation countermeasure network
CN111243092B (en) Three-dimensional visualization system suitable for intelligent power community
CN110990515A (en) Power grid graph browsing method, system, device, computer equipment and storage medium
CN114328769A (en) WebGL-based Beidou grid drawing method and device
CN110347950A (en) A kind of display methods and system of mobile terminal web map

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant