WO2019041653A1 - 展示思维导图的方法、装置、设备及存储介质 - Google Patents
展示思维导图的方法、装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2019041653A1 WO2019041653A1 PCT/CN2017/116789 CN2017116789W WO2019041653A1 WO 2019041653 A1 WO2019041653 A1 WO 2019041653A1 CN 2017116789 W CN2017116789 W CN 2017116789W WO 2019041653 A1 WO2019041653 A1 WO 2019041653A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- hidden
- child
- displayed
- nodes
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/103—Formatting, i.e. changing of presentation of documents
- G06F40/106—Display of layout of documents; Previewing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9038—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/904—Browsing; Visualisation therefor
Definitions
- the embodiments of the present invention relate to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for displaying a mind map.
- Mind maps also known as brain maps, mental maps, brainstorming diagrams, brainstorming diagrams, concept maps, tree diagrams, tree branches, or mind maps, are an image-based thinking tool and an image-based thinking aid.
- the mind mapping software on the market displays the child nodes step by step when playing the mind map, that is, when clicking the expand button on the current node, all the hidden child nodes of the current node are displayed at one time.
- This way of displaying the child nodes of the mind map is not flexible enough, and the controllability is poor, and it is not suitable for use in a teaching scene with fine control requirements for the rhythm.
- the embodiments of the present invention provide a method, a device, a device, and a storage medium for displaying a mind map, so as to improve flexibility and controllability when displaying a mind map.
- the embodiment of the present invention adopts the following technical solutions:
- an embodiment of the present invention provides a method for displaying a mind map, including:
- the node information including a hidden number value of the hidden child nodes of the node
- the node has a child node, and the hidden quantity value is greater than 0, generating an expansion button on the node;
- an embodiment of the present invention provides an apparatus for displaying a mind map, including:
- a node information acquiring module configured to acquire node information of each node that the mind map has displayed, where the node information includes a hidden quantity value of the hidden child node of the node;
- An expansion button generating module is configured to generate an expansion button on the node if the node has a child node and the hidden quantity value is greater than 0;
- the node display module is configured to display a hidden child node of the first node where the expansion button is located when the first click signal is detected by the expansion button.
- an embodiment of the present invention provides an apparatus, including:
- One or more processors are One or more processors;
- a storage device for storing one or more programs
- the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement a method of presenting a mind map provided by any of the embodiments of the present invention.
- an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, and when the program is executed by the processor, the method for displaying a mind map provided by any embodiment of the present invention is implemented.
- the embodiment of the invention provides a method, a device, a device and a storage medium for displaying a mind map, which are used to obtain a hidden number value of a hidden child node under each node in the displayed mind map, and for a node whose hidden quantity value is greater than 0, A corresponding expansion button is generated.
- the first click signal is detected by the expansion button, a technical solution of displaying a hidden child node of the first node where the expansion button is located is achieved, and the hidden child of the node is displayed one by one by clicking the expansion button on the node.
- the technical effects of the nodes improve the flexibility and controllability of displaying mind maps.
- FIG. 1 is a schematic flow chart of a method for displaying a mind map according to an embodiment of the present invention
- FIG. 2 is a display diagram of a mind map in a non-display mode according to an embodiment of the present invention
- FIG. 3 is a display diagram after the mind map of FIG. 2 is set to display mode one by one;
- FIG. 4 is a display diagram of a mind map according to an embodiment of the present invention.
- Figure 5 is a diagram showing the mind map after clicking the right expand button of the "Demo" node in Figure 4;
- FIG. 6 is a schematic flowchart of a method for displaying a mind map according to an embodiment of the present invention.
- Figure 7 is an enlarged state diagram of the mind map after clicking the right contraction button of the "Demo" node in Figure 3;
- FIG. 8 is a schematic flowchart of a method for displaying a mind map according to an embodiment of the present invention.
- FIG. 9 is a schematic flow chart of an optional real-time mode of S350 of FIG. 8;
- FIG. 10 is a schematic flow chart of an optional real-time mode of S360 in FIG. 8;
- FIG. 11 is a schematic diagram of a circumscribed rectangle of a node in a mind map according to an embodiment of the present invention.
- FIG. 12 is a diagram showing a mind map of an embodiment-by-display mode according to an embodiment of the present invention.
- Figure 13 is a diagram showing the mind map after clicking the right contraction button of the "11111" node in Figure 12;
- Figure 14 is a diagram showing the mind map after clicking the right expand button of the "11111" node in Figure 13;
- FIG. 15 is a schematic structural diagram of an apparatus for displaying a mind map according to an embodiment of the present invention.
- FIG. 16 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- FIG. 1 is a method for displaying a mind map, which can be applied to a scene for displaying a mind map, for example, a scene showing a mind map during a teaching process, and the method can be performed by displaying a mind map.
- the device is implemented, and the device can be implemented by software and/or hardware.
- the technical solution provided in this embodiment may specifically include the following content:
- each node of the mind map corresponds to a data structure
- each data resolution record has a current expanded hidden state of the corresponding node, and the number of child nodes of the node;
- the child nodes of the node include a display child node And hide the child nodes, the display child nodes refer to the child nodes that have been displayed under the node, and the hidden child nodes refer to the child nodes that are not displayed under the node.
- FIG. 2 is a display diagram of a mind map in a non-display mode, that is, a mind map displayed before being set to display modes one by one.
- the "demo" node is a central node, and its child nodes have left and right points; the "11111" node, the "22222” node, the "333333” node, and the "444444” node are right display children of the "demo” node;
- the 011111” node and the "022222” node are display sub-nodes of the "11111” node; the "122222” node and the "322222” node are display sub-nodes of the "22222” node.
- the displayed mind map is set to display mode one by one, according to the number of child nodes of each node under the displayed mind map, and each child node Expand the hidden state, and count the number of hidden child nodes under each node as the hidden quantity value in the node information.
- the hidden number of hidden child nodes is displayed on the expanded button generated on the node.
- the user interface of the mind map is changed from the "demo" node, and the child nodes of the "demonstration" node can be divided into left and right sides.
- the nodes in two directions that is, the left child node (not shown in the drawing) and the right child node, the left child node set of the "demo” node is LNodes, the right child node set is RNodes, and the RNodes include "11111" node, "22222" node, "333333" node, and "444444" node.
- the "demo" node and its right child node To change the user interface of the mind map, first start from the "demo" node and its right child node, get the expanded hidden state of all right child nodes of the "demo” node, and determine the hidden number value of the right hidden child node of the "demo” node. 0; the right child node of the "demo” node is N1, N1 ⁇ RNodes, and the hidden state of all the child nodes of the N1 node is obtained. If the child node of the N1 node exists, and the hidden number of the hidden child node of the N1 node is greater than 0, the expansion button is generated on the N1 node, and the hidden quantity value is displayed on the expansion button. For example, the "1" displayed on the "333333” node is the expansion button generated on the node, indicating that the "333333" node has one. Hide child nodes.
- the recursive method is used to traverse all the child nodes of the N1 node, and perform the same operations as the above N1 nodes for all the child nodes of the N1 node.
- the left end of the node generates a left expansion button "2"; the left child node of the "demo” node is N2, N2 ⁇ LNodes, and the expanded hidden state of all child nodes of the N2 node is acquired, if the N2 node has child nodes, and the N2 node If the hidden number of hidden child nodes is greater than 0, an expand button is generated at the N2 node, and a hidden quantity value is displayed on the expanded button.
- the recursive method is used to traverse all the child nodes of the N2 node, and perform the same operations as the above N2 nodes for all the child nodes of the N2 node.
- the node has a child node and the hidden quantity value is greater than 0, including two cases.
- the child nodes of the node are all hidden child nodes, and the hidden quantity value is equal to the number of child nodes; the other is the node
- the child node includes a partially hidden child node and a partial display child node, and the hidden quantity value is smaller than the number of child nodes.
- the expand button on the node displays the hidden quantity value.
- the first click signal refers to a signal generated by a single click on the expand button.
- the mind map in an expanded mode is shown in Figure 4.
- the right expand button "2" of the "Demo” node the "333333" child node of the "Demo” node is displayed, and the right expand button of the "Demo” node is displayed.
- the hidden number value displayed above is decremented by 1, that is, the right expansion button becomes “1", indicating that the right display child node of the "demo” node is incremented by one, and the corresponding right hidden child node is decremented by one, and the thinking as shown in FIG. 5 is obtained.
- Map Map.
- a right-behind child node of the “Demo” node is displayed, which is highly flexible and controllable when displaying the mind map.
- the hidden child nodes of the node may be displayed one by one by clicking the expansion button of the node multiple times.
- a corresponding expansion button is generated, and When the button detects the first click signal, it displays a hidden child node of the first node where the expansion button is located.
- the realization of the hidden child nodes of the nodes is displayed one by one by clicking the expand button on the node, which improves the flexibility and controllability when displaying the mind map.
- the embodiment further includes:
- the child nodes of the nodes in the mind map can be composed of three cases.
- the first case if the node is a leaf node and has no child nodes, no operation is performed on the node, as shown in the "444444" node in FIG. 2, and there is no change in FIG. 3.
- the second case if the node exists If the node has a hidden quantity value greater than 0, then S220 is performed; in the third case, if the node has a child node and the hidden quantity value is equal to 0, then S240 described below is performed.
- the user interface of the mind map is changed from the "demo" node, and the child nodes of the "demonstration" node can be divided into left and right sides.
- the nodes in two directions that is, the left child node (not shown in the drawing) and the right child node, the left child node set of the "demo” node is LNodes, the right child node set is RNodes, and the RNodes include "11111" node, "22222" node, "333333" node, and "444444" node.
- a shrink button is generated at the N1 node, such as a shrink button generated on the "11111” node, indicating that the child nodes of the "11111" node have all been displayed, and no child nodes are hidden.
- the left child node of the "demo" node is N2, N2 ⁇ LNodes, and the expanded hidden state of all the child nodes of the N2 node is obtained. If the N2 node has a child node and the N2 node is hidden, The hidden number value of the child node is equal to 0, and a shrink button is generated at the N2 node.
- the recursive method is used to traverse all the child nodes of the N2 node, and perform the same operations as the above N2 nodes for all the child nodes of the N2 node.
- the second click signal refers to a signal generated by a single click of the shrink button. For example, after clicking the right shrink button of the "Demo" node in Figure 3, all the right display children of the "Demo" node are hidden, and the mind map as shown in Fig. 7 is obtained.
- All child nodes of a node can be quickly hidden by clicking the shrink button on the node.
- the technical solution provided by the embodiment can display the hidden child nodes of the node one by one by clicking the expand button on the node, thereby improving the flexibility and controllability when displaying the mind map; by clicking the shrink button on the node It can quickly hide all the child nodes of the node, and the operation is convenient and fast.
- each node in the mind map corresponds to a data structure
- the current hidden state of the node is recorded to display or hide the node according to the expanded state of the record when the node is displayed again, wherein, in the data structure
- the unfolded hidden state of the node is recorded by the flag bit.
- N When clicking the expand button on the node, get the child node N currently to be displayed, use the recursive algorithm to traverse the child node of N (NChildren), take n1 ⁇ NChildren, and if the n1 node records the current expanded hidden state as the display, then display n1 Node, and continue to traverse the child nodes of the n1 node, perform the same operation, until the n1 node records the current expansion hidden state for the displayed nodes are all displayed, ending the traversal; if the n1 node records the current expanded hidden state is hidden, then hidden The n1 node no longer traverses the children of n1.
- the shrink button of the "11111” node of the mind map in Fig. 12 is clicked, the child nodes ("011111” node and "022222” node) of the "11111” node are hidden, and the thinking as shown in Fig. 13 is obtained.
- the click button "2" of the "11111” node of the mind map in FIG. 13 is clicked again, the "011111” child node of the "11111” node is displayed according to the principle of sequential display, and the "011111” node is simultaneously displayed.
- the two display child nodes (“sub-theme 0" node and "sub-topic 1” node) the expansion button "2" of the "11111” node becomes the expansion button "1", and the mind map as shown in FIG. 14 is obtained. .
- the step of displaying a hidden child node of the first node where the expansion button is located includes:
- the hidden child nodes currently to be displayed are determined according to the child node ordering of the first node
- the method further includes:
- the spacing between the display sub-nodes of the first node is adaptively adjusted.
- the method further includes:
- the hidden child nodes to be displayed are determined according to the child node ordering of the nodes, and the overall layout of the mind map is adaptively adjusted when the hidden child nodes are displayed.
- the screen coordinate system takes the upper left corner as the coordinate origin, the horizontal direction is the X axis, and the vertical direction is the Y axis.
- each node has a corresponding coordinate value, and the node is taken as a child node.
- the hidden child node to be displayed is determined according to the number of nodes of the child node hidden by the node and the number of nodes of the child node that has been displayed, and the child node with the smallest Y value in the hidden child node is preferably selected.
- the hidden child node currently to be displayed For example, click the right expand button "2" of the "Demo" node in Figure 4, and according to the sequential display principle, determine that the "333333" node is the hidden child node currently to be displayed.
- the S350 may specifically include the following steps:
- S351. Determine, according to a bottom value of a circumscribed rectangle of a neighboring node of the newly displayed child node, a height value of a circumscribed rectangle of the newly displayed child node, and a first spacing value between adjacent child nodes of the first node, to determine a new display.
- the new display child node (the hidden child node to be displayed) determined by the above S340 is referred to as a Node, and the peer node of the Node needs to be the same (referring to have the same parent node as the Node). Node) for layout.
- the right expansion button "2" of the "Demo” node in FIG. 4 in the screen coordinate system, the "333333" node in FIG.
- the original display sub-node ie, the "11111” node and the "22222” node
- the original display sub-node ie, the "11111” node and the "22222” node
- the "333333” node is displayed based on the display position Location to ensure the "333333” node and the adjacent display sub-node. There is no overlap between them, and the final display of the mind map is shown in Figure 5.
- S360 adaptively adjust the spacing between sibling nodes of the parent node of the first node.
- S360 may specifically include the following steps:
- S362. Determine a second correction distance of the upper adjacent node according to a height value of the circumscribed rectangle of the parent node, a bottom value of the circumscribed rectangle of the upper adjacent node, and a second spacing value between the peer nodes of the parent node.
- S363. Determine a third correction distance of the next adjacent node according to a bottom value of the parent node's circumscribed rectangle, a height value of the circumscribed rectangle of the lower neighbor node, and a second distance value between the peer nodes of the parent node.
- the recursive algorithm is further used for the parent node ParentN of the node (referring to the node that is clicked on the expansion button) Adjust the layout between peer nodes (referring to nodes with the same parent node as the ParentN node).
- the set PNodes of the peer nodes of the ParentN node are obtained, and each node in the PNodes is traversed, and the circumscribing rectangle of each node in the PNodes is obtained, and the adjacent nodes on the ParentN node are determined to be adjacent according to the PNodes.
- the node Map1 ⁇ Rect, Node ⁇ determines that the node adjacent to the ParentN node is the next adjacent node Map2 ⁇ Rect, Node ⁇ ;
- the circumscribed rectangle of the ParentN node is PR
- the height of the PR is PR.Top
- the bottom value of the PR is PR.Bottom
- the bottom value of the circumscribed rectangle of the adjacent node is Map1.Rect.Bottom
- the external node of the lower node is connected.
- the height value of the rectangle is Map2.Rect.Top
- the second spacing value between the peer nodes of the ParentN node is S;
- the upper adjacent node Map1 ⁇ Rect, Node ⁇ is moved up by the second correction distance Offset1
- the lower adjacent node Map2 ⁇ Rect, Node ⁇ is moved downward by the third correction distance Offset2.
- the overall layout realizes the hidden sub-nodes of the nodes one by one, which improves the flexibility and controllability when displaying the mind map.
- the overall layout of the mind map is adjusted to ensure the correct nodes. layout.
- an apparatus 400 for displaying a mind map may include the following content:
- the node information obtaining module 410 is configured to acquire node information of each node that the mind map has displayed, and the node information includes a hidden quantity value of the hidden child node of the node.
- the button generation module 420 is configured to generate an expansion button on the node if the node has a child node and the hidden quantity value is greater than zero.
- the node display module 430 is configured to display a hidden child node of the first node where the expansion button is located when the first click signal is detected by the expansion button.
- a corresponding expansion button is generated, and When the button detects the first click signal, it displays a hidden child node of the first node where the expansion button is located.
- the realization of the hidden child nodes of the nodes is displayed one by one by clicking the expand button on the node, which improves the flexibility and controllability when displaying the mind map.
- the hidden quantity value is displayed on the expansion button.
- the device 400 may further include:
- the shrink button generation module is configured to generate a shrink button on the node if the node has a child node and the hidden quantity value is equal to 0.
- the node hiding module is configured to hide all the child nodes of the second node where the shrink button is located when the second click signal is detected by the shrink button.
- the node display module 430 is specifically configured to:
- the hidden child nodes to be displayed are determined according to the child node ordering of the first node; the hidden child nodes currently to be displayed are displayed to form a new display child node.
- the device 400 may further include:
- the first adjustment module is configured to adaptively adjust the spacing between the display sub-nodes of the first node.
- the second adjustment module is configured to adaptively adjust the spacing between the peer nodes of the parent node of the first node.
- the first adjustment module is specifically configured to:
- the original display child node is moved up by the first correction distance, and the new display child node is displayed based on the display position.
- the second adjustment module is specifically configured to:
- the upper adjacent node is moved up by the second correction distance, and the lower adjacent node is moved downward by the third correction distance.
- FIG. 16 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
- FIG. 16 shows a block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention.
- the device 12 shown in Fig. 16 is merely an example and should not impose any limitation on the function and scope of use of the embodiments of the present invention.
- device 12 is embodied in the form of a general purpose computing device.
- the components of device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects different system components, including system memory 28 and processing unit 16.
- Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
- these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA Bus, a Video Electronics Standards Association (VESA) local bus, and peripheral component interconnects ( PCI) bus.
- ISA Industry Standard Architecture
- MAC Micro Channel Architecture
- VESA Video Electronics Standards Association
- PCI peripheral component interconnects
- Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
- System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and/or cache memory 32.
- Device 12 may further include other removable/non-removable, volatile/non-volatile computer system storage media.
- storage system 34 may be used to read and write non-removable, non-volatile magnetic media (not shown in Figure 16, commonly referred to as "hard disk drives").
- a disk drive for reading and writing to a removable non-volatile disk such as a "floppy disk”
- a removable non-volatile disk for example, a CD-ROM, a DVD-ROM
- each drive can be coupled to bus 18 via one or more data medium interfaces.
- Memory 28 can include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.
- a program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including but not limited to an operating system, one or more applications, other program modules, and program data. An implementation of the network environment may be included in each or some of these examples.
- Program module 42 typically performs the functions and/or methods of the described embodiments of the present invention.
- Device 12 may also be in communication with one or more external devices 14 (eg, a keyboard, pointing device, display 24, etc.), and may also be in communication with one or more devices that enable a user to interact with the device 12, and/or Device 12 can communicate with any device (e.g., network card, modem, etc.) that is in communication with one or more other computing devices. This communication can take place via an input/output (I/O) interface 22. Also, device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network WAN) and/or a public network, such as the Internet, through network adapter 20. As shown, network adapter 20 communicates with other modules of device 12 via bus 18.
- I/O input/output
- network adapter 20 communicates with other modules of device 12 via bus 18.
- Processing unit 16 executes various functional applications and data processing by executing programs stored in system memory 28, such as a method of presenting a mind map provided by any of the embodiments of the present invention.
- the embodiment of the present invention further provides a computer readable storage medium, wherein the computer program is stored, and when the program is executed by the processor, the method for displaying a mind map provided by any embodiment of the present invention is implemented, and the method includes :
- the node information including a hidden number value of the hidden child nodes of the node
- the node has a child node, and the hidden quantity value is greater than 0, generating an expansion button on the node;
- the computer storage medium of the embodiments of the present invention may employ any combination of one or more computer readable mediums.
- the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
- the computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above.
- a computer readable storage medium can be any tangible medium that can contain or store a program, which can be used by or in connection with an instruction execution system, apparatus or device.
- a computer readable signal medium may include a data signal that is propagated in the baseband or as part of a carrier, carrying computer readable program code. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
- the computer readable signal medium can also be any computer readable medium other than a computer readable storage medium, which can transmit, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device. .
- Program code embodied on a computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
- Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including an object oriented programming language - such as Java, Smalltalk, C++, and also conventional. Procedural programming language - such as the "C" language or a similar programming language.
- the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer, partly on the remote computer, or entirely on the remote computer or device.
- the remote computer can be connected to the user's computer via any kind of network, including a local area network (LAN) or wide area network (WAN), or can be connected to an external computer (eg, using an Internet service provider) Internet connection).
- LAN local area network
- WAN wide area network
- Internet service provider Internet service provider
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本发明实施例公开了一种展示思维导图的方法、装置、设备及存储介质。其中,方法包括:获取思维导图已显示的各节点的节点信息,节点信息包括节点的隐藏子节点的隐藏数量值;若节点存在子节点,且隐藏数量值大于0,则在节点上生成展开按钮;通过展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。通过点击节点上的展开按钮,逐个展示节点的隐藏子节点的技术效果,提高了展示思维导图时的灵活性和可控性。
Description
本发明实施例涉及计算机技术领域,尤其涉及一种展示思维导图的方法、装置、设备及存储介质。
思维导图又称脑图、心智地图、脑力激荡图、灵感触发图、概念地图、树状图、树枝图或思维地图,是一种图像式思维的工具以及一种利用图像式思考辅助工具。
目前市面上的思维导图软件,在播放思维导图时,都是逐级展示子节点,即点击当前节点上的展开按钮时,一次展示当前节点所有隐藏的子节点。这种展示思维导图子节点的方式不够灵活,可控性较差,不适合用于对节奏把控要求精细的教学场景中。
发明内容
为解决相关技术问题,本发明实施例提供一种展示思维导图的方法、装置、设备及存储介质,以提高展示思维导图时的灵活性和可控性。
为实现上述目的,本发明实施例采用如下技术方案:
第一方面,本发明实施例提供了一种展示思维导图的方法,包括:
获取思维导图已显示的各节点的节点信息,所述节点信息包括所述节点的隐藏子节点的隐藏数量值;
若所述节点存在子节点,且所述隐藏数量值大于0,则在所述节点上生成展开按钮;
通过所述展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
第二方面,本发明实施例提供了一种展示思维导图的装置,包括:
节点信息获取模块,用于获取思维导图已显示的各节点的节点信息,所述节点信息包括所述节点的隐藏子节点的隐藏数量值;
展开按钮生成模块,用于若所述节点存在子节点,且所述隐藏数量值大于0,则在所述节点上生成展开按钮;
节点展示模块,用于通过所述展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
第三方面,本发明实施例提供了一种设备,包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明任一实施例所提供的展示思维导图的方法。
第四方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本发明任一实施例所提供的展示思维导图的方法。
本发明实施例提供的技术方案带来的有益效果:
本发明实施例提供一种展示思维导图的方法、装置、设备及存储介质,采用获取已显示的思维导图中各节点下隐藏子节点的隐藏数量值,对于隐藏数量值大于0的节点,生成相应的展开按钮,当通过展开按钮检测到第一点击信号 时,展示该展开按钮所在第一节点的一个隐藏子节点的技术方案,达到通过点击节点上的展开按钮,逐个展示节点的隐藏子节点的技术效果,提高了展示思维导图时的灵活性和可控性。
为了更清楚地说明本发明实施例中的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单的介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据本发明实施例的内容和这些附图获得其他的附图。
图1是本发明实施例提供的一种展示思维导图的方法流程示意图;
图2是本发明实施例提供的一种非逐个展示模式下的思维导图的展示图;
图3是将图2中的思维导图设置为逐个展示模式后的展示图;
图4是本发明实施例提供的一种逐个展示模式下的思维导图的展示图;
图5是点击图4中“演示”节点的右展开按钮后思维导图的展示图;
图6是本发明实施例提供的一种展示思维导图的方法流程示意图;
图7是点击图3中“演示”节点的右收缩按钮后思维导图的放大状态图;
图8是本发明实施例提供的一种展示思维导图的方法流程示意图;
图9是图8中S350的一种可选实时方式的流程示意图;
图10是图8中S360的一种可选实时方式的流程示意图;
图11是本发明实施例提供的一种思维导图中节点的外接矩形的示意图;
图12是本发明实施例提供的一种逐个展示模式下的思维导图的展示图;
图13是点击图12中“11111”节点的右收缩按钮后思维导图的展示图;
图14是点击图13中“11111”节点的右展开按钮后思维导图的展示图;
图15是本发明实施例提供的一种展示思维导图的装置的架构示意图;
图16是本发明实施例提供的一种设备的结构示意图。
为使本发明解决的技术问题、采用的技术方案和达到的技术效果更加清楚,下面将结合附图对本发明实施例的技术方案作进一步的详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参考图1,本实施例提供的一种展示思维导图的方法,可应用于展示思维导图的场景,例如,教学过程中展示思维导图的场景,该方法可以由展示思维导图的装置来执行,该装置可以由软件和/或硬件来实现。
如图1所示,本实施例提供的技术方案,具体可以包括如下内容:
S110、获取思维导图已显示的各节点的节点信息,节点信息包括节点的隐藏子节点的隐藏数量值。
在一个实施例中,思维导图的每个节点都对应一个数据结构,每个数据解决记录有对应节点当前的展开隐藏状态,及该节点的子节点个数;节点的子节点包括展示子节点和隐藏子节点,展示子节点是指节点下已显示的子节点,隐藏子节点是指节点下未展示的子节点。
例如,图2是一种非逐个展示模式下的思维导图的展示图,即在设置为逐个展示模式前,显示的思维导图。其中,“演示”节点为中心节点,其子节点有左右之分;“11111”节点、“22222”节点、“333333”节点和“444444”节点均为“演示”节点的右展示子节点;“011111”节点和“022222”节点为“11111”节点的展示子节 点;“122222”节点和“322222”节点为“22222”节点的展示子节点。
示例性的,在播放思维导图时,根据用户的操作事件,将已显示的思维导图设置为逐个展示模式,根据已显示的思维导图下各节点的子节点个数,及各子节点的展开隐藏状态,统计各节点下隐藏子节点的数量值,作为节点信息中的隐藏数量值。
S120、若节点存在子节点,且隐藏数量值大于0,则在节点上生成展开按钮。
优选的,节点上生成的展开按钮上显示有隐藏子节点的隐藏数量值。
在一个实施例中,在将图2所示的思维导图设置为逐个展示模式时,从“演示”节点开始更改思维导图的用户界面,“演示”节点的子节点可分为左边和右边两个方向的节点,即左子节点(附图中未示出)和右子节点,记“演示”节点的左子节点集合为LNodes,右子节点集合为RNodes,RNodes包括“11111”节点、“22222”节点、“333333”节点和“444444”节点。
更改思维导图的用户界面,首先从“演示”节点及其右子节点开始,获取“演示”节点的所有右子节点的展开隐藏状态,确定“演示”节点的右隐藏子节点的隐藏数量值为0;记“演示”节点的右子节点为N1,N1∈RNodes,获取N1节点的所有子节点的展开隐藏状态,如果N1节点存在子节点,并且N1节点的隐藏子节点的隐藏数量值大于0,则在N1节点生成展开按钮,并在该展开按钮上显示隐藏数量值,如“333333”节点上显示的“①”即为该节点上生成的展开按钮,表示“333333”节点有1个隐藏子节点。
采用递归方法,遍历N1节点的所有子节点,对N1节点的所有子节点,分别执行与上述N1节点相同的操作。
然后再从“演示”节点及其左子节点开始,获取“演示”节点的所有左子节点的展开隐藏状态,确定“演示”节点的左隐藏子节点的隐藏数量值为2,则在“演示” 节点的左端生成左展开按钮“②”;记“演示”节点的左子节点为N2,N2∈LNodes,获取N2节点的所有子节点的展开隐藏状态,如果N2节点存在子节点,并且N2节点的隐藏子节点的隐藏数量值大于0,则在N2节点生成展开按钮,并在该展开按钮上显示隐藏数量值。
采用递归方法,遍历N2节点的所有子节点,对N2节点的所有子节点,分别执行与上述N2节点相同的操作。
需要说明的是,节点存在子节点且隐藏数量值大于0,包括两种情况,一种是节点的子节点全部是隐藏子节点,则隐藏数量值等于子节点个数;另一种是节点的子节点包括部分隐藏子节点和部分展示子节点,则隐藏数量值小于子节点个数。当节点的隐藏数量值大于0时,不论是那种情况,节点上的展开按钮均显示隐藏数量值。
执行上述更改思维导图的用户界面的操作之后,获得如图3所示的思维导图。
S130、通过展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
在一个实施例中,第一点击信号是指单次点击展开按钮产生的信号。一个展开模式下的思维导图如图4所示,点击“演示”节点的右展开按钮“②”时,展示“演示”节点的“333333”子节点,同时,“演示”节点的右展开按钮上显示的隐藏数量值减1,即该右展开按钮变为“①”,表示“演示”节点的右展示子节点加1,相应的右隐藏子节点减1,获得如图5所示的思维导图。通过点击“演示”的右展开按钮,展示“演示”节点的一个右隐藏子节点,在展示思维导图时,灵活性高、可控性强。在其它实施例中,如果节点的隐藏子节点有多个,通过多次点击该节点的展开按钮,即可逐个展示该节点的隐藏子节点。
需要说明的是,如果节点的隐藏子节点的隐藏数量值为1,即相应的展开按钮为“①”,则点击该展开按钮后,由于隐藏数量值变为0,该节点上不再显示展开按钮。
综上,在本实施例的技术方案中,通过获取已显示的思维导图中各节点下隐藏子节点的隐藏数量值,对于隐藏数量值大于0的节点,生成相应的展开按钮,当通过展开按钮检测到第一点击信号时,展示该展开按钮所在第一节点的一个隐藏子节点。实现通过点击节点上的展开按钮,逐个展示节点的隐藏子节点,提高了展示思维导图时的灵活性和可控性。
请参考图6,本实施例在上述实施例的基础上,可选的,在获取思维导图已显示的各节点的节点信息的步骤之后,还包括:
若节点存在子节点,且隐藏数量值等于0,则在节点上生成收缩按钮;
通过收缩按钮检测到第二点击信号时,隐藏该收缩按钮所在的第二节点的全部子节点。
由此,实现在节点上还可生成收缩按钮,通过点击收缩按钮可隐藏相应节点的全部子节点。
基于上述优化,如图6所示,本实施例提供的技术方案具体如下:
S210、获取思维导图已显示的各节点的节点信息,节点信息包括节点的隐藏子节点的隐藏数量值。
示例性的,如图2所示,思维导图中节点的子节点可以由三种情况。第一种情况,若节点为叶子节点,没有子节点,则不对该节点执行任何操作,如图2中的“444444”节点,在图3中没有任何变化;第二种情况,若节点存在子节点,且隐藏数量值大于0,则执行下述S220;第三种情况,若节点存在子节点,且 隐藏数量值等于0,则执行下述S240。
S220、若节点存在子节点,且隐藏数量值大于0,则在节点上生成展开按钮。
本步骤的具体细节内容,请参考图1对应的实施例,在此不再赘述。
S230、通过展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
需要说明的是,如果节点的隐藏子节点的隐藏数量值为1,即相应的展开按钮为“①”,则点击该展开按钮后,由于隐藏数量值变为0,该节点上不再显示展开按钮,而在该节点上显示一个收缩按钮
表示该节点的全部子节点都已经展示。其它的具体细节内容,请参考图1对应的实施例,在此不再赘述。
S240、若节点存在子节点,且隐藏数量值等于0,则在节点上生成收缩按钮。
在一个实施例中,在将图2所示的思维导图设置为逐个展示模式时,从“演示”节点开始更改思维导图的用户界面,“演示”节点的子节点可分为左边和右边两个方向的节点,即左子节点(附图中未示出)和右子节点,记“演示”节点的左子节点集合为LNodes,右子节点集合为RNodes,RNodes包括“11111”节点、“22222”节点、“333333”节点和“444444”节点。
更改思维导图的用户界面,首先从“演示”节点及其右子节点开始,获取“演示”节点的所有右子节点的展开隐藏状态,确定“演示”节点的右隐藏子节点的隐藏数量值为0,则在“演示”节点的右端生成右收缩按钮
记“演示”节点的右子节点为N1,N1∈RNodes,获取N1节点的所有子节点的展开隐藏状态,如果N1节点存在子节点,并且N1节点的隐藏子节点的隐藏数量值等于0,则在N1节点生成收缩按钮,如“11111”节点上生成的收缩按钮,表示“11111”节点的子节点已经全部展示,没有隐藏子节点。
采用递归方法,遍历N1节点的所有子节点,对N1节点的所有子节点,分 别执行与上述N1节点相同的操作。
然后再从“演示”节点及其左子节点开始,获取“演示”节点的所有左子节点的展开隐藏状态,确定“演示”节点的左隐藏子节点的隐藏数量值大于0,则在“演示”节点的左端只生成左展开按钮;记“演示”节点的左子节点为N2,N2∈LNodes,获取N2节点的所有子节点的展开隐藏状态,如果N2节点存在子节点,并且N2节点的隐藏子节点的隐藏数量值等于0,则在N2节点生成收缩按钮。
采用递归方法,遍历N2节点的所有子节点,对N2节点的所有子节点,分别执行与上述N2节点相同的操作。
执行上述更改思维导图的用户界面的操作之后,获得如图3所示的思维导图。
S250、通过收缩按钮检测到第二点击信号时,隐藏该收缩按钮所在的第二节点的全部子节点。
在一个实施例中,第二点击信号是指单次点击收缩按钮产生的信号。例如,点击图3中的“演示”节点的右收缩按钮后,隐藏“演示”节点的全部右展示子节点,获得如图7所示的思维导图。
通过点击节点上的收缩按钮,可快速隐藏节点的全部子节点。
综上,本实施例提供的技术方案,通过点击节点上的展开按钮,可逐个展示节点的隐藏子节点,提高了展示思维导图时的灵活性和可控性;通过点击节点上的收缩按钮,可快速隐藏节点的全部子节点,操作方便快捷。
需要说明的是,在展示节点的隐藏子节点时,除了展示该隐藏节点外,还需进一步判断该隐藏子节点的子节点是否需要展示。
在一个实施例中,思维导图中每个节点对应一个数据结构,记录节点当前 的展开隐藏状态,来实现再次展示节点的时候按记录的展开隐藏状态来展示或隐藏节点,其中,数据结构中通过标志位来记录节点的展开隐藏状态。当点击节点上的展开按钮时,获取当前要展示的子节点N,使用递归算法遍历N的子节点(NChildren),取n1∈NChildren,如果n1节点记录当前的展开隐藏状态为展示,则展示n1节点,并且继续遍历n1节点的子节点,执行相同操作,直至n1节点下记录当前的展开隐藏状态为展示的节点全部被展示,结束遍历;如果n1节点记录当前的展开隐藏状态为隐藏,则隐藏n1节点,不再遍历n1的子节点。
举例来说,如图12所示为思维导图的初始状态,在此状态中“011111”节点具有一个隐藏子节点和两个展示子节点(“子主题0”节点和“子主题1”节点),当点击图12中思维导图的“11111”节点的收缩按钮时,“11111”节点的子节点(“011111”节点和“022222”节点)均被隐藏,得到如图13所示的思维导图;当再次点击图13中思维导图的“11111”节点的展开按钮“②”时,根据按序展示原则,展示“11111”节点的“011111”子节点,并且同时展示“011111”节点的两个展示子节点(“子主题0”节点和“子主题1”节点),“11111”节点的展开按钮“②”变为展开按钮“①”,得到如图14所示的思维导图。
请参考图8,本实施例在上述实施例的基础上,可选的,通过展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点的步骤,包括:
通过展开按钮检测到第一点击信号时,根据第一节点的子节点排序,确定当前待展示的隐藏子节点;
展示当前待展示的隐藏子节点,形成新展示子节点。
进一步的,确定当前待展示的隐藏子节点的步骤之后,还包括:
自适应调整第一节点的各展示子节点之间的间距。
进一步的,自适应调整第一节点的各展示子节点之间的间距的步骤之后,还包括:
自适应调整第一节点的父节点的同级节点之间的间距。
由此,实现在点击节点的展开按钮时,根据节点的子节点排序,确定要展示的隐藏子节点,并在展示该隐藏子节点时,自适应调整思维导图的整体布局。
基于上述优化,如图8所示,本实施例提供的技术方案具体如下:
S310、获取思维导图已显示的各节点的节点信息,节点信息包括节点的隐藏子节点的隐藏数量值。
本步骤的具体细节内容,请参考图1对应的实施例,在此不再赘述。
S320、若节点存在子节点,且隐藏数量值大于0,则在节点上生成展开按钮。
本步骤的具体细节内容,请参考图1对应的实施例,在此不再赘述。
S330、通过展开按钮检测到第一点击信号时,根据第一节点的子节点排序,确定当前待展示的隐藏子节点。
在一个实施例中,屏幕坐标系以左上角为坐标原点,水平方向为X轴,竖直方向为Y轴,屏幕上显示思维导图时,各节点都有对应的坐标值,取节点下子节点在隐藏之前的Y值进行排序。当点击节点的展开按钮时,根据节点的子节点隐藏之前的Y值排序,和已经展示的子节点的节点数,确定待展示的隐藏子节点,优选隐藏子节点中Y值最小对应的子节点,作为当前待展示的隐藏子节点。例如,点击图4中“演示”节点的右展开按钮“②”,根据按序展示原则,确定“333333”节点为当前待展示的隐藏子节点。
S340、展示当前待展示的隐藏子节点,形成新展示子节点。
示例性的,点击图4中思维导图的“演示”节点的右展开按钮“②”,根据按序展示原则,展示“333333”节点,“333333”节点成为“演示”节点的一个新展示子节点,同时,右展开按钮“②”变为右展开按钮“①”,获得如图5所示的思维导图。
S350、自适应调整第一节点的各展示子节点之间的间距。
可选的,如图9所示,S350具体可包括如下步骤:
S351、根据新展示子节点的相邻节点的外接矩形的底部值,新展示子节点的外接矩形的高度值,以及第一节点的相邻子节点之间的第一间距值,确定新展示子节点的外接矩形的显示位置。
S352、根据新展示子节点的外接矩形的高度值,和第一节点的相邻子节点之间的第一间距值,确定第一节点的原展示子节点的第一修正距离。
S353、将原展示子节点向上移动第一修正距离,将新展示子节点基于显示位置进行显示。
在一个实施例中,点击节点上的展开按钮后,记上述S340确定的新展示子节点(待展示的隐藏子节点)为Node,需要对Node的同级节点(指与Node具有相同父节点的节点)进行布局。如图4所示,点击图4中“演示”节点的右展开按钮“②”时,在屏幕坐标系下,图5中的“333333”节点为相应的待展示的隐藏节点Node,根据“333333”节点的相邻展示节点(“22222”节点)的外接矩形(如图11所示,图11中的虚线框即为“22222”节点的外接矩形)的底部值Bottom,“333333”节点的外接矩形的高度值NHerght,以及“11111”节点和“22222”节点之间的第一间距值Noffset,可计算出“333333”节点的外接矩形的显示位置Location=Bottom-Nheight/2-Noffset/2+Noffset+ NHeight,即Location=Bottom+Noffset/2+NHeight/2。需要说明的是,外接矩形的显示位置是指该矩形中心所在的位置。
根据“333333”节点的外接矩形的高度值,和“11111”节点与“22222”节点之间的第一间距值Noffset,计算原展示子节点(即“11111”节点和“22222”节点)的第一修正距离L=Nheight/2+Noffset/2。
将原展示子节点(即“11111”节点和“22222”节点)向上移动第一修正距离L,将“333333”节点基于上述显示位置Location进行显示,以保证“333333”节点与相邻展示子节点之间不重叠,最终展示的思维导图如图5所示。
S360、自适应调整第一节点的父节点的同级节点之间的间距。
可选的,如图10所示,S360具体可包括如下步骤:
S361、确定第一节点的父节点的上相邻节点和下相邻节点。
S362、根据父节点的外接矩形的高度值,上相邻节点的外接矩形的底部值,以及父节点的同级节点之间的第二间距值,确定上相邻节点的第二修正距离。
S363、根据父节点的外接矩形的底部值,下相邻节点的外接矩形的高度值,以及父节点的同级节点之间的第二间距值,确定下相邻节点的第三修正距离。
S364、将上相邻节点向上移动第二修正距离,将下相邻节点向下移动第三修正距离。
在一个实施例中,在对Node节点的同级节点之间调整布局之后,为确保整个思维导图的布局正确,进一步使用递归算法对节点(指被点击展开按钮的节点)的父节点ParentN的同级节点(指与ParentN节点具有相同父节点的节点)之间调整布局。
具体的布局算法如下:
在屏幕坐标系下,获取ParentN节点的同级节点的集合PNodes,遍历PNodes 中的每个节点,获取PNodes中每个节点的外接矩形,根据PNodes确定与ParentN节点上相邻的节点为上相邻节点Map1{Rect,Node},确定与ParentN节点下相邻的节点为下相邻节点Map2{Rect,Node};
记ParentN节点的外接矩形为PR,PR的高度值为PR.Top,PR的底部值为PR.Bottom,上相邻节点的外接矩形的底部值为Map1.Rect.Bottom,下相邻节点的外接矩形的高度值为Map2.Rect.Top,ParentN节点的同级节点之间的第二间距值为S;
根据上述PR.Top、Map1.Rect.Bottom和S,计算上相邻节点的第二修正距离Offsetl=S-(PR.Top-Map1.Rect.Bottom);
根据上述PR.Bottom、Map2.Rect.Top和S,计算下相邻节点的第三修正距离Offset2=S-(Map2.Rect.Top-PR.Bottom);
将上相邻节点Map1{Rect,Node}向上移动第二修正距离Offsetl,将下相邻节点Map2{Rect,Node}向下移动第三修正距离Offset2。
如果ParentN的父节点不是中心节点,则令ParentN=ParentN.Parent,即对ParentN节点的父节点执行该布局算法,直至ParentN节点的父节点为中心节点为止,如此则完成了思维导图的整体自动布局,以确保节点正确布局。
综上,在本实施例的技术方案中,通过点击节点的展开按钮,根据节点的子节点排序,确定要展示的隐藏子节点,并在展示该隐藏子节点时,自适应调整思维导图的整体布局,实现逐个展示节点的隐藏子节点,提高了展示思维导图时的灵活性和可控性,同时在逐个展示隐藏子节点时,还对思维导图的整体进行布局调整,保证节点正确布局。
请参考图15,本实施例提供的一种展示思维导图的装置400,可以包括如 下内容:
节点信息获取模块410,用于获取思维导图已显示的各节点的节点信息,节点信息包括节点的隐藏子节点的隐藏数量值。
展开按钮生成模块420,用于若节点存在子节点,且隐藏数量值大于0,则在节点上生成展开按钮。
节点展示模块430,用于通过展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
综上,在本实施例的技术方案中,通过获取已显示的思维导图中各节点下隐藏子节点的隐藏数量值,对于隐藏数量值大于0的节点,生成相应的展开按钮,当通过展开按钮检测到第一点击信号时,展示该展开按钮所在第一节点的一个隐藏子节点。实现通过点击节点上的展开按钮,逐个展示节点的隐藏子节点,提高了展示思维导图时的灵活性和可控性。
可选的,所述展开按钮上显示有所述隐藏数量值。
可选的,装置400还可以包括:
收缩按钮生成模块,用于若节点存在子节点,且隐藏数量值等于0,则在节点上生成收缩按钮。
节点隐藏模块,用于通过收缩按钮检测到第二点击信号时,隐藏该收缩按钮所在的第二节点的全部子节点。
可选的,节点展示模块430,具体用于:
通过展开按钮检测到第一点击信号时,根据第一节点的子节点排序,确定当前待展示的隐藏子节点;展示当前待展示的隐藏子节点,形成新展示子节点。
可选的,装置400还可以包括:
第一调整模块,用于自适应调整第一节点的各展示子节点之间的间距。
第二调整模块,用于自适应调整第一节点的父节点的同级节点之间的间距。
可选的,第一调整模块具体用于:
根据新展示子节点的相邻节点的外接矩形的底部值,新展示子节点的外接矩形的高度值,以及第一节点的相邻子节点之间的第一间距值,确定新展示子节点的外接矩形的显示位置;
根据新展示子节点的外接矩形的高度值,和第一节点的相邻子节点之间的第一间距值,确定第一节点的原展示子节点的第一修正距离;
将原展示子节点向上移动第一修正距离,将新展示子节点基于显示位置进行显示。
可选的,第二调整模块,具体用于:
确定第一节点的父节点的上相邻节点和下相邻节点;
根据父节点的外接矩形的高度值,上相邻节点的外接矩形的底部值,以及父节点的同级节点之间的第二间距值,确定上相邻节点的第二修正距离;
根据父节点的外接矩形的底部值,下相邻节点的外接矩形的高度值,以及父节点的同级节点之间的第二间距值,确定下相邻节点的第三修正距离;
将上相邻节点向上移动第二修正距离,将下相邻节点向下移动第三修正距离。
图16是本发明实施例提供的一种设备的结构示意图。图16示出了适于用来实现本发明实施方式的示例性设备12的框图。图16显示的设备12仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。
如图16所示,设备12以通用计算设备的形式表现。设备12的组件可以包括但不限于:一个或者多个处理器或者处理单元16,系统存储器28,连接不同 系统组件(包括系统存储器28和处理单元16)的总线18。
总线18表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器,外围总线,图形加速端口,处理器或者使用多种总线结构中的任意总线结构的局域总线。举例来说,这些体系结构包括但不限于工业标准体系结构(ISA)总线,微通道体系结构(MAC)总线,增强型ISA总线、视频电子标准协会(VESA)局域总线以及外围组件互连(PCI)总线。
设备12典型地包括多种计算机系统可读介质。这些介质可以是任何能够被设备12访问的可用介质,包括易失性和非易失性介质,可移动的和不可移动的介质。
系统存储器28可以包括易失性存储器形式的计算机系统可读介质,例如随机存取存储器(RAM)30和/或高速缓存存储器32。设备12可以进一步包括其它可移动/不可移动的、易失性/非易失性计算机系统存储介质。仅作为举例,存储系统34可以用于读写不可移动的、非易失性磁介质(图16未显示,通常称为“硬盘驱动器”)。尽管图16中未示出,可以提供用于对可移动非易失性磁盘(例如“软盘”)读写的磁盘驱动器,以及对可移动非易失性光盘(例如CD-ROM,DVD-ROM或者其它光介质)读写的光盘驱动器。在这些情况下,每个驱动器可以通过一个或者多个数据介质接口与总线18相连。存储器28可以包括至少一个程序产品,该程序产品具有一组(例如至少一个)程序模块,这些程序模块被配置以执行本发明各实施例的功能。
具有一组(至少一个)程序模块42的程序/实用工具40,可以存储在例如存储器28中,这样的程序模块42包括但不限于操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。程序模块42通常执行本发明所描述的实施例中的功能和/ 或方法。
设备12也可以与一个或多个外部设备14(例如键盘、指向设备、显示器24等)通信,还可与一个或者多个使得用户能与该设备12交互的设备通信,和/或与使得该设备12能与一个或多个其它计算设备进行通信的任何设备(例如网卡,调制解调器等等)通信。这种通信可以通过输入/输出(I/0)接口22进行。并且,设备12还可以通过网络适配器20与一个或者多个网络(例如局域网(LAN),广域网WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器20通过总线18与设备12的其它模块通信。应当明白,尽管图中未示出,可以结合设备12使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
处理单元16通过运行存储在系统存储器28中的程序,从而执行各种功能应用以及数据处理,例如实现本发明任一实施例所提供的展示思维导图的方法。
本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时,实现本发明任一实施例所提供的展示思维导图的方法,该方法包括:
获取思维导图已显示的各节点的节点信息,所述节点信息包括所述节点的隐藏子节点的隐藏数量值;
若所述节点存在子节点,且所述隐藏数量值大于0,则在所述节点上生成展开按钮;
通过所述展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
本发明实施例的计算机存储介质,可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于无线、电线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言或其组合来编写用于执行本发明操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言-诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言-诸如”C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算 机上执行、或者完全在远程计算机或设备上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)-连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。
Claims (11)
- 一种展示思维导图的方法,其特征在于,包括:获取思维导图已显示的各节点的节点信息,所述节点信息包括所述节点的隐藏子节点的隐藏数量值;若所述节点存在子节点,且所述隐藏数量值大于0,则在所述节点上生成展开按钮;通过所述展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
- 如权利要求1所述的方法,其特征在于,所述展开按钮上显示有所述隐藏数量值。
- 如权利要求1所述的方法,其特征在于,所述获取思维导图已显示的各节点的节点信息的步骤之后,还包括:若所述节点存在子节点,且所述隐藏数量值等于0,则在所述节点上生成收缩按钮;通过所述收缩按钮检测到第二点击信号时,隐藏该收缩按钮所在的第二节点的全部子节点。
- 如权利要求1所述的方法,其特征在于,所述通过所述展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点的步骤,包括:通过所述展开按钮检测到第一点击信号时,根据所述第一节点的子节点排序,确定当前待展示的隐藏子节点;展示所述当前待展示的隐藏子节点,形成新展示子节点。
- 如权利要求4所述的方法,其特征在于,所述确定当前待展示的隐藏子节点的步骤之后,还包括:自适应调整所述第一节点的各展示子节点之间的间距。
- 如权利要求5所述的方法,其特征在于,所述自适应调整所述第一节点的各展示子节点之间的间距的步骤之后,还包括:自适应调整所述第一节点的父节点的同级节点之间的间距。
- 如权利要求5所述的方法,其特征在于,所述自适应调整所述第一节点的各展示子节点之间的间距的步骤,包括:根据所述新展示子节点的相邻节点的外接矩形的底部值,所述新展示子节点的外接矩形的高度值,以及所述第一节点的相邻子节点之间的第一间距值,确定所述新展示子节点的外接矩形的显示位置;根据所述新展示子节点的外接矩形的高度值,和所述第一节点的相邻子节点之间的第一间距值,确定所述第一节点的原展示子节点的第一修正距离;将所述原展示子节点向上移动所述第一修正距离,将所述新展示子节点基于所述显示位置进行显示。
- 如权利要求6所述的方法,其特征在于,所述自适应调整所述第一节点的父节点的同级节点之间的间距的步骤,包括:确定所述第一节点的父节点的上相邻节点和下相邻节点;根据所述父节点的外接矩形的高度值,所述上相邻节点的外接矩形的底部值,以及所述父节点的同级节点之间的第二间距值,确定所述上相邻节点的第二修正距离;根据所述父节点的外接矩形的底部值,所述下相邻节点的外接矩形的高度值,以及所述父节点的同级节点之间的第二间距值,确定所述下相邻节点的第三修正距离;将所述上相邻节点向上移动所述第二修正距离,将所述下相邻节点向下移 动所述第三修正距离。
- 一种展示思维导图的装置,其特征在于,包括:节点信息获取模块,用于获取思维导图已显示的各节点的节点信息,所述节点信息包括所述节点的隐藏子节点的隐藏数量值;展开按钮生成模块,用于若所述节点存在子节点,且所述隐藏数量值大于0,则在所述节点上生成展开按钮;节点展示模块,用于通过所述展开按钮检测到第一点击信号时,展示该展开按钮所在的第一节点的一个隐藏子节点。
- 一种设备,其特征在于,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1~8任一所述的展示思维导图的方法。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1~8任一所述的展示思维导图的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710754691.8 | 2017-08-29 | ||
CN201710754691.8A CN107545057A (zh) | 2017-08-29 | 2017-08-29 | 展示思维导图的方法、装置、设备及存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019041653A1 true WO2019041653A1 (zh) | 2019-03-07 |
Family
ID=60957556
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/116789 WO2019041653A1 (zh) | 2017-08-29 | 2017-12-17 | 展示思维导图的方法、装置、设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107545057A (zh) |
WO (1) | WO2019041653A1 (zh) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108573050A (zh) * | 2018-04-20 | 2018-09-25 | 广州视源电子科技股份有限公司 | 思维导图的总结节点生成方法、装置、设备及存储介质 |
CN109032446B (zh) * | 2018-07-23 | 2020-12-22 | 广州视源电子科技股份有限公司 | 思维导图的节点联系生成方法、装置、设备及存储介质 |
CN109117051B (zh) * | 2018-09-05 | 2021-05-11 | 广州视源电子科技股份有限公司 | 思维导图的展示方法、装置、设备及存储介质 |
CN109388559B (zh) * | 2018-09-17 | 2022-03-29 | 中国银行股份有限公司 | 可视化测试分析方法及装置 |
CN109408685B (zh) * | 2018-09-29 | 2020-03-06 | 北京字节跳动网络技术有限公司 | 思维导图展示方法和装置 |
EP3923127B1 (en) * | 2019-02-08 | 2023-05-03 | Forum Engineering Inc. | Tree-information-providing device and program product for tree information provision |
CN110162239A (zh) * | 2019-05-23 | 2019-08-23 | 北京字节跳动网络技术有限公司 | 思维导图中的卡片折叠方法、装置、电子设备和存储介质 |
CN110572363B (zh) * | 2019-08-05 | 2021-11-19 | 视联动力信息技术股份有限公司 | 基于视联网的产品展示方法、装置、电子设备及存储介质 |
CN110737380B (zh) * | 2019-09-05 | 2021-09-07 | 广州视源电子科技股份有限公司 | 思维导图展示方法、装置、存储介质及电子设备 |
CN111026308B (zh) * | 2019-12-11 | 2021-02-12 | 深圳介子云图空间科技有限公司 | 一种显示方法及装置 |
CN111274777B (zh) * | 2020-01-21 | 2024-04-02 | 维沃移动通信有限公司 | 思维导图显示方法及电子设备 |
CN112003729B (zh) * | 2020-07-25 | 2022-12-27 | 苏州浪潮智能科技有限公司 | 异构云平台资源拓扑展示方法、系统、终端及存储介质 |
CN112181257B (zh) * | 2020-10-23 | 2022-09-30 | 网易(杭州)网络有限公司 | 思维导图的显示方法、装置、终端及存储介质 |
CN117035067B (zh) * | 2023-10-07 | 2024-01-23 | 腾讯科技(深圳)有限公司 | 一种思维导图的渲染方法、装置及电子设备 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101416180A (zh) * | 2006-03-31 | 2009-04-22 | 微软公司 | 用于编辑图状示图的二维树 |
CN104881415A (zh) * | 2014-02-28 | 2015-09-02 | 国际商业机器公司 | 树图生成的方法及设备 |
US20160342582A1 (en) * | 2015-05-18 | 2016-11-24 | Workiva Inc. | Method and computing device for maintaining dependencies among reference elements |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103106244A (zh) * | 2012-12-31 | 2013-05-15 | 华为技术有限公司 | 一种信息展示方法,终端设备,服务器及系统 |
CN104063381B (zh) * | 2013-03-19 | 2018-04-20 | 华为技术有限公司 | 多级树形菜单的显示方法和终端 |
DE102016218656A1 (de) * | 2015-10-30 | 2017-05-04 | Heidelberger Druckmaschinen Ag | Verfahren zur Generierung eines User-Interfaces in Form einer Mindmap |
-
2017
- 2017-08-29 CN CN201710754691.8A patent/CN107545057A/zh active Pending
- 2017-12-17 WO PCT/CN2017/116789 patent/WO2019041653A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101416180A (zh) * | 2006-03-31 | 2009-04-22 | 微软公司 | 用于编辑图状示图的二维树 |
CN104881415A (zh) * | 2014-02-28 | 2015-09-02 | 国际商业机器公司 | 树图生成的方法及设备 |
US20160342582A1 (en) * | 2015-05-18 | 2016-11-24 | Workiva Inc. | Method and computing device for maintaining dependencies among reference elements |
Also Published As
Publication number | Publication date |
---|---|
CN107545057A (zh) | 2018-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019041653A1 (zh) | 展示思维导图的方法、装置、设备及存储介质 | |
US11226996B2 (en) | Identifying and graphically representing multiple parent nodes of a child node | |
US10521468B2 (en) | Animated seek preview for panoramic videos | |
CN106648319B (zh) | 一种用于思维导图的操作方法和装置 | |
US9471957B2 (en) | Method for partitioning, managing and displaying a collaboration space and interactive input system employing same | |
JP2021131895A (ja) | 実景ナビゲーションアイコン表示方法、装置、機器及び媒体 | |
WO2020228406A1 (zh) | 图像风格化生成方法、装置及电子设备 | |
US20150066930A1 (en) | Generation of metadata and computational model for visual exploration system | |
CN108463784A (zh) | 交互式演示控制 | |
US11822585B2 (en) | Identifying missing nodes within a graphically represented family | |
US20200320166A1 (en) | Dynamic whiteboard templates | |
KR20130127458A (ko) | 맥락 정보를 사용하여 스트리트 뷰 이미지에 주석을 다는 기술 | |
US20200319777A1 (en) | Dynamic whiteboard regions | |
US11829393B2 (en) | Graphically representing related record families using a phantom parent node | |
WO2017152703A1 (zh) | 三维标签实现方法和装置 | |
TWI794905B (zh) | 直播課堂中視頻幀圖像控制裝置及其控制方法 | |
WO2019105191A1 (zh) | 多元素交互方法、装置、设备和存储介质 | |
WO2013173949A1 (zh) | 一种三维虚拟现实场景中物体按层级加卸载的方法和装置 | |
CN109324796A (zh) | 界面布局方法及装置 | |
US10635459B2 (en) | User interface virtualization for large-volume structural data | |
CN114924822B (zh) | 三维拓扑结构的截图方法、装置、电子设备及存储介质 | |
US12079916B2 (en) | Rendering of persistent particle trails for dynamic displays | |
CN114797109A (zh) | 对象编辑方法、装置、电子设备和存储介质 | |
WO2020132863A1 (zh) | 续笔方法与显示终端 | |
WO2022206171A1 (zh) | 远程书写显示的方法、装置和存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.10.2020) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17923153 Country of ref document: EP Kind code of ref document: A1 |