Relationship diagram pop-up carousel logic algorithm based on ECharts component

Through the relationship diagram pop-up carousel logic algorithm based on ECharts component, the problem of insufficient staticity and interaction functions of relationship diagram display is solved, and flexible and beautiful data display is realized, which is suitable for power system monitoring, improving user experience and Show efficiency.

CN118778848BActive Publication Date: 2024-12-06WEICHUANG SOFTWARE NANJING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411248735.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-12-06
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

In the prior art, relationship diagram display lacks real-time and dynamic nature, user interaction functions are limited, and it is difficult to meet the personalized needs of complex application scenarios. The node and edge style configuration presets are difficult to dynamically adjust, which affects the aesthetics and flexibility of the display. .

Method used

Design a relationship diagram pop-up carousel logic algorithm based on ECharts component. By determining the presentation form of the relationship diagram, building node weight and relationship complexity calculation formulas, configuring pop-up carousel logic, dynamically adjusting the node display time and carousel speed, and realizing Flexible display effect.

Benefits of technology

It realizes data display with strong flexibility and good visualization, can meet the personalized needs of complex application scenarios, improves user interaction experience and information display efficiency, and is suitable for power system monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118778848B_ABST
    Figure CN118778848B_ABST
Patent Text Reader

Abstract

The present invention discloses a relationship graph pop-up carousel logic algorithm based on the ECharts component, including the following steps: S1: determine the display form of the relationship graph; S2: determine the node data displayed by the relationship graph and the relationship data between the nodes and the relationship type between the two nodes according to the display content, and construct a relationship complexity calculation formula; S3: transmit the data collected by the data interface to the data processing center through the communication network; S4: configure the pop-up carousel logic through the relationship graph algorithm, and construct a node weight calculation formula; S5: perform pop-up carousel according to the configured algorithm. The present invention can flexibly realize the user's requirements for display content through the configurable function of the pop-up carousel logic, and can be widely used in the field of power system monitoring to improve the display form of power system indicators.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of ECharts component application, power monitoring and data analysis technology, and in particular to a relationship diagram pop-up carousel logic algorithm based on the ECharts component. Background Art

[0002] In the field of big data and information visualization, relationship diagrams, as an important graphical display method, are widely used in scenarios such as social network analysis, organizational structure display, and knowledge graph construction.

[0003] The existing technology mainly faces several limitations. First, data display is usually static, lacking real-time and dynamic features, and is difficult to adapt to rapidly changing business needs. Second, user interaction functions are limited, and operations cannot be flexibly customized, making it difficult to meet the personalized needs of complex application scenarios. Traditional relationship diagrams also have shortcomings in display effects and algorithm configuration. Node and edge style configurations are usually preset and difficult to adjust dynamically, affecting the beauty and flexibility of the display. Therefore, it is necessary to design a relationship diagram pop-up carousel logic algorithm based on the ECharts component to solve the above method. Summary of the invention

[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.

[0005] In view of the problems existing in the above-mentioned existing ECharts component-based relationship diagram pop-up carousel logic algorithm, the present invention is proposed.

[0006] Therefore, the purpose of the present invention is to provide a relationship diagram pop-up carousel logic algorithm based on the ECharts component, which is suitable for solving the problem that data display is usually static, lacks real-time and dynamics, has limited user interaction functions, and is difficult to meet the personalized needs of complex application scenarios.

[0007] In order to solve the above technical problems, the present invention provides the following technical solution: a relationship diagram pop-up carousel logic algorithm based on the ECharts component, comprising the following steps:

[0008] S1: Determine the presentation format of the relationship diagram;

[0009] S2: Determine the node data displayed in the relationship graph, the relationship data between the nodes, and the relationship type between the two nodes according to the displayed content, and construct a relationship complexity calculation formula;

[0010] S3: Transmitting the data collected by the data interface to the data processing center through the communication network;

[0011] S4: Configure the pop-up carousel logic through the relationship graph algorithm and build a node weight calculation formula;

[0012] S5: Perform pop-up carousel according to the configured algorithm.

[0013] As a preferred solution of the relationship diagram pop-up carousel logic algorithm based on the ECharts component of the present invention, the node weight calculation formula is as follows:

[0014] in, Represents the total number of nodes, represents the i-th node, i=1, 2, 3, ..., N, Representation Node The weight represents the importance of the node. Representation Node The kth index score of The total number of indicators.

[0015] As a preferred solution of the ECharts component-based relationship diagram pop-up carousel logic algorithm of the present invention, in which: in the output result of the node weight calculation formula, the node weight threshold is set to ;

[0016] like > , then the node is an important node and should be highlighted in the subsequent carousel logic;

[0017] like ≤ , then the node is a non-important node and does not need to be highlighted in the subsequent carousel logic.

[0018] As a preferred solution of the ECharts component-based relationship diagram pop-up carousel logic algorithm of the present invention, the relationship complexity calculation formula is as follows:

[0019]

[0020] in, Representation Node and The complexity of the relationship between Representation Node and is the jth relationship metric between nodes, and J represents the total number of relationship metrics between nodes.

[0021] As a preferred solution of the ECharts component-based relationship diagram pop-up carousel logic algorithm of the present invention, in which: in the output result of the relationship complexity calculation formula, a complexity threshold is set ;

[0022] like > , it means that the relationship between nodes is highly complex and an intuitive display method should be used in the relationship diagram;

[0023] like ≤ , it means that the complexity of the relationship between nodes is low and there is no need to display it directly in the relationship diagram.

[0024] As a preferred solution of the relationship diagram pop-up carousel logic algorithm based on the ECharts component of the present invention, a node display time adjustment formula is constructed according to the output result of the relationship complexity calculation formula and the output result of the node weight calculation formula. The node display time adjustment formula is as follows:

[0025]

[0026] in, Representation Node The display time indicates the display time of the node in the carousel. Represents the decay factor based on the complexity of the relationship as the complexity of the relationship increases As the attenuation factor decreases, Indicates the control decay rate.

[0027] As a preferred solution of the ECharts component-based relationship diagram pop-up carousel logic algorithm of the present invention, in which: in the output result of the node display adjustment formula, the node display time threshold is set ;

[0028] like < , you need to increase the display time of the node;

[0029] like ≥ , there is no need to increase the display time of the node.

[0030] As a preferred solution of the ECharts component-based relationship diagram pop-up carousel logic algorithm of the present invention, a carousel speed adjustment formula is constructed according to the output result of the node display time adjustment formula, and the carousel speed adjustment formula is as follows:

[0031] in, represents the carousel speed adjustment function, which represents the carousel speed at time t. is a logic function used to control the smoothness of speed changes. Determines the sensitivity of speed adjustment, and T represents the total duration of the carousel cycle.

[0032] As a preferred solution of the ECharts component-based relationship diagram pop-up carousel logic algorithm of the present invention, in which: in the output result of the carousel speed adjustment formula, the upper limit of the carousel speed threshold is set and lower threshold ;

[0033] like > ,The carousel speed needs to be slowed down;

[0034] like ≤ ≤ ; No need to adjust the carousel speed;

[0035] like < , you need to increase the carousel speed.

[0036] As a preferred solution of the relationship diagram pop-up carousel logic algorithm based on the ECharts component described in the present invention, the indicator score includes the number of user clicks, viewing time and node connectivity.

[0037] Beneficial effects of the present invention:

[0038] 1. Strong flexibility: The configurable function of pop-up carousel logic can flexibly meet the user's requirements for display content;

[0039] 2. Good visualization effect: Through the visualization function of ECharts components, the content and effects to be displayed can be dynamically displayed to achieve better display effects;

[0040] 3. Wide range of applications: This algorithm can be widely used in the field of power system monitoring to improve the display form of power system indicators. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0042] Figure 1 This is a schematic diagram of the overall steps of the relationship diagram pop-up carousel logic algorithm based on the ECharts component proposed by the present invention;

[0043] Figure 2 This is an algorithm logic diagram of the relationship diagram pop-up carousel logic algorithm based on the ECharts component proposed in the present invention. DETAILED DESCRIPTION

[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0045] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0046] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0047] Secondly, the present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0048] Embodiment 1

[0049] Reference Figure 1-Figure 2 , which is an embodiment of the present invention, provides a relationship diagram pop-up carousel logic algorithm based on the ECharts component, including the following steps:

[0050] S1: Determine the presentation format of the relationship diagram;

[0051] Customized design of relationship diagrams based on specific display requirements ensures the optimization of the logical structure and visual effects of data, improves the user's sense of participation and initiative in data display, and can flexibly adjust the display content according to actual needs, making the relationship diagram not only beautiful but also more efficient in information transmission;

[0052] S2: Determine the node data displayed in the relationship graph, the relationship data between the nodes, and the relationship type between the two nodes according to the displayed content, and construct a relationship complexity calculation formula;

[0053] Prepare the node data and relationship data between nodes to be displayed. Each node should contain a unique identifier, display name, related information, etc. The relationship data between nodes includes the type of relationship connecting two nodes, such as parent-child relationship, sibling relationship, etc.

[0054] S3: Transmitting the data collected by the data interface to the data processing center through the communication network;

[0055] S4: Configure the pop-up carousel logic through the relationship graph algorithm and build a node weight calculation formula;

[0056] Use the relationship graph component in ECharts to configure the node style, relationship style, layout and other parameters. Ensure that the relationship graph can correctly display the relationship between nodes;

[0057] Design a carousel function in the component so that users can browse pop-up information related to the current node by hovering the mouse or automatically playing; design a playback configuration function in the component so that users can dynamically adjust the speed and indicator color of the carousel according to their browsing behavior and node importance;

[0058] The powerful visualization function of ECharts components is innovatively used to dynamically display the transmitted data, and combined with the pop-up window design to provide detailed information of the nodes. This design not only realizes the visualization of data, but also provides a deep interactive experience through pop-up windows, so that users can obtain detailed information of nodes while viewing the relationship diagram; it provides multi-level information display capabilities, and users can instantly obtain detailed information when browsing the relationship diagram, which improves the user's interactive experience and information acquisition efficiency;

[0059] S5: Perform pop-up carousel according to the configured algorithm;

[0060] In the carousel logic, the following algorithm can be used to achieve dynamic playback: set a playback logic, play in logical order, and when reaching the last node, switch to the first node to form a loop playback effect; in the carousel logic, the layout and visual effects of the relationship diagram can be dynamically adjusted according to the complexity of the node relationship (such as multi-level parent-child relationship, multiple sibling relationship, etc.);

[0061] The node weight calculation formula is as follows:

[0062] in, Represents the total number of nodes, represents the i-th node, i=1, 2, 3, ..., N, Representation Node The weight represents the importance of the node. Representation Node The kth indicator score includes the number of user clicks, viewing time and node connectivity. M represents the node The total number of indicators.

[0063] In the output result of the node weight calculation formula, the node weight threshold is set to ;

[0064] like > , then the node is an important node and should be highlighted in the subsequent carousel logic;

[0065] like ≤ , then the node is a non-important node and does not need to be highlighted in the subsequent carousel logic.

[0066] The formula for calculating relational complexity is as follows:

[0067] in, Representation Node and The complexity of the relationship between Representation Node and is the jth relationship metric between nodes, and J represents the total number of relationship metrics between nodes.

[0068] In the output of the relational complexity calculation formula, set the complexity threshold ;

[0069] like > , it means that the relationship between nodes is highly complex and an intuitive display method should be used in the relationship diagram;

[0070] like ≤ , it means that the complexity of the relationship between nodes is low and there is no need to display it directly in the relationship diagram.

[0071] The node display time adjustment formula is constructed based on the output results of the relationship complexity calculation formula and the node weight calculation formula. The node display time adjustment formula is as follows:

[0072]

[0073] in, Representation Node The display time indicates the display time of the node in the carousel. Represents the decay factor based on the complexity of the relationship as the complexity of the relationship increases As the attenuation factor decreases, Indicates the control decay rate.

[0074] In the output of the node display adjustment formula, set the node display time threshold ;

[0075] like < , you need to increase the display time of the node;

[0076] like ≥ , there is no need to increase the display time of the node.

[0077] The carousel speed adjustment formula is constructed based on the output result of the node display time adjustment formula. The carousel speed adjustment formula is as follows:

[0078] in, represents the carousel speed adjustment function, which represents the carousel speed at time t. is a logic function used to control the smoothness of speed changes. Determines the sensitivity of speed adjustment, and T represents the total duration of the carousel cycle.

[0079] In the output result of the carousel speed adjustment formula, set the upper limit of the carousel speed threshold and lower threshold ;

[0080] like > ,The carousel speed needs to be slowed down;

[0081] like ≤ ≤ ; No need to adjust the carousel speed;

[0082] like < , you need to increase the carousel speed.

[0083] Embodiment 2

[0084] Referring to Table 1, which is a second embodiment of the present invention, this embodiment is different from the first embodiment in that, in order to verify its beneficial effects, experimental comparison data between the present invention and the prior art are provided.

[0085] In order to verify the effectiveness and superiority of the relationship graph pop-up carousel logic algorithm based on the ECharts component, we conducted a comparative experiment and selected a social network data set containing 1,000 user nodes and their relationship data. We set the node data according to different display content, including the user's unique identifier, display name, number of clicks, viewing time, and node connectivity. The experiment used the existing static relationship graph display technology and the dynamic relationship graph pop-up carousel logic algorithm of the present invention for visual display.

[0086] During the specific implementation process, we first collected node data and relationship data between nodes from the data source through the data interface, and transmitted this data to the data processing center through the communication network. In the data processing center, we used the ECharts component to visualize the data and designed a pop-up window display format, including detailed user information and interactive operation prompts. Through the relationship graph algorithm, we configured the pop-up window carousel logic, so that users can browse the pop-up window information related to the current node by hovering the mouse or automatically playing.

[0087] In the node weight calculation formula, we calculated the comprehensive importance index K of each node through indicators such as the number of user clicks, viewing time and node connectivity, and adjusted the carousel speed and display frequency of the pop-up window on this basis. The relationship complexity calculation formula calculated the carousel priority L of the pop-up window according to the node importance index, and optimized the layout of the relationship diagram according to the complexity of the relationship. The node display time adjustment formula calculated the pop-up window display time T of each node to ensure that important nodes are fully displayed. Finally, the carousel speed adjustment formula dynamically adjusted the overall visualization effect of the relationship diagram based on the importance and display time of the node, making the relationship diagram display more attractive and informative.

[0088]

[0089] It can be seen from Table 1 that the relationship diagram pop-up carousel logic algorithm based on the ECharts component of the present invention is significantly better than the prior art in terms of user interaction effect and information display efficiency, which can be specifically analyzed from the following three aspects:

[0090] User clicks and viewing time: Compared with the prior art, the present invention significantly increases the number of user clicks and viewing time. For node 1, the number of clicks increases from 150 to 230, and the viewing time increases from 35 seconds to 50 seconds. This shows that the present invention can attract more users to participate and stay when displaying information, thereby improving the user experience;

[0091] Node connectivity and display effect: By comparing the connectivity of nodes, we found that the present invention performs better in displaying complex relationships. The connectivity of node 1 increases from 10 to 12, and the connectivity of node 2 increases from 8 to 9. This shows that the algorithm of the present invention has obvious advantages in processing node relationships and displaying complexity, and can better reflect the relationship between nodes.

[0092] Comprehensive importance index K: The present invention is significantly higher than the prior art. The index of node 1 increases from 1.48 to 2.63, and the index of node 2 increases from 1.22 to 2.15. This further verifies that the present invention can provide a more accurate and effective display effect after comprehensively considering the number of clicks, viewing time, and node connectivity.

[0093] Based on the above analysis, the present invention not only improves the flexibility and interactivity of data display, but also can more effectively attract user attention and enhance the visualization effect of data by dynamically adjusting the pop-up carousel logic and optimizing the relationship diagram display.

[0094] The configurable function of the pop-up carousel logic can flexibly meet the user's requirements for display content. Through the visualization function of the ECharts component, the content and effects to be displayed can be dynamically displayed to achieve better display effects. This algorithm can be widely used in the field of power system monitoring to improve the display form of power system indicators.

[0095] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. The relationship diagram pop-up carousel logic algorithm based on ECharts component is characterized by: The following steps are involved: S1: Determine the presentation format of the relationship diagram; S2: Determine the node data displayed in the relationship graph, the relationship data between the nodes, and the relationship type between the two nodes according to the displayed content, and construct a relationship complexity calculation formula; S3: Transmitting the data collected by the data interface to the data processing center through the communication network; S4: Configure the pop-up carousel logic through the relationship graph algorithm and build a node weight calculation formula; S5: Perform pop-up carousel according to the configured algorithm; The node weight calculation formula is as follows: Where N represents the total number of nodes, n i represents the i-th node, i=1, 2, 3, ..., N, W(n i ) represents node n i The weight represents the importance of the node, f k (n i ) represents node n i The kth indicator score of i Total number of indicators; In the output result of the node weight calculation formula, the node weight threshold is set to W min ; If W(n i )>W min , then the node is an important node and should be highlighted in the subsequent carousel logic; If W(n i )≤W min , then the node is a non-important node and does not need to be highlighted in the subsequent carousel logic; The relationship complexity calculation formula is as follows: Among them, R(n i ,n i+1 ) represents node n i and n i+1 The complexity of the relationship between j (n i ,n i+1 ) represents node n i and n i+1 The jth relationship metric between nodes, J represents the total number of relationship metrics between nodes; In the output of the relational complexity calculation formula, set the complexity threshold R max ; If R(n i ,n i+1 )>R max , it means that the relationship between nodes is highly complex and an intuitive display method should be used in the relationship diagram; If R(n i ,n i+1 )≤R max , it means that the complexity of the relationship between nodes is low and there is no need to display it directly in the relationship graph; A node display time adjustment formula is constructed according to the output result of the relationship complexity calculation formula and the output result of the node weight calculation formula. The node display time adjustment formula is as follows: Among them, d(n i ) represents node n i The display time indicates the display time of the node in the carousel. Represents the decay factor based on the complexity of the relationship as the complexity of the relationship R(n i ,n i+1 ) increases, the attenuation factor decreases, and α represents the control of the attenuation rate; In the output result of the node display adjustment formula, set the node display time threshold d min ; If d(n i )<d min , you need to increase the display time of the node; If d(n i )≥d min , there is no need to increase the display time of the node; The carousel speed adjustment formula is constructed according to the output result of the node display time adjustment formula. The carousel speed adjustment formula is as follows: Among them, S(t) represents the carousel speed adjustment function, which represents the carousel speed at time t. is a logic function used to control the smoothness of speed change. Parameter β determines the sensitivity of speed adjustment. T represents the total duration of the carousel cycle. In the output result of the carousel speed adjustment formula, set the upper limit of the carousel speed threshold S max and the lower threshold S min ; If S(t)>S max ,The carousel speed needs to be slowed down; If S min ≤S(t)≤S max ; No need to adjust the carousel speed; If S(t)<S min , you need to increase the carousel speed.

2. The ECharts component-based relationship diagram pop-up carousel logic algorithm according to claim 1 is characterized by: The index score includes the number of user clicks, viewing time and node connectivity.