CN111782995A - Method and device for paging and loading graphics - Google Patents

Method and device for paging and loading graphics Download PDF

Info

Publication number
CN111782995A
CN111782995A CN202010476453.7A CN202010476453A CN111782995A CN 111782995 A CN111782995 A CN 111782995A CN 202010476453 A CN202010476453 A CN 202010476453A CN 111782995 A CN111782995 A CN 111782995A
Authority
CN
China
Prior art keywords
current point
position information
graph
node
loading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010476453.7A
Other languages
Chinese (zh)
Other versions
CN111782995B (en
Inventor
张萍萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010476453.7A priority Critical patent/CN111782995B/en
Publication of CN111782995A publication Critical patent/CN111782995A/en
Application granted granted Critical
Publication of CN111782995B publication Critical patent/CN111782995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for paging and loading graphics, and relates to the technical field of computers. One specific implementation mode of the method comprises the steps of obtaining graph loading data of a current page, sequencing the graph loading data based on time, and sequentially and circularly traversing; according to the currently traversed graph loading data, determining the position information of the current point and a corresponding connecting line, and updating the position information into a Map structure, so as to position each father node position of the current point; and after the sequential circular traversal is finished, adding all father node positions corresponding to the graphic loading data into the father elements so as to load the graphic data based on the father elements. Therefore, the method and the device can solve the problems of low loading efficiency and poor user experience of the existing graphic data.

Description

Method and device for paging and loading graphics
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for paging and loading graphics.
Background
When the gittab-network-graph warehouse displays a gittab graph (the gittab graph is used for recording a submission record graph of the code warehouse), all commit information of the warehouse is acquired at one time (the commit information is expressed as points, and each point is a submission record), and then the graph is drawn by using svg (scalable vector graphics is based on extensible markup language).
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
currently, a third-party library related to the Git graph needs to acquire all commit information at one time when a page is displayed. When the commit data amount is large, not only the network transmission takes a lot of time, but also the front-end page presentation takes a lot of time. Therefore, not only the graphics page loading time is too long, but also the phenomena of page jamming and even page crash may occur, so that the user experience is very unfriendly.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for paging and loading graphics, which can solve the problems of low efficiency and poor user experience in loading graphics data in the prior art.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, a method for paging and loading graphics is provided, including obtaining graphics loading data of a current page, and sorting the graphics loading data based on time to sequentially and cyclically traverse; according to the currently traversed graph loading data, determining the position information of the current point and a corresponding connecting line, and updating the position information into a Map structure, so as to position each father node position of the current point; and after the sequential circular traversal is finished, adding all father node positions corresponding to the graphic loading data into the father elements so as to load the graphic data based on the father elements.
Optionally, determining the current point position information and the corresponding connection line includes:
judging whether the current point position information exists in the Map structure according to the currently traversed graph loading data; if so, traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information so as to draw a graph of the current point; if not, judging whether the position information of the current point has a father node or not, and if so, drawing a graph of the current point according to the father node; if not, generating a new branch according to the position information of the current point so as to draw the graph of the current point.
Optionally, traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information, so as to draw a graph of the current point, including:
traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information to obtain a plurality of corresponding branch lines;
and converging the branch lines to one preset reserved branch line, and deleting redundant branch lines.
Optionally, converging the plurality of branch lines to one preset reserved branch line includes:
selecting the branch line with the smallest abscissa from all the branch lines as a converged preset reserved branch line;
judging whether the abscissa of the position information of the current point is equal to the abscissa of the reserved branch line, if so, drawing a connecting line between the sub-node and the current point, and deleting the branch line where the sub-node is located; if not, drawing a connecting line from the child node to the branch line where the abscissa of the current point is located, and then drawing a connecting line from the child node to a preset reserved branch line.
Optionally, locating each parent node position of the current point comprises:
judging whether a parent node exists at the current point, if so, storing the position information of the current point into a subfield of the parent node; if not, the position information of the father node is (cx + interval, cy), is positioned on the generated branch line (cx + interval), and stores the current point information into the sub-field of the father node; the position information of the current point is (cx, cy), and the interval is the distance between two branches.
Optionally, obtaining the graphics loading data of the current page includes:
the transfer of graphics load data is monitored by the watch method of vue.
Optionally, after loading the graphic data based on the parent element, the method further includes:
and monitoring a preset target behavior event to trigger the loading of the next page of graphic data.
In addition, the invention also provides a graphics paging loading device, which comprises an acquisition module, a sorting module and a display module, wherein the acquisition module is used for acquiring the graphics loading data of the current page and sorting the graphics loading data based on time so as to sequentially and circularly traverse;
the processing module is used for determining the position information of the current point and the corresponding connecting line according to the currently traversed graph loading data, updating the position information of the current point and the corresponding connecting line into a Map structure, and further positioning the position of each father node of the current point; and after the sequential circular traversal is finished, adding all father node positions corresponding to the graphic loading data into the father elements so as to load the graphic data based on the father elements.
One embodiment of the above invention has the following advantages or benefits: the technical means that the current point position information and the corresponding connecting line are determined according to the currently traversed graph loading data and are updated to the Map structure is adopted, so that the technical effects that the position of the father node is pre-positioned, and the position of the point can be simply and quickly positioned when the data are loaded in a paging mode are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a graphics paging loading method according to one embodiment of the present invention;
FIG. 2 is a diagram illustrating a main flow of a graphics paging loading method according to another embodiment of the present invention;
FIG. 3 is a diagram illustrating a main flow of a graphics paging loading method according to another embodiment of the present invention;
FIG. 4 is a diagram illustrating the major blocks of a graphics paging loading apparatus according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a graphics paging loading method according to an embodiment of the present invention, as shown in fig. 1, the graphics paging loading method includes:
step S101, obtaining graph loading data of a current page, and sequencing the graph loading data based on time so as to sequentially and circularly traverse.
In some embodiments, in the process of drawing the git-graph, the front end acquires the graph load data of the current page from the back end, generates an array sorted by time, and only performs one cycle traversal on the acquired graph load data in order to minimize the time complexity.
In a preferred embodiment, the watch method of vue may be used to monitor whether new data is coming, and if so, the obtained new graphics load data is processed.
And S102, determining the position information of the current point and the corresponding connecting line according to the currently traversed graph loading data, and updating the position information and the corresponding connecting line into a Map structure, thereby positioning the position of each father node of the current point.
In the embodiment, the Map structure is similar to the Object, is a set of healthy value pairs, and is a more perfect hash structure. Preferably, the embodiment of the present invention establishes a commit Map structure, and then determines current commit point location information and a corresponding connection line according to the currently traversed graph load data, and updates the information into the commit Map structure, thereby locating each father node location of the current commit point. The commit Map structure takes commit Id as a key value, and the value stores the x and y coordinate values of the commit point and the branch information where the commit point is located.
In some embodiments, when determining the current point position information and the corresponding connection, it may be determined whether the current point position information already exists in the Map structure according to the currently traversed graph loading data. And traversing the child nodes corresponding to the current point position information if the current point position information is the current point position information, and drawing a connection line from each child node to the current point position information so as to draw the graph of the current point. If not, judging whether the position information of the current point has a father node or not, and if so, drawing a graph of the current point according to the father node; if not, generating a new branch according to the position information of the current point so as to draw the graph of the current point.
In a further embodiment, the child nodes corresponding to the current point position information are traversed, and a connection line from each child node to the current point position information is drawn, so that when the graph of the current point is drawn, the child nodes corresponding to the current point position information can be traversed, and a connection line from each child node to the current point position information is drawn, so as to obtain a plurality of corresponding branch lines. And then converging the branch lines to one preset reserved branch line, and deleting redundant branch lines. The branch line is of a Map structure, the key value is a coordinate cx value, and the value stores the latest cy position of the branch line and a method for drawing the connecting line. In an embodiment of the present invention, each cx value represents a branch.
That is, if the current commit point already exists in the commit Map structure, its child nodes are first traversed, the line connecting each child node to the current node is drawn, and then the svg graph for that commit point is drawn. If the current commit point does not exist in the commit Map structure, but its parent node already exists in the commit Map structure, then the svg graph for that commit point can be directly drawn. If the current commit point does not exist and the parent node does not exist in the commit Map structure, a new branch needs to be generated and then the svg graph for that point is drawn.
In addition, when a plurality of branches are converged onto one preset reserved branch, the specific implementation process comprises the following steps:
and selecting the branch line with the smallest abscissa from all the branch lines as a converged preset reserved branch line. Then, judging whether the abscissa of the position information of the current point is equal to the abscissa of the reserved branch line, if so, drawing a connecting line between the sub-node and the current point, and deleting the branch line where the sub-node is located; if not, drawing a connecting line from the child node to the branch line where the abscissa of the current point is located, and then drawing a connecting line from the child node to a preset reserved branch line.
That is, when there are multiple child nodes, it is stated that multiple branches are converged on one branch, where it is necessary to ensure that each line is in the correct position, and to delete the redundant branches. First, the branch (minx) with the smallest x coordinate among all the branches is determined as the reserved branch which is finally converged. And if the abscissa cx of the current commit point is equal to minx, drawing a connecting line between the sub node and the current commit point, and deleting the branch line where the sub node is located. If the abscissa cx of the current commit point! When the minimum point is minx, a line from the child node to the branch line of the current commit point abscissa cx is drawn, and then a line from the child node to the branch line of the minx is drawn.
As still other embodiments, when locating the position of each parent node of the current point, the specific implementation process includes:
judging whether a parent node exists at the current point, if so, storing the position information of the current point into a subfield of the parent node; if not, the position information of the father node is (cx + interval, cy), and is located on the generated branch line (cx + interval), and the current point information is stored in the sub-field of the father node. The position information of the current point is (cx, cy), and the interval is the distance between two branches.
That is, when the location of each parent node of the current commit point (cx, cy) is located, if the current parent node already exists, the location information of the current commit node is stored in the children field of the parent node. If the current father node does not exist, the position of the father node is (cx + interval, cy), and the father node is positioned on a new branch (cx + interval) (namely, a new branch is generated), and the information of the current commit point is stored in the children field of the father node. The parent node is stored or updated into the commit Map structure.
And step S103, after the sequential cycle traversal is finished, adding all father node positions corresponding to the graph loading data into the father elements so as to load the graph data based on the father elements.
In the embodiment, after the sequential loop traversal is finished, all the parent node positions corresponding to the graphics loading data are added to a parent element (the parent element refers to a DOM element), that is, the addition to the parent element is to insert a point and a line generated by the new graphics loading data into the parent element at one time, and then the page is rendered.
As some embodiments, after loading the graphics data based on the parent element, the method further comprises:
and monitoring a preset target behavior event to trigger the loading of the next page of graphic data. For example: and monitoring a mouse rolling event, judging whether the next page needs to be loaded, if so, jumping to the step 101, and if not, ending.
In summary, the graphics paging loading method of the present invention realizes that the front end obtains data from the back end for multiple times, that is, the page is rolled to a certain position to automatically obtain the next page of data, then processes the obtained data, and draws svg graphics. Therefore, the method and the device reduce the time for paging and loading the graphs, a user does not need to wait, all submitted historical graphs of the warehouse can be smoothly checked, and the user experience is greatly improved. Meanwhile, the method can be perfectly combined with vue to realize a reusable component.
Fig. 2 is a schematic diagram of a main flow of a graphics paging loading method according to another embodiment of the present invention, and as shown in fig. 2, the graphics paging loading method includes:
in step S201, the transmission of the graphic load data of the current page is monitored by the watch method of vue.
Step S202, sorting the graph loading data of the current page based on time so as to sequentially and circularly traverse.
Step S203, according to the currently traversed graph loading data, determining the position information of the current point and the corresponding connecting line, and updating the position information into a Map structure, thereby positioning the position of each father node of the current point.
And step S204, after the sequential cycle traversal is finished, adding all father node positions corresponding to the graph loading data into the father elements so as to load the graph data based on the father elements.
Step S205, monitoring the mouse scrolling event, determining whether the next page needs to be loaded, if yes, returning to step S201, otherwise, exiting the process.
Fig. 3 is a schematic diagram of a main flow of a graphics paging loading method according to another embodiment of the present invention, and as shown in fig. 3, the graphics paging loading method includes:
step S301, obtaining the graph loading data of the current page, and sequencing the graph loading data based on time so as to sequentially and circularly traverse.
Step S302, according to the currently traversed graph loading data, determining whether the current point position information already exists in the Map structure, if so, performing step S303, and if not, performing step S304.
Step S303, traversing the child nodes corresponding to the current point position information, drawing a connection line from each child node to the current point position information, so as to draw a graph of the current point, and performing step S307.
In some embodiments, traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information to obtain a plurality of corresponding branch lines; and converging the branch lines to one preset reserved branch line, and deleting redundant branch lines.
Preferably, when a plurality of branch lines are converged onto one preset reserved branch line, the branch line with the smallest abscissa can be selected from all the branch lines as the converged preset reserved branch line, whether the abscissa of the current point position information is equal to the abscissa of the reserved branch line or not is judged, if yes, a connecting line between the sub-node and the current point is drawn, and the branch line where the sub-node is located is deleted; if not, drawing a connecting line from the child node to the branch line where the abscissa of the current point is located, and then drawing a connecting line from the child node to a preset reserved branch line.
Step S304, determining whether the current point position information has a parent node, if yes, performing step S305, and if not, performing step S306.
In step S305, the graph of the current point is drawn based on the parent node, and step S307 is performed.
Step S306, a new branch is generated according to the current point position information to draw the current point graph, and step S307 is performed.
Step S307, the current point position information and the drawn graph are updated into the Map structure.
Step S308, each father node position of the current point is located.
In some embodiments, whether a parent node exists at a current point is judged, and if yes, the position information of the current point is stored in a sub-field of the parent node; if not, the position information of the father node is (cx + i overall, cy), is positioned on the generated branch line (cx + interval), and stores the current point information into the subfield of the father node; the position information of the current point is (cx, cy), and the interval is the distance between two branches.
Step S309, after the sequential cycle traversal is finished, adding all father node positions corresponding to the graph loading data into the father element so as to load the graph data based on the father element.
FIG. 4 is a diagram illustrating the main blocks of a graphics paging loading apparatus according to an embodiment of the present invention, and as shown in FIG. 4, the graphics paging loading apparatus 400 includes an obtaining module 401 and a processing module 402. The obtaining module 401 obtains the graph loading data of the current page, and sorts the graph loading data based on time to sequentially and circularly traverse; the processing module 402 determines the position information of the current point and the corresponding connecting line according to the currently traversed graph loading data, and updates the position information and the corresponding connecting line into a Map structure, so as to position each father node position of the current point; and after the sequential circular traversal is finished, adding all father node positions corresponding to the graphic loading data into the father elements so as to load the graphic data based on the father elements.
In some embodiments, the processing module 402 determines the current point location information and the corresponding connecting line, and updates the current point location information and the corresponding connecting line into the Map structure, including:
judging whether the current point position information exists in the Map structure according to the currently traversed graph loading data; if so, traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information so as to draw a graph of the current point; if not, judging whether the position information of the current point has a father node or not, and if so, drawing a graph of the current point according to the father node; if not, generating a new branch according to the position information of the current point so as to draw the graph of the current point.
In some embodiments, the traversing the child nodes corresponding to the current point position information by the processing module 402, and drawing a connection line from each child node to the current point position information to draw the graph of the current point includes:
traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information to obtain a plurality of corresponding branch lines; and converging the branch lines to one preset reserved branch line, and deleting redundant branch lines.
In some embodiments, the process module 402 converges a plurality of branches to one preset reserved branch, including:
selecting the branch line with the smallest abscissa from all the branch lines as a converged preset reserved branch line; judging whether the abscissa of the position information of the current point is equal to the abscissa of the reserved branch line, if so, drawing a connecting line between the sub-node and the current point, and deleting the branch line where the sub-node is located; if not, drawing a connecting line from the child node to the branch line where the abscissa of the current point is located, and then drawing a connecting line from the child node to a preset reserved branch line.
In some embodiments, processing module 402 locates each parent node location of the current point, including:
judging whether a parent node exists at the current point, if so, storing the position information of the current point into a subfield of the parent node; if not, the position information of the father node is (cx + interval, cy), is positioned on the generated branch line (cx + interval), and stores the current point information into the sub-field of the father node; the position information of the current point is (cx, cy), and the interval is the distance between two branches.
In some embodiments, the obtaining module 401 obtains the graphics loading data of the current page, including:
the transfer of graphics load data is monitored by the watch method of vue.
In some embodiments, after the processing module 402 loads the graphics data based on the parent element, it further includes:
and monitoring a preset target behavior event to trigger the loading of the next page of graphic data.
It should be noted that the graphics page loading method and the graphics page loading apparatus of the present invention have corresponding relationships in the specific implementation contents, and therefore, the repeated contents are not described again.
FIG. 5 illustrates an exemplary system architecture 500 for a graphics page loading method or device, a graphics page loading determining device or a graphics page loading determining device, to which embodiments of the invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices having a graphics page loading screen or a graphics page loading discrimination screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the graphics page loading method or the graphics page loading determination method provided by the embodiment of the invention is generally executed by the server 505, and accordingly, the computing device is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the computer system 800 are also stored. The CPU601, ROM602, and RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output section 607 including a display such as a Cathode Ray Tube (CRT), a liquid crystal graphics page Loader (LCD), and the like, and a speaker and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module and a processing module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include obtaining graphical load data for a current page, sorting the graphical load data over time for sequential loop traversal; according to the currently traversed graph loading data, determining the position information of the current point and a corresponding connecting line, and updating the position information into a Map structure, so as to position each father node position of the current point; and after the sequential circular traversal is finished, adding all father node positions corresponding to the graphic loading data into the father elements so as to load the graphic data based on the father elements.
According to the technical scheme of the embodiment of the invention, the problems of low loading efficiency and poor user experience of the existing graphic data can be solved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A graphics paging loading method, comprising:
acquiring graph loading data of a current page, and sequencing the graph loading data based on time so as to sequentially and circularly traverse;
according to the currently traversed graph loading data, determining the position information of the current point and a corresponding connecting line, and updating the position information into a Map structure, so as to position each father node position of the current point;
and after the sequential circular traversal is finished, adding all father node positions corresponding to the graphic loading data into the father elements so as to load the graphic data based on the father elements.
2. The method of claim 1, wherein determining current point location information and corresponding connections comprises:
judging whether the current point position information exists in the Map structure according to the currently traversed graph loading data; if so, traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information so as to draw a graph of the current point; if not, judging whether the position information of the current point has a father node or not, and if so, drawing a graph of the current point according to the father node; if not, generating a new branch according to the position information of the current point so as to draw the graph of the current point.
3. The method of claim 2, wherein traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information to draw a graph of the current point, comprises:
traversing the child nodes corresponding to the current point position information, and drawing a connection line from each child node to the current point position information to obtain a plurality of corresponding branch lines;
and converging the branch lines to one preset reserved branch line, and deleting redundant branch lines.
4. The method of claim 3, wherein converging a plurality of branches onto a predetermined reserved branch comprises:
selecting the branch line with the smallest abscissa from all the branch lines as a converged preset reserved branch line;
judging whether the abscissa of the position information of the current point is equal to the abscissa of the reserved branch line, if so, drawing a connecting line between the sub-node and the current point, and deleting the branch line where the sub-node is located; if not, drawing a connecting line from the child node to the branch line where the abscissa of the current point is located, and then drawing a connecting line from the child node to a preset reserved branch line.
5. The method of claim 1, wherein locating each parent node position of the current point comprises:
judging whether a parent node exists at the current point, if so, storing the position information of the current point into a subfield of the parent node; if not, the position information of the father node is (cx + interval, cy), is positioned on the generated branch line (cx + interval), and stores the current point information into the sub-field of the father node; the position information of the current point is (cx, cy), and the interval is the distance between two branches.
6. The method of claim 1, wherein obtaining the graphics load data for the current page comprises:
the transfer of graphics load data is monitored by the watch method of vue.
7. The method of any of claims 1-6, further comprising, after loading graphical data based on the parent element:
and monitoring a preset target behavior event to trigger the loading of the next page of graphic data.
8. A graphics paging load device, comprising:
the acquisition module is used for acquiring the graph loading data of the current page, and sequencing the graph loading data based on time so as to sequentially and circularly traverse;
the processing module is used for determining the position information of the current point and the corresponding connecting line according to the currently traversed graph loading data, updating the position information of the current point and the corresponding connecting line into a Map structure, and further positioning the position of each father node of the current point; and after the sequential circular traversal is finished, adding all father node positions corresponding to the graphic loading data into the father elements so as to load the graphic data based on the father elements.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202010476453.7A 2020-05-29 2020-05-29 Graphics paging loading method and device Active CN111782995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010476453.7A CN111782995B (en) 2020-05-29 2020-05-29 Graphics paging loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010476453.7A CN111782995B (en) 2020-05-29 2020-05-29 Graphics paging loading method and device

Publications (2)

Publication Number Publication Date
CN111782995A true CN111782995A (en) 2020-10-16
CN111782995B CN111782995B (en) 2024-05-17

Family

ID=72754001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010476453.7A Active CN111782995B (en) 2020-05-29 2020-05-29 Graphics paging loading method and device

Country Status (1)

Country Link
CN (1) CN111782995B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114925131A (en) * 2021-12-31 2022-08-19 中企云链(北京)金融信息服务有限公司 Data synchronization automatic traversal method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862533A (en) * 2005-12-31 2006-11-15 珠海金山软件股份有限公司 Demonstration data file capable of being processed by SVG application program
CN103853417A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Rolling and pagination display method and device for network dynamic picture
CN106503026A (en) * 2015-09-08 2017-03-15 华为技术有限公司 A kind of method and apparatus of video data
US20170293405A1 (en) * 2016-04-12 2017-10-12 International Business Machines Corporation Managing node pagination for a graph data set
CN109165364A (en) * 2018-09-12 2019-01-08 广州视源电子科技股份有限公司 Page rendering method, device, equipment and storage medium
CN109891406A (en) * 2016-11-04 2019-06-14 微软技术许可有限责任公司 Multi-stage data paging

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1862533A (en) * 2005-12-31 2006-11-15 珠海金山软件股份有限公司 Demonstration data file capable of being processed by SVG application program
CN103853417A (en) * 2012-11-30 2014-06-11 腾讯科技(深圳)有限公司 Rolling and pagination display method and device for network dynamic picture
CN106503026A (en) * 2015-09-08 2017-03-15 华为技术有限公司 A kind of method and apparatus of video data
US20170293405A1 (en) * 2016-04-12 2017-10-12 International Business Machines Corporation Managing node pagination for a graph data set
CN109891406A (en) * 2016-11-04 2019-06-14 微软技术许可有限责任公司 Multi-stage data paging
CN109165364A (en) * 2018-09-12 2019-01-08 广州视源电子科技股份有限公司 Page rendering method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
叶娜;雒伟民;张峰;肖康;: "基于WebGIS的图形加载性能优化研究", 福建电脑, no. 11, 25 November 2013 (2013-11-25) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114925131A (en) * 2021-12-31 2022-08-19 中企云链(北京)金融信息服务有限公司 Data synchronization automatic traversal method
CN114925131B (en) * 2021-12-31 2024-05-07 中企云链股份有限公司 Automatic traversal method for data synchronization

Also Published As

Publication number Publication date
CN111782995B (en) 2024-05-17

Similar Documents

Publication Publication Date Title
CN109634598B (en) Page display method, device, equipment and storage medium
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN110766348B (en) Method and device for combining goods picking tasks
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN112597126A (en) Data migration method and device
CN109992719B (en) Method and apparatus for determining push priority information
CN109902726B (en) Resume information processing method and device
CN111782995A (en) Method and device for paging and loading graphics
CN113807056B (en) Document name sequence error correction method, device and equipment
CN110851522A (en) Method and device for displaying data
CN111026629A (en) Method and device for automatically generating test script
CN111767351B (en) Method and device for determining parking spot of transfer robot
CN109857838B (en) Method and apparatus for generating information
CN109284350B (en) Method and device for updating search content, storage medium and electronic equipment
CN110888583A (en) Page display method, system and device and electronic equipment
CN111695059A (en) Information view list processing method and device and display equipment
CN115994120B (en) Data file merging method, device, electronic equipment and computer readable medium
CN111857879B (en) Data processing method, device, electronic equipment and computer readable medium
CN112380821B (en) Graphic display method and device and electronic equipment
CN113762570B (en) Method and device for sorting task group list
CN116360710B (en) Data storage method applied to server cluster, electronic device and readable medium
CN112015421B (en) Article information display method and device, electronic equipment and computer readable medium
CN116360660A (en) Page resource preloading method, device, equipment and storage medium
CN113779450A (en) Page access method and page access device
CN115328475A (en) Method, device, equipment and medium for displaying UI (user interface) based on interface data

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