CN117472491A - Map rendering method, system, medium and electronic device for pipeline data - Google Patents

Map rendering method, system, medium and electronic device for pipeline data Download PDF

Info

Publication number
CN117472491A
CN117472491A CN202311279178.XA CN202311279178A CN117472491A CN 117472491 A CN117472491 A CN 117472491A CN 202311279178 A CN202311279178 A CN 202311279178A CN 117472491 A CN117472491 A CN 117472491A
Authority
CN
China
Prior art keywords
data
data interval
pipeline
interval
rendering
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
CN202311279178.XA
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.)
Goldcard Smart Group Co Ltd
Original Assignee
Goldcard Smart Group 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 Goldcard Smart Group Co Ltd filed Critical Goldcard Smart Group Co Ltd
Priority to CN202311279178.XA priority Critical patent/CN117472491A/en
Publication of CN117472491A publication Critical patent/CN117472491A/en
Pending legal-status Critical Current

Links

Classifications

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

Landscapes

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

Abstract

The application discloses a map rendering method, a system, a medium and electronic equipment of pipeline data, wherein the method comprises the following steps: when the historical data interval is not stored locally, creating an array to be tested, wherein the array to be tested comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups; simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval; and rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered. According to the method and the device for rendering the pipeline data, the average rendering time of each alternative data interval is simulated to determine the optimal data interval in the plurality of alternative data intervals, the optimal data interval corresponds to the shortest average rendering time, and the data result support exists, so that the optimal effect can be realized by data packet rendering, the time required by page rendering is effectively shortened, and the rendering efficiency of the pipeline data is improved.

Description

Map rendering method, system, medium and electronic device for pipeline data
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a map rendering method, a system, a medium, and an electronic device for pipeline data.
Background
In the modern industry, a water pipe network and a gas pipe network are respectively responsible for the transmission of liquid and gas media; wherein, the pipeline data rendering of the water pipe network and the gas pipe network is an indispensable function in a pipeline system, and the operations related to the pipeline data rendering comprise moving, splitting, merging and the like.
At present, the rendering mode is that a map related function interface provided by a third party is used for generating a segment of line segments, and then the generated line segments are further operated, but at present, as the complexity of pipelines is higher and higher, the number of the pipelines is larger and larger, the rendering mode can cause rendering to be slower or blocked, so that the rendering efficiency of pipeline data is reduced.
Disclosure of Invention
The embodiment of the application provides a map rendering method, a map rendering system, a map rendering medium and electronic equipment for pipeline data. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the present application provides a map rendering method for pipeline data, where the method includes:
under the condition that no historical data interval is stored locally, creating an array to be tested, wherein the array to be tested comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups;
simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval;
and rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered.
Optionally, creating the array to be tested includes:
determining the data volume of pipeline data to be rendered;
calculating the optimal group number according to the data volume of the pipeline data to be rendered;
taking the ratio of the data volume of the pipeline data to be rendered to the optimal group number as the optimal group distance;
generating a plurality of alternative data intervals according to the optimal group distance and the preset number of elements;
and packaging the plurality of alternative data intervals into an array to be tested.
Optionally, simulating an average rendering duration of each candidate data interval according to the pipeline data to be rendered, including:
acquiring the number of rendering times predefined for each alternative data interval;
according to the pipeline data to be rendered, calculating the total page rendering time length of each alternative data interval;
and calculating the average rendering time length of each alternative data interval based on the page rendering total time length of each alternative data interval and the rendering times corresponding to each alternative data interval.
Optionally, calculating a total page rendering duration of each candidate data interval according to pipeline data to be rendered, including:
traversing each alternative data interval, and taking the traversed alternative data interval as a target data interval;
judging whether the array length of the target array is 0; the target array is used for storing the mapping relation between the data interval and the total rendering duration;
if so, dividing pipeline data to be rendered according to the target data interval to obtain a plurality of groups of pipeline data; if not, updating the target data interval, and dividing the pipeline data to be rendered according to the updated data interval to obtain a plurality of groups of pipeline data;
calculating the total page rendering time length of the target data interval based on the multiple groups of pipeline data;
and under the condition that all the alternate data intervals are traversed, taking the total page rendering time length of each target data interval as the total page rendering time length of each alternate data interval.
Optionally, updating the target data interval includes:
judging whether the array length corresponding to the last element in the target array is equal to the rendering times corresponding to the target data interval;
if so, determining a next alternative data interval of the target data interval in the plurality of alternative data intervals; replacing the target data interval with the determined next alternative data interval to obtain an updated data interval;
if not, replacing the target data interval with the array length corresponding to the last element in the target array to obtain the updated data interval.
Optionally, calculating the total page rendering duration of the target data interval based on the multiple sets of pipeline data includes:
constructing pipelines corresponding to each group of pipeline data one by one on a map, and generating pipelines of each group of pipeline data;
counting the corresponding generation time length of pipelines of each group of pipeline data to obtain a plurality of time lengths;
and summing the multiple durations to obtain the total page rendering duration of the target data interval.
Optionally, the method further comprises:
under the condition that the historical data interval is locally stored, acquiring the historical data quantity corresponding to the data interval;
calculating a difference value between the data quantity of the pipeline data to be rendered and the historical data quantity;
calculating the absolute value of the ratio of the difference value to the historical data quantity to obtain a judgment value;
taking the data interval as an optimal data interval under the condition that the judging value is smaller than a preset threshold value; or under the condition that the judging value is larger than or equal to the preset threshold value, continuing to execute the step of creating the array to be tested so as to determine the optimal data interval.
In a second aspect, an embodiment of the present application provides a map rendering system for pipeline data, the system including:
the system comprises a creation module, a test module and a test module, wherein the creation module is used for creating a test array to be tested under the condition that the historical data interval is not stored locally, and the test array to be tested comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups;
the determining module is used for simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval;
and the rendering module is used for rendering the pipeline information on the map according to the optimal data interval and the pipeline data to be rendered.
In a third aspect, embodiments of the present application provide a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, embodiments of the present application provide an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps described above.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
in the embodiment of the application, when a map rendering system of pipeline data does not store a historical data interval locally, a to-be-tested array is created, and the to-be-tested array comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups; then simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval; and finally, rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered. According to the method and the device for rendering the pipeline data, the average rendering time of each alternative data interval is simulated to determine the optimal data interval in the plurality of alternative data intervals, the optimal data interval corresponds to the shortest average rendering time, and the data result support exists, so that the optimal effect can be realized by data packet rendering, the time required by page rendering is effectively shortened, and the rendering efficiency of the pipeline data is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a flow chart of a map rendering method of pipeline data according to an embodiment of the present application;
FIG. 2 is a process schematic block diagram of a pipeline data preprocessing process provided in an embodiment of the present application;
FIG. 3 is a schematic block diagram of a process for optimal data interval screening according to an embodiment of the present application;
FIG. 4 is a schematic block diagram of a process for performing simulated rendering for each alternative data interval provided by an embodiment of the present application;
FIG. 5 is a process schematic block diagram of a map rendering process for pipeline data provided by an embodiment of the present application;
fig. 6 is a schematic structural diagram of a map rendering system for pipeline data according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description and the drawings illustrate specific embodiments of the application sufficiently to enable those skilled in the art to practice them.
It should be understood that the described embodiments are merely some, but not all, of the embodiments of the present application. All other embodiments, based on the embodiments herein, which would be apparent to one of ordinary skill in the art without making any inventive effort, are intended to be within the scope of the present application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of systems and methods that are consistent with aspects of the present application, as detailed in the accompanying claims.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the terms in this application will be understood by those of ordinary skill in the art in a specific context. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The application provides a map rendering method, a map rendering system, a map rendering medium and electronic equipment for pipeline data, so as to solve the problems in the related technical problems. According to the technical scheme, the average rendering time of each alternative data interval is simulated to determine the optimal data interval among the plurality of alternative data intervals, the optimal data interval corresponds to the shortest average rendering time and has data result support, so that the optimal effect of data packet rendering can be realized, the time required by page rendering is effectively shortened, the rendering efficiency of pipeline data is improved, and the method and the device are described in detail by adopting an exemplary embodiment.
The map rendering method of pipeline data according to the embodiment of the present application will be described in detail with reference to fig. 1 to 5. The method may be implemented in dependence on a computer program, and may be run on a map rendering system based on pipeline data of a von neumann system. The computer program may be integrated in the application or may run as a stand-alone tool class application.
Referring to fig. 1, a flowchart of a map rendering method of pipeline data is provided in an embodiment of the present application. As shown in fig. 1, the method of the embodiment of the present application may include the following steps:
s101, under the condition that historical data intervals are not stored locally, creating an array to be tested, wherein the array to be tested comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups;
the array to be tested consists of a plurality of elements, wherein the plurality of elements are a plurality of alternative data intervals; the data interval is the data volume of each group, for example, 100 pieces of pipeline data are provided, each 5 pieces are rendered into one group, and 20 groups can be provided, and the data interval is 5; the pipeline data may be gas pipeline data or other pipeline data.
In the embodiment of the application, when an array to be tested is created, firstly determining the data quantity of pipeline data to be rendered; then calculating the optimal group number according to the data volume of the pipeline data to be rendered; secondly, taking the ratio of the data volume of the pipeline data to be rendered to the optimal group number as an optimal group distance; generating a plurality of alternative data intervals according to the optimal group distance and the preset number of elements; and finally, packaging the plurality of alternative data intervals into an array to be tested. For example, the Array under test Array array= [ G1, G2,..g10 ], G1-G10 is 10 alternative data intervals.
Specifically, the optimal group number under the current magnitude can be calculated according to a preset formula, namely, the current optimal group number K=1+3.3log (N≡2/100), wherein N is the data size of the current pipeline data; assuming an optimal group spacing g5=n/K, defining g1=g5/10, g10=g5×10; finally, according to the difference between G1-G5 and G5-G10, other elements such as G2=G1+ (G5-G1)/3 can be calculated in sequence.
In one possible implementation, the data interval identifier and the data volume identifier in the local memory are first acquired, and if the value indicated by the data interval identifier is null, an array to be tested needs to be created at this time.
In another possible implementation manner, if the value indicated by the data interval identifier is not null, that is, if the historical data interval is stored locally, firstly, the historical data amount corresponding to the data interval is obtained; then calculating the difference value between the data quantity of the pipeline data to be rendered and the historical data quantity; calculating the absolute value of the ratio of the difference value to the historical data quantity to obtain a judgment value; finally, taking the data interval as an optimal data interval under the condition that the judging value is smaller than a preset threshold value; or under the condition that the judging value is larger than or equal to the preset threshold value, continuing to execute the step of creating the array to be tested so as to determine the optimal data interval.
It should be noted that, the preset threshold is set according to an actual application scenario, and in this embodiment, 0.5 is preferred.
Specifically, the preset threshold value is 0.5, the historical data amount can be obtained through the data amount identification, whether the ratio of the current data amount N to the historical data amount NG of the historical record is in a controllable range (I (N-NG)/NG I < 0.5) is judged, and if yes, the stored historical data interval is directly output as a result.
Further, before creating an array to be tested, firstly introducing a library in which a map is located, creating a unique page element according to the library, calling a map method through the page element to generate a map object, and waiting for subsequent rendering; then, obtaining pipeline data for preprocessing, namely storing the pipeline data to be rendered, wherein the data preprocessing is as shown in fig. 2, firstly, the pipeline data is requested from a server by using a request frame, the data is subjected to de-duplication operation by a data processor, isolated points (isolated points cannot form lines) and pipeline data which do not accord with protocol mean values are filtered by a filter, and the final data is stored; the deduplication can be determined based on the pipeline identification, or the starting point and the end point of the pipeline are judged to be deduplicated, and the starting points are identical and are the repeated pipelines; isolated points are pipeline data with only a start point or an end point; a similar constraint exists for pipe data for mean value protocols, e.g., starting point distances exceeding 10 km, representing anomalies in this pipe data that need to be filtered out.
S102, simulating the average rendering time length of each alternative data interval according to pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as an optimal data interval;
in the embodiment of the application, when simulating the average rendering duration of each alternative data interval according to pipeline data to be rendered, firstly, obtaining the pre-defined rendering times for each alternative data interval; then, according to pipeline data to be rendered, calculating the total page rendering time length of each alternative data interval; and finally, calculating the average rendering time of each alternative data interval based on the total page rendering time of each alternative data interval and the rendering times corresponding to each alternative data interval.
Further, the average rendering time length of each candidate data interval may be ordered, and the candidate data interval corresponding to the shortest average rendering time length may be output as the optimal data interval.
For example, as shown in fig. 3, fig. 3 is a schematic block diagram of a process of screening an optimal data interval provided in the present application, firstly, an array interval factor GAP (hereinafter referred to as G) and a corresponding activity level NG in a local memory are obtained, and whether the local memory records G is determined; if yes, judging whether the ratio of the current data quantity N to the historical data quantity NG of the historical record is in a controllable range (| (N-NG)/NG| < 0.5), and if yes, directly outputting the stored historical data interval as a result. If not, generating an Array to be tested array= [ G1, G2... Sub.G10 ], wherein G1-G10 are 10 alternative data intervals, and calculating the optimal group number under the current magnitude according to a preset formula, namely, the current optimal group number K=1+3.3log (N≡2/100), wherein N is the data size of the current pipeline data; assuming an optimal group spacing g5=n/K, defining g1=g5/10, g10=g5×10; finally, according to the difference between G1-G5 and G5-G10, other elements such as G2=G1+ (G5-G1)/3 can be calculated in sequence; and defining the Number of times Number of each group of the required full test, calculating the total page rendering time length T corresponding to each data interval, recording in a local memory, recording corresponding G value and N value in the local memory, finally calculating the average time length of each data interval, sequencing, and outputting the alternative data interval G corresponding to the shortest average rendering time length as the optimal data interval.
Specifically, when calculating the total page rendering duration of each alternative data interval according to pipeline data to be rendered, firstly traversing each alternative data interval, and taking the traversed alternative data interval as a target data interval; then judging whether the array length of the target array is 0; the target array is used for storing the mapping relation between the data interval and the total rendering duration; if so, dividing pipeline data to be rendered according to the target data interval to obtain a plurality of groups of pipeline data; if not, updating the target data interval, and dividing the pipeline data to be rendered according to the updated data interval to obtain a plurality of groups of pipeline data; secondly, calculating the total page rendering time length of the target data interval based on a plurality of groups of pipeline data; and finally, under the condition that all the alternate data intervals are traversed, taking the total page rendering time length of each target data interval as the total page rendering time length of each alternate data interval.
Specifically, when updating the target data interval, it is required to determine whether the array length corresponding to the last element in the target array is equal to the rendering number corresponding to the target data interval; if so, determining a next alternative data interval of the target data interval in the plurality of alternative data intervals; replacing the target data interval with the determined next alternative data interval to obtain an updated data interval; if not, replacing the target data interval with the array length corresponding to the last element in the target array to obtain the updated data interval.
Specifically, when calculating the total page rendering time length of the target data interval based on multiple groups of pipeline data, firstly constructing pipelines corresponding to all groups of pipeline data one by one on a map to generate pipelines of all groups of pipeline data; then counting the corresponding generation time length of pipelines of each group of pipeline data to obtain a plurality of time lengths; and finally, summing the time durations to obtain the total page rendering time duration of the target data interval.
Further, when the corresponding generation time of the pipeline of each group of pipeline data is counted, the current time is firstly obtained and recorded when each group of data starts to execute rendering, the current time is obtained and recorded after execution is finished, the difference value is a group of data rendering time, and the sum of all rendering times after execution of all current data packets is finished is used as the rendering time corresponding to the current data interval.
For example, the data size of the pipeline data is 10000, the data interval is 50, the execution times are 10, when 10000 data are divided into a group of 50 pieces, the sum of rendering time of each page of 10 times of rendering is recorded, and thus when the data interval is 50, the rendering time of the page is 2min; at this time, when the data interval is 100, 10000 pieces of data are divided into a group of 100 pieces, the sum of rendering time of each page is 10 times, so that when the data interval is 100, the rendering time of the page is 1 minute and 30 seconds, for example, and when the data interval is 100, the page is rendered faster.
For example, as shown in fig. 4, fig. 4 is a schematic block diagram of a process of performing simulated rendering on each alternative data interval provided in the present application, and the first alternative data interval of the array to be tested is taken out, and whether the array length of the local memory is 0 is determined; if not, judging whether the last item length in the local memory array is equal to the set rendering times, if so, updating the first alternative data interval to the next alternative data interval, if not, updating the first alternative data interval to the array length corresponding to the last element in the local memory array, and executing pipeline data segmentation operation through the updated data interval; if the array length of the local memory is 0, executing pipeline data segmentation operation according to a first alternative data interval, defining rendering time to be 0, starting animation for each segmented pipeline data, acquiring current time, rendering and generating a pipeline, specifically starting an animation frame of a browser (the animation effect of each group of rendering can be realized, blank space is avoided when a disposable rendering page is loaded to influence user experience), defining variable storage current time, taking the first segmented pipeline data, starting a cycle for the first segmented pipeline data, calling a map object to generate a pipeline, defining variable storage current time after the cycle is finished, at this time, obtaining a time interval required by ending the array cycle, and updating total time (total time=total time+time interval); judging whether all the divided pipeline data are rendered, if yes, storing the current total time length into an array corresponding to the array length of the corresponding total array of the local memory (the total number of the arrays stored in the local memory is a two-dimensional array, the array length is a key of the two-dimensional array, and the rendering time length is stored into a value array of the two-dimensional array), and if not, continuing recursively taking the array to perform cyclic rendering until all the divided pipeline data are rendered; judging whether the length of the current local memory is equal to the length of an array formed by the array length values required to be tested, if so, judging whether the rendering total duration array used as a value is equal to the set test times, and if both the values are met, finishing execution; otherwise, the refreshing of the browser is realized by calling a global method provided by the window, and a new round of timing is started; and finally, acquiring the next alternative data interval, and repeating the process to obtain the total dyeing duration of each alternative data interval.
And S103, rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered.
In the embodiment of the application, after the optimal data interval is obtained, pipeline data to be rendered and pipeline data of the same data volume level subsequently can be grouped based on the optimal data interval, and finally pipeline information of each group of pipeline data is rendered on the map through the map object, so that a final pipeline map is obtained.
For example, as shown in fig. 5, fig. 5 is a schematic block diagram of a map rendering process of pipeline data provided in the present application, firstly, connection is established with an internet map API, and internet map information is loaded, then pipeline data is loaded, secondly, an optimal data interval is simulated and analyzed based on a data amount of the pipeline data, finally, the pipeline data is processed according to the optimal data interval, and finally, pipeline information is rendered on a map according to a pipeline classifier and the processed data.
In the embodiment of the application, based on the application of the front-end JS technology and the browser memory, multiple different candidate data intervals to be tested and page rendering times to be executed for each candidate data interval are generated according to configuration, then re-rendering of the page is automatically executed, time consumed by each rendering of the different data intervals is stored in the browser memory, average time length required by rendering the page for each data interval is obtained according to a storage result after program execution is completed, and the data interval corresponding to the shortest rendering average time length is used as the optimal data interval. The data interval obtained by the method is objective, and the data result support exists, so that the optimal effect of data packet rendering can be realized, the time required by page rendering is effectively shortened, and the user experience is improved.
In the embodiment of the application, when a map rendering system of pipeline data does not store a historical data interval locally, a to-be-tested array is created, and the to-be-tested array comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups; then simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval; and finally, rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered. According to the method and the device for rendering the pipeline data, the average rendering time of each alternative data interval is simulated to determine the optimal data interval in the plurality of alternative data intervals, the optimal data interval corresponds to the shortest average rendering time, and the data result support exists, so that the optimal effect can be realized by data packet rendering, the time required by page rendering is effectively shortened, and the rendering efficiency of the pipeline data is improved.
The following are system embodiments of the present application, which may be used to perform method embodiments of the present application. For details not disclosed in the system embodiments of the present application, please refer to the method embodiments of the present application.
Referring to fig. 6, a schematic diagram of a map rendering system of pipeline data according to an exemplary embodiment of the present application is shown. The map rendering system of the pipeline data may be implemented as all or part of the electronic device by software, hardware, or a combination of both. The system 1 comprises a creation module 10, a carbon-loading determination module 20, a rendering module 30.
A creating module 10, configured to create an array to be tested, where no historical data interval is stored locally, and the array to be tested includes a plurality of candidate data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups;
the determining module 20 is configured to simulate an average rendering duration of each candidate data interval according to the pipeline data to be rendered, and take the candidate data interval corresponding to the shortest average rendering duration as an optimal data interval;
and a rendering module 30 for rendering the pipeline information on the map according to the optimal data interval and the pipeline data to be rendered.
It should be noted that, when the map rendering system for pipeline data provided in the foregoing embodiment performs the map rendering method for pipeline data, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the map rendering system of the pipeline data and the map rendering method embodiment of the pipeline data provided in the foregoing embodiments belong to the same concept, which embody detailed implementation procedures in the method embodiment, and are not described herein again.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In the embodiment of the application, when a map rendering system of pipeline data does not store a historical data interval locally, a to-be-tested array is created, and the to-be-tested array comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups; then simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval; and finally, rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered. According to the method and the device for rendering the pipeline data, the average rendering time of each alternative data interval is simulated to determine the optimal data interval in the plurality of alternative data intervals, the optimal data interval corresponds to the shortest average rendering time, and the data result support exists, so that the optimal effect can be realized by data packet rendering, the time required by page rendering is effectively shortened, and the rendering efficiency of the pipeline data is improved.
The present application also provides a computer readable medium having stored thereon program instructions which, when executed by a processor, implement the map rendering method for pipeline data provided by the above respective method embodiments.
The present application also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the map rendering method of pipeline data of the above-described respective method embodiments.
Referring to fig. 7, a schematic structural diagram of an electronic device is provided in an embodiment of the present application. As shown in fig. 7, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002.
Wherein the communication bus 1002 is used to enable connected communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1001 may include one or more processing cores. The processor 1001 connects various parts within the overall electronic device 1000 using various interfaces and lines, performs various functions of the electronic device 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and invoking data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1001 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1001 and may be implemented by a single chip.
The Memory 1005 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 1005 may also optionally be at least one storage system located remotely from the processor 1001. As shown in fig. 7, a memory 1005, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a map rendering application of pipe data.
In the electronic device 1000 shown in fig. 7, the user interface 1003 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1001 may be used to invoke a map rendering application of the pipeline data stored in the memory 1005 and specifically perform the following operations:
under the condition that no historical data interval is stored locally, creating an array to be tested, wherein the array to be tested comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups;
simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval;
and rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered.
In one embodiment, the processor 1001, when executing the creation of the test array under test, specifically performs the following operations:
determining the data volume of pipeline data to be rendered;
calculating the optimal group number according to the data volume of the pipeline data to be rendered;
taking the ratio of the data volume of the pipeline data to be rendered to the optimal group number as the optimal group distance;
generating a plurality of alternative data intervals according to the optimal group distance and the preset number of elements;
and packaging the plurality of alternative data intervals into an array to be tested.
In one embodiment, the processor 1001, when executing the simulation of the average rendering duration of each alternative data interval according to the pipeline data to be rendered, specifically performs the following operations:
acquiring the number of rendering times predefined for each alternative data interval;
according to the pipeline data to be rendered, calculating the total page rendering time length of each alternative data interval;
and calculating the average rendering time length of each alternative data interval based on the page rendering total time length of each alternative data interval and the rendering times corresponding to each alternative data interval.
In one embodiment, the processor 1001, when executing the calculation of the page rendering total duration of each candidate data interval according to the pipeline data to be rendered, specifically performs the following operations:
traversing each alternative data interval, and taking the traversed alternative data interval as a target data interval;
judging whether the array length of the target array is 0; the target array is used for storing the mapping relation between the data interval and the total rendering duration;
if so, dividing pipeline data to be rendered according to the target data interval to obtain a plurality of groups of pipeline data; if not, updating the target data interval, and dividing the pipeline data to be rendered according to the updated data interval to obtain a plurality of groups of pipeline data;
calculating the total page rendering time length of the target data interval based on the multiple groups of pipeline data;
and under the condition that all the alternate data intervals are traversed, taking the total page rendering time length of each target data interval as the total page rendering time length of each alternate data interval.
In one embodiment, the processor 1001, when executing the update target data interval, specifically performs the following operations:
judging whether the array length corresponding to the last element in the target array is equal to the rendering times corresponding to the target data interval;
if so, determining a next alternative data interval of the target data interval in the plurality of alternative data intervals; replacing the target data interval with the determined next alternative data interval to obtain an updated data interval;
if not, replacing the target data interval with the array length corresponding to the last element in the target array to obtain the updated data interval.
In one embodiment, the processor 1001, when executing the calculation of the total length of page rendering for the target data interval based on the sets of pipeline data, specifically performs the following operations:
constructing pipelines corresponding to each group of pipeline data one by one on a map, and generating pipelines of each group of pipeline data;
counting the corresponding generation time length of pipelines of each group of pipeline data to obtain a plurality of time lengths;
and summing the multiple durations to obtain the total page rendering duration of the target data interval.
In one embodiment, the processor 1001 also performs the following:
under the condition that the historical data interval is locally stored, acquiring the historical data quantity corresponding to the data interval;
calculating a difference value between the data quantity of the pipeline data to be rendered and the historical data quantity;
calculating the absolute value of the ratio of the difference value to the historical data quantity to obtain a judgment value;
under the condition that the judging value is smaller than a preset threshold value, taking the historical data interval as an optimal data interval; or under the condition that the judging value is larger than or equal to the preset threshold value, continuing to execute the step of creating the array to be tested so as to determine the optimal data interval.
In the embodiment of the application, when a map rendering system of pipeline data does not store a historical data interval locally, a to-be-tested array is created, and the to-be-tested array comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups; then simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval; and finally, rendering the pipeline information in the map according to the optimal data interval and the pipeline data to be rendered. According to the method and the device for rendering the pipeline data, the average rendering time of each alternative data interval is simulated to determine the optimal data interval in the plurality of alternative data intervals, the optimal data interval corresponds to the shortest average rendering time, and the data result support exists, so that the optimal effect can be realized by data packet rendering, the time required by page rendering is effectively shortened, and the rendering efficiency of the pipeline data is improved.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in the embodiments may be accomplished by computer programs to instruct related hardware, and the program for map rendering of pipeline data may be stored in a computer readable storage medium, which when executed may include the steps of the embodiments of the methods described above. The storage medium of the map rendering program of the pipeline data can be a magnetic disk, an optical disk, a read-only memory, a random access memory or the like.
The foregoing disclosure is only illustrative of the preferred embodiments of the present application and is not intended to limit the scope of the claims herein, as the equivalent of the claims herein shall be construed to fall within the scope of the claims herein.

Claims (10)

1. A map rendering method of pipeline data, the method comprising:
creating an array to be tested under the condition that no historical data interval is stored locally, wherein the array to be tested comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups;
simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval;
and rendering pipeline information in a map according to the optimal data interval and the pipeline data to be rendered.
2. The method of claim 1, wherein the creating the array of tests to be tested comprises:
determining the data volume of the pipeline data to be rendered;
calculating the optimal group number according to the data volume of the pipeline data to be rendered;
taking the ratio of the data volume of the pipeline data to be rendered to the optimal group number as an optimal group distance;
generating a plurality of alternative data intervals according to the optimal group distance and the preset number of elements;
and packaging the plurality of alternative data intervals into an array to be tested.
3. The method of claim 1, wherein simulating the average rendering duration of each candidate data interval based on the pipe data to be rendered comprises:
acquiring the number of rendering times predefined for each alternative data interval;
according to the pipeline data to be rendered, calculating the total page rendering time length of each alternative data interval;
and calculating the average rendering time length of each alternative data interval based on the total page rendering time length of each alternative data interval and the rendering times corresponding to each alternative data interval.
4. A method according to claim 3, wherein calculating the total page rendering duration of each candidate data interval from the pipeline data to be rendered comprises:
traversing each alternative data interval, and taking the traversed alternative data interval as a target data interval;
judging whether the array length of the target array is 0; the target array is used for storing the mapping relation between the data interval and the total rendering time length;
if so, dividing pipeline data to be rendered according to the target data interval to obtain a plurality of groups of pipeline data; if not, updating the target data interval, and dividing the pipeline data to be rendered according to the updated data interval to obtain a plurality of groups of pipeline data;
calculating the total page rendering time length of the target data interval based on the multiple groups of pipeline data;
and under the condition that all the alternate data intervals are traversed, taking the total page rendering time length of each target data interval as the total page rendering time length of each alternate data interval.
5. The method of claim 4, wherein the updating the target data interval comprises:
judging whether the array length corresponding to the last element in the target array is equal to the rendering times corresponding to the target data interval;
if so, determining a next alternative data interval of the target data interval in the plurality of alternative data intervals; replacing the target data interval with the determined next alternative data interval to obtain an updated data interval;
if not, replacing the target data interval with the array length corresponding to the last element in the target array to obtain an updated data interval.
6. The method of claim 4, wherein the calculating the total length of page rendering for the target data interval based on the plurality of sets of pipeline data comprises:
constructing pipelines corresponding to each group of pipeline data one by one on a map, and generating pipelines of each group of pipeline data;
counting the corresponding generation time length of the pipelines of each group of pipeline data to obtain a plurality of time lengths;
and summing the time durations to obtain the total page rendering time duration of the target data interval.
7. The method according to any one of claims 1-6, further comprising:
under the condition that a historical data interval is locally stored, acquiring a historical data amount corresponding to the data interval;
calculating a difference value between the data quantity of the pipeline data to be rendered and the historical data quantity;
calculating the absolute value of the ratio of the difference value to the historical data quantity to obtain a judgment value;
taking the historical data interval as an optimal data interval under the condition that the judging value is smaller than a preset threshold value; or if the judging value is greater than or equal to the preset threshold value, continuing to execute the step of creating the to-be-tested array so as to determine the optimal data interval.
8. A map rendering system for pipeline data, the system comprising:
the system comprises a creation module, a test module and a test module, wherein the creation module is used for creating a test array under the condition that the historical data interval is not stored locally, and the test array comprises a plurality of alternative data intervals; the data interval is the data volume of each group after dividing pipeline data into a plurality of groups;
the determining module is used for simulating the average rendering time length of each alternative data interval according to the pipeline data to be rendered, and taking the alternative data interval corresponding to the shortest average rendering time length as the optimal data interval;
and the rendering module is used for rendering the pipeline information on the map according to the optimal data interval and the pipeline data to be rendered.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method of any of claims 1-7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method according to any of claims 1-7.
CN202311279178.XA 2023-09-28 2023-09-28 Map rendering method, system, medium and electronic device for pipeline data Pending CN117472491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311279178.XA CN117472491A (en) 2023-09-28 2023-09-28 Map rendering method, system, medium and electronic device for pipeline data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311279178.XA CN117472491A (en) 2023-09-28 2023-09-28 Map rendering method, system, medium and electronic device for pipeline data

Publications (1)

Publication Number Publication Date
CN117472491A true CN117472491A (en) 2024-01-30

Family

ID=89632154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311279178.XA Pending CN117472491A (en) 2023-09-28 2023-09-28 Map rendering method, system, medium and electronic device for pipeline data

Country Status (1)

Country Link
CN (1) CN117472491A (en)

Similar Documents

Publication Publication Date Title
JP5669630B2 (en) Test case generation method, program and system
CN107480039B (en) Small file read-write performance test method and device for distributed storage system
US10176627B2 (en) Tree-based graphics primitive rendering
CN104933747B (en) Vector animation is converted to the method and device of bitmaps animation
US20160307367A1 (en) Raster-based mesh decimation
CN107193747A (en) Code testing method and device and computer equipment
CN112037223A (en) Image defect detection method and device and electronic equipment
CN111080781A (en) Three-dimensional map display method and mobile terminal
CN109377552B (en) Image occlusion calculating method, device, calculating equipment and storage medium
CN114048816A (en) Method, device and equipment for sampling graph neural network data and storage medium
CN111127616B (en) Rendering verification method and device
CN108171778A (en) It is a kind of to visualize processing, back method, device and the storage medium that data are presented
CN117472491A (en) Map rendering method, system, medium and electronic device for pipeline data
WO2015120797A1 (en) Method and apparatus for testing compatibility of 3d engine
CN110245258B (en) Method for establishing index of video file, video file analysis method and related system
CN115865607A (en) Distributed training computing node management method and related device
CN115718824A (en) Method for judging position of equipment and automatically pushing equipment information through space distance
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN112835774B (en) Visualization method and device for performance of display card, equipment and computer-readable storage medium
CN113987107A (en) Dialogue method and device based on behavior tree, electronic equipment and storage medium
CN112465859A (en) Method, device, equipment and storage medium for detecting fast moving object
CN107491481B (en) LOD model searching method and system, method for establishing LOD model database and computer-readable storage medium
CN113267815B (en) Method and device for filtering repeated broken edge data
CN112798006B (en) Method, device, storage medium and terminal for analyzing difference points of different paths
CN105991560B (en) Audio/video communication method for network access and audio/video communication network access device

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