WO2024148997A1 - 一种思维导图生成方法、装置及存储介质 - Google Patents

一种思维导图生成方法、装置及存储介质 Download PDF

Info

Publication number
WO2024148997A1
WO2024148997A1 PCT/CN2023/137335 CN2023137335W WO2024148997A1 WO 2024148997 A1 WO2024148997 A1 WO 2024148997A1 CN 2023137335 W CN2023137335 W CN 2023137335W WO 2024148997 A1 WO2024148997 A1 WO 2024148997A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
handwriting
area
nodes
mind map
Prior art date
Application number
PCT/CN2023/137335
Other languages
English (en)
French (fr)
Inventor
黄培
颜专
Original Assignee
广州朗国电子科技股份有限公司
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 广州朗国电子科技股份有限公司 filed Critical 广州朗国电子科技股份有限公司
Publication of WO2024148997A1 publication Critical patent/WO2024148997A1/zh

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the field of interactive technology, and in particular to a mind map generation method, device and storage medium.
  • the essence of a mind map is a thinking tool. It is a tree structure composed of colors, lines, graphics, and symbols. It mainly presents the thinking process and highlights key words. It is an expression of divergent thinking and a visual tool to unlock the brain's potential.
  • the existing mind map generation method usually adjusts the size of the node area by dragging so that the node area adapts to the content of the node area.
  • the existing mind map generation method requires more manpower and time to drag and adjust the node area, resulting in low efficiency in generating mind maps.
  • the present invention provides a mind map generation method, device and storage medium to solve the technical problem that the existing mind map generation method requires more manpower and time to drag and adjust the node area, resulting in low efficiency in generating the mind map.
  • An embodiment of the present invention provides a mind map generation method, comprising:
  • the plurality of nodes include a first-level parent node and a plurality of first-level child nodes, and the plurality of nodes are created in the current interface, and also include:
  • the vertical spacing between child nodes at the same level remains consistent and unchanged, and the horizontal spacing between parent nodes and child nodes at the same level remains consistent.
  • a node is created at a preset position in the current interface
  • the node to be deleted is deleted from the current interface.
  • the mind map generation method also includes:
  • determining the handwriting whose starting point is located in the node area according to the handwriting information includes:
  • the node areas of all nodes are traversed, and when it is determined whether the node area contains the coordinates of the starting point, it is determined that the handwriting is located in the node area.
  • determining the handwriting area occupied by the handwriting includes:
  • the minimum rectangular area containing the handwriting is determined, and the length and width of the minimum rectangular area are increased by preset values to obtain the handwriting area occupied by the handwriting.
  • nodes are connected according to their positions, including:
  • the center point of the parent node and the child node in the same level of nodes is determined according to the position of the node, and the parent node is connected to the child node through a straight line based on the center point.
  • An embodiment of the present invention provides a mind map generating device, comprising:
  • An initial node creation module is used to create a number of nodes in the current interface, each of which is provided with a node area;
  • a handwriting determination module used to obtain handwriting information input by the user in the current interface, and determine the handwriting whose starting point is located in the node area according to the handwriting information;
  • a handwriting area determination module used for binding the handwriting to the node area and determining the handwriting area occupied by the handwriting
  • a node area expansion module used for expanding the node area to a combined area of the node area and the handwriting area when the handwriting area is not included in the node area;
  • the mind map generation module is used to obtain the positions of all nodes, connect all nodes according to the positions of the nodes, and draw node boxes according to the node areas.
  • An embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the mind map generation method as described above.
  • One embodiment of the present invention provides a computer program product.
  • the terminal device executes the mind map generating method as described above.
  • the embodiment of the present invention obtains the handwriting information input by the user in the current interface, determines the handwriting whose starting point is located in the node area according to the handwriting information, binds the handwriting to the node area, and determines the handwriting area occupied by the handwriting.
  • the handwriting area is not included in the node area, the node area is expanded to the combined area of the node area and the handwriting area.
  • the node area bound to the handwriting can be dynamically adjusted according to the position and size of the handwriting input by the user, so that the node area can reasonably adapt to the node content without manually dragging the node area. Not only can the efficiency of generating mind maps be improved, but the size of the node area can be automatically and dynamically adjusted, and the effect of generating mind maps can also be effectively improved.
  • the interval size between nodes remains unchanged.
  • any operation is performed on a node, such as adding or deleting nodes, expanding or shrinking the node area, etc.
  • the position of the entire mind map changes adaptively, thereby ensuring the overall linkage of the mind map.
  • FIG1 is a schematic diagram of a flow chart of a mind map generation method provided by an embodiment of the present invention.
  • FIG2 is a schematic diagram of a mind map template provided by an embodiment of the present invention.
  • FIG3 is a schematic diagram of a node area expansion when a handwriting is input in a node area according to an embodiment of the present invention
  • FIG4 is a schematic diagram of a node area expansion when two handwritings are input in a node area according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an indication of adding and deleting nodes provided in an embodiment of the present invention.
  • FIG6 is a schematic diagram of shrinking a node area after deleting handwriting provided by an embodiment of the present invention.
  • FIG7 is a schematic diagram of a three-level mind map provided by an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of node area movement of a three-level mind map provided by an embodiment of the present invention.
  • FIG. 9 is another schematic diagram of the movement of node regions in the three-level mind map provided by an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a method for generating a mind map according to an embodiment of the present invention.
  • the terms “installed”, “connected”, and “connected” should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components.
  • installed should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components.
  • an embodiment of the present invention provides a mind map generation method, comprising:
  • the mind map generation method of the embodiment of the present invention can be applied to the Android system, and the user can select a mind map template to be imported from a plurality of preset mind maps, and the mind map template includes a plurality of nodes, and after receiving the mind map import instruction input by the user, a plurality of nodes are created on the operation interface.
  • these nodes include a parent node and a plurality of child nodes.
  • the position of the node when it is created in the current interface can be set according to actual needs.
  • the center point position of the current interface can be used as the starting position of the root node, that is, the first-level parent node.
  • the first-level child nodes are arranged vertically and set on the left or right side of the first-level parent node. The horizontal interval between each child node and the parent node is consistent, and the vertical interval between two adjacent child nodes is consistent.
  • the size of the node area can be set as needed.
  • the leftmost node can be defined as a root node. There is one and only one root node in a mind map.
  • the three nodes distributed from the root node can be used as child nodes of the root node.
  • For each child node there is a parent node. It can be seen that the parent node is set to the left of the child node.
  • the parent node and the child nodes distributed with the parent node can be nodes of the same level. If a node is also distributed with child nodes, the node is used as the distributed child node.
  • three child nodes are distributed from the same parent node, and the three nodes can be called brother nodes.
  • the user after creating several nodes, the user can switch the input mode to the handwriting mode and input handwriting in the current interface through the handwriting mode. After detecting that the user inputs handwriting in the operation interface, the embodiment of the present invention obtains the handwriting information of the user in the current interface.
  • the current interface can be used as a coordinate system, with the center point of the current interface as the origin, to determine the starting point coordinates of the user's handwriting and the coordinates of the node area. By traversing all the node areas, the handwriting whose starting point is within the node area can be determined.
  • the handwriting area occupied by the handwriting can be determined according to the coordinate point information of the handwriting.
  • the handwriting area can be a rectangular area containing the handwriting.
  • the handwriting area when the handwriting area is not included in the node area, it is determined that the node area needs to be expanded to adapt to the size of the handwriting area.
  • the combined area of the node area and the handwriting area can be the smallest rectangular area including the node area and the handwriting area.
  • FIG. 3-4 are schematic diagrams of node area expansion after one handwriting and two handwritings are input into the node area according to an embodiment of the present invention.
  • a mind map can be generated by calling a global drawing method to connect the parent node and the child node of the same level node, and drawing the node frame according to the size of the node area.
  • the embodiment of the present invention obtains the handwriting information input by the user in the current interface, determines the handwriting whose starting point is located in the node area according to the handwriting information, binds the handwriting to the node area, and determines the handwriting area occupied by the handwriting.
  • the handwriting area is not included in the node area, the node area is expanded to the combined area of the node area and the handwriting area.
  • the node area bound to the handwriting can be dynamically adjusted according to the position and size of the handwriting input by the user, so that the node area can reasonably adapt to the node content without manually dragging the node area. Not only can the efficiency of generating mind maps be improved, but the size of the node area can be automatically and dynamically adjusted, and the effect of generating mind maps can also be effectively improved.
  • the plurality of nodes include a first-level parent node and a plurality of first-level child nodes, and the plurality of nodes are created in the current interface, further including:
  • the vertical spacing between child nodes at the same level remains consistent and unchanged, and the horizontal spacing between parent nodes and child nodes at the same level remains consistent.
  • the interval size between nodes remains unchanged.
  • any operation is performed on a node, such as adding or deleting nodes, expanding or shrinking the node area, etc.
  • the position of the entire mind map changes adaptively, thereby ensuring the overall linkage of the mind map.
  • the method further includes:
  • a node is created at a preset position in the current interface
  • the node to be deleted is deleted from the current interface.
  • a new node can be created on the current interface according to the node creation instruction input by the user.
  • the user can switch to the node selection mode on the current interface and select a node on the current interface. Node, through the operation toolbar, select how to create the node.
  • the user can click the left button to delete the selected node, click the upper button to add a sibling node upward, click the right button to add a child node to the right of the selected node, and click the lower button to add a sibling node downward.
  • a child node creation instruction When the user inputs a node creation instruction, if it is a child node creation instruction, a child node is added; if it is a sibling node creation instruction, the parent node of the currently selected node is obtained, the child node creation method of the parent node is called, and the child node is created at the specified position.
  • the position of the selected node in its parent node is obtained, the child node binding method is called, the node is deleted from the collection, and the binding relationship is untied.
  • the mind map generation method further includes:
  • the user can delete the selected handwriting.
  • the handwriting in the node area changes, and the handwriting area composed of the handwriting lock also changes.
  • the union area composed of all handwriting areas in the node area is included in the node area, the node area is reduced to the size of the union area to adapt to the size of the handwriting area.
  • the lower limit and upper limit of the node area size can be set, and when the node area is expanded or reduced, the lower limit and upper limit are not exceeded.
  • FIG. 6 is a schematic diagram of shrinking a node area after deleting handwriting provided by an embodiment of the present invention.
  • the mind map generation method also includes determining the latest area of the node area after shrinking or expanding the node area, determining offset values in four directions based on the latest area and the node area before shrinking or expanding, assigning the offset values to the root node, updating the position of the root node, and recalculating and determining the positions of all child nodes based on the updated root node position.
  • FIG. 7 is a three-level mind map provided in an embodiment of the present invention.
  • a line is drawn from right to bottom in the third-level node, causing its parent node to move to the left, its parent node and the parent node of the parent node to move to the left, and the sibling nodes of the parent node to move to the left. The point moves downward.
  • step S2 determines the handwriting whose starting point is within the node area according to the handwriting information, and may further include the following sub-steps:
  • the current interface can be used as a coordinate system plane, and the center point can be used as the origin to determine the coordinates of the starting point of the handwriting and the coordinates of the node area.
  • null is returned, indicating that the starting point of the handwriting is located in the node region and no node binding is required.
  • determining the handwriting area occupied by the handwriting includes:
  • the minimum rectangular area containing the handwriting is determined, and the length and width of the minimum rectangular area are increased by preset values to obtain the handwriting area occupied by the handwriting.
  • the embodiment of the present invention in order to keep a certain distance between the handwriting and the edge of the node area, the embodiment of the present invention increases the long side and the wide side of the minimum rectangular area containing the handwriting by a preset value, and obtains the handwriting area occupied by the handwriting.
  • the long side and the wide side of the minimum rectangular area can be increased by 10px, 12px or 14px.
  • all nodes are connected according to their locations, including:
  • the center point of the parent node and the child node in the same level node is determined according to the position of the node, and the parent node is connected to the child node through a straight line based on the center point.
  • the positions of the various nodes are recalculated.
  • the position of the root node can be determined first, and the positions of other nodes can be determined step by step.
  • the width and height (onMeasure) of the child node are calculated, and onLayout is called according to the width and height to place the position of the child node.
  • OnMeasure the child node is first recursively called, and the onMeasure of the child node is called, and then mWidth and mHeight are calculated according to its own internal handwriting.
  • OnLayout can also allocate its own area (cellRegion) according to the parameters left, top, right, and bottom, and then recursively call the onLayout method of its child node to determine the positions of all nodes step by step.
  • the point can be first moved to the right center position (startX, startY) of the current node, and then connected to the center point (centerX, centerY) between the parent node and the child node through a straight line. Then the child nodes are connected by a loop, starting from the center point (centerX, centerY), connected to (centerX, cornerY), that is, the x direction of the connection line remains unchanged, only the y direction changes, and then connected to the left center of the child node (nodeRect.left, cornerY).
  • drawFull After drawing the connecting lines, in drawFull, a rounded rectangle addRoundRect is drawn on the cellRegion area, a node box corresponding to the node area is drawn, and then the handwriting collection cellShapeList in the node is drawn in a loop. Finally, the drawFull method of the child node collection (childNoteList) is called in a loop to draw step by step until a complete mind map is generated.
  • the embodiment of the present invention obtains the handwriting information input by the user in the current interface, determines the handwriting whose starting point is located in the node area according to the handwriting information, binds the handwriting to the node area, and determines the handwriting area occupied by the handwriting.
  • the handwriting area is not included in the node area, the node area is expanded to the combined area of the node area and the handwriting area.
  • the node area bound to the handwriting can be dynamically adjusted according to the position and size of the handwriting input by the user, so that the node area can reasonably adapt to the node content without manually dragging the node area. Not only can the efficiency of generating mind maps be improved, but the size of the node area can be automatically and dynamically adjusted, and the effect of generating mind maps can also be effectively improved.
  • the interval size between nodes remains unchanged.
  • any operation is performed on a node, such as adding or deleting nodes, expanding or shrinking the node area, etc.
  • the position of the entire mind map changes adaptively, thereby ensuring the overall linkage of the mind map.
  • an embodiment of the present invention provides a mind map generating device, comprising:
  • the initial node creation module 10 is used to create a number of nodes in the current interface, and each node is provided with a node area;
  • a handwriting determination module 20 is used to obtain handwriting information input by the user in the current interface, and determine the handwriting whose starting point is located in the node area according to the handwriting information;
  • the handwriting area determination module 30 is used to bind the handwriting to the node area and determine the handwriting area occupied by the handwriting. area;
  • the node area expansion module 40 is used to expand the node area to the combined area of the node area and the handwriting area when the handwriting area is not included in the node area;
  • the mind map generation module 50 is used to obtain the positions of all nodes, connect all nodes according to the positions of the nodes, and draw node frames according to the node areas.
  • the mind map generating device further includes an interval setting module, which is used to:
  • the vertical spacing between child nodes at the same level remains consistent and unchanged, and the horizontal spacing between parent nodes and child nodes at the same level remains consistent.
  • the mind map generating device further includes a node operation module, which is used to:
  • a node is created at a preset position in the current interface
  • the node to be deleted is deleted from the current interface.
  • the thinking criminal generation device further includes a node area shrinking module, which is used to:
  • the handwriting determination module 30 is further used to:
  • the node areas of all nodes are traversed, and when it is determined whether the node area contains the coordinates of the starting point, it is determined that the handwriting is located in the node area.
  • the handwriting area determination module 40 is further used for:
  • the minimum rectangular area containing the handwriting is determined, and the length and width of the minimum rectangular area are increased by preset values to obtain the handwriting area occupied by the handwriting.
  • the mind map generation module 50 is further used to:
  • the center point of the parent node and the child node in the same level node is determined according to the position of the node, and the parent node is connected to the child node through a straight line based on the center point.
  • An embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the mind map generation method as described above.
  • One embodiment of the present invention provides a computer program product.
  • the terminal device executes the mind map generating method as described above.

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种思维导图生成方法、装置及存储介质,其中方法包括:在当前界面创建若干个节点,每一节点均设置有一个节点区域;获取用户在当前界面输入的笔迹信息,根据笔迹信息确定起始点位于节点区域内的笔迹;将笔迹与节点区域绑定,并确定笔迹所占的笔迹区域;在笔迹区域不被节点区域包含时,将节点区域扩容至节点区域和笔迹区域的合集区域;获取所有节点的位置,根据节点的位置将所有的节点进行连接,并根据节点区域绘制节点框。本发明能够根据用户输入笔迹的位置以及大小,对笔迹绑定的节点区域进行动态调整,无需人为拉拽节点区域,不仅能够提高生成思维导图的效率,还能够有效提高生成思维导图的效果。

Description

一种思维导图生成方法、装置及存储介质 技术领域
本发明涉及交互技术领域,尤其是涉及一种思维导图生成方法、装置及存储介质。
背景技术
思维导图的本质是思维工具,它是由颜色、线条、图形、符号组成的树状结构,主要呈现思维过程,凸显关键词,是对发散性思维的表达,是打开大脑潜能且可视化的工具。
现有的思维导图生成方法通常为通过拉拽的方式调整节点区域的大小,使得节点区域适应节点区域的内容,但是现有的思维导图生成方法需要较多的人力和时间拉拽调整节点区域,导致生成思维导图的效率较低。
发明内容
本发明提供了一种思维导图生成方法、装置及存储介质,以解决现有的思维导图生成方法需要较多的人力和时间拉拽调整节点区域,导致生成思维导图的效率较低的技术问题。
本发明的一个实施例提供了一种思维导图生成方法,包括:
在当前界面创建若干个节点,每一所述节点均设置有一个节点区域;
获取用户在当前界面输入的笔迹信息,根据所述笔迹信息确定起始点位于节点区域内的笔迹;
将所述笔迹与所述节点区域绑定,并确定所述笔迹所占的笔迹区域;
在所述笔迹区域不被所述节点区域包含时,将所述节点区域扩容至所述节点区域和所述笔迹区域的合集区域;
获取所有节点的位置,根据节点的位置将所有的节点进行连接,并根据节点区域绘制节点框。
进一步的,若干个节点包括一个第一级父节点和若干个第一级子节点,在当前界面创建若干个节点,还包括:
同一级子节点之间的垂直方向间隔距离保持一致且不变,同一级父节点和子节点的水平方向间隔距离保持一致。
进一步的,在当前界面创建若干个节点之后,还包括:
响应用户输入的节点创建指令,在当前界面的预设位置创建节点;
或响应用户输入的节点删除指令,将待删除节点从当前界面中删除。
进一步的,所述思维导图生成方法还包括:
在删除笔迹后,当所述节点区域内的所有笔迹区域组成的并集区域包含在所述节点区域内时,将所述节点区域缩容至所述并集区域。
进一步的,根据所述笔迹信息确定起始点位于节点区域内的笔迹,包括:
确定笔迹的起始点的坐标;
遍历所有节点的节点区域,在判定到所述节点区域是否包含所述起始点的坐标时,判定所述笔迹位于所述节点区域内。
进一步的,确定所述笔迹所占的笔迹区域,包括:
根据所述笔迹的坐标点信息,确定包含所述笔迹的最小矩形区域,将所述最小矩形区域的长和宽增加预设数值,得到所述笔迹所占的笔迹区域。
进一步的,根据节点的位置将所有的节点进行连接,包括:
根据所述节点的位置确定同一级节点中父节点与子节点的中心点,基于所述中心点,通过直线将父节点连接至子节点。
本发明的一个实施例提供了一种思维导图生成装置,包括:
初始节点创建模块,用于在当前界面创建若干个节点,每一所述节点均设置有一个节点区域;
笔迹确定模块,用于获取用户在当前界面输入的笔迹信息,根据所述笔迹信息确定起始点位于节点区域内的笔迹;
笔迹区域确定模块,用于将所述笔迹与所述节点区域绑定,并确定所述笔迹所占的笔迹区域;
节点区域扩容模块,用于在所述笔迹区域不被所述节点区域包含时,将所述节点区域扩容至所述节点区域和所述笔迹区域的合集区域;
思维导图生成模块,用于获取所有节点的位置,根据节点的位置将所有的节点进行连接,并根据节点区域绘制节点框。
本发明的一个实施例提供了一种计算机可读存储介质,所述计算机可读存储介质包括存储的计算机程序,其中,在所述计算机程序运行时控制所述计算机可读存储介质所在设备执行如上述的思维导图生成方法。
本发明的一个实施例提供了一种计算机程序产品当计算机程序产品在终端设备上运行时,使得终端设备执行如上述的思维导图生成方法。
本发明实施例通过获取用户在当前界面输入的笔迹信息,根据所述笔迹信息确定起始点位于节点区域内的笔迹,将所述笔迹与所述节点区域绑定,并确定所述笔迹所占的笔迹区域,在所述笔迹区域不被所述节点区域包含时,将所述节点区域扩容至所述节点区域和所述笔迹区域的合集区域,能够根据用户输入笔迹的位置以及大小,对笔迹绑定的节点区域进行动态调整,使得节点区域能够合理适应节点内容,无需人为拉拽节点区域,不仅能够提高生成思维导图的效率,且自动动态调整节点区域的大小,还能够有效提高生成思维导图的效果。
进一步的,在本发明实施例中,节点与节点之间的间隔大小保持不变,在任意操作一个节点时,例如在进行增删节点、对节点区域进行扩容、缩容等操作时,整个思维导图的位置发生适应性变化,从而可以保证思维导图的整体联动性。
附图说明
图1是本发明实施例提供的一种思维导图生成方法的流程示意图;
图2是本发明实施例提供的思维导图模板示意图;
图3是本发明实施例提供的节点区域内输入一条笔迹的节点区域扩容示意图;
图4是本发明实施例提供的节点区域内输入两条笔迹的节点区域扩容示意图;
图5是本发明实施例提供的节点的增删指示示意图;
图6是本发明实施例提供的删除笔迹后节点区域进行缩容的示意图;
图7是本发明实施例提供的一种三级思维导图的示意图;
图8是本发明实施例提供的三级思维导图的节点区域移动示意图;
图9是本发明实施例提供的三级思维导图的另一节点区域移动示意图
图10是本发明实施例提供的一种思维导图生成方法的装置示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。
在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。
请参阅图1,本发明的一个实施例提供了一种思维导图生成方法,包括:
S1、在当前界面创建若干个节点,每一节点均设置有一个节点区域;
在本发明实施例中,本发明实施例的思维导图生成方法可以适用于安卓系统,用户可以在预设的多个思维导图中选择需要导入的思维导图模板,该思维导图模板包括有若干个节点,在接收到用户输入的思维导图导入指令后,在操作界面上创建若干个节点。其中,这些节点包括一个父节点和若干个子节点。
在本发明实施例中,可以根据实际需要设置节点创造时在当前界面的位置, 例如可以将当前界面的中心点位置作为根节点即第一级父节点的起始位置,第一级的子节点以垂直排列的方式,设置在与第一级父节点左侧或右侧,且每一子节点与父节点在水平方向上的间隔一致,相邻两个子节点在垂直线方向上的间隔一致。
在本发明实施例中,可以根据需要设定节点区域的大小。
请参阅图2,在本发明实施例中,可以将最左边的节点定义为根节点,一个思维导图中有且只有一个根节点,可以从根节点中分发出的三个节点作为根节点的子节点。对于每一个子节点来说,均有一个父节点,可以见父节点设置在子节点的左边,父节点以及和该父子点分发的子节点可以成为同一级节点。若某一节点还分发有子节点,则该节点作为分发后的子节点。请继续参阅图2,在本发明实施例中,同一个父节点分发出来了三个子节点,三个字节可以互称为兄弟节点。
S2、获取用户在当前界面输入的笔迹信息,根据笔迹信息确定起始点位于节点区域内的笔迹;
在本发明实施例中,在创建了若干个节点后,用户可以将输入方式切换为手写模式,通过手写模式在当前界面输入笔迹。本发明实施例在检测到用户在操作界面输入笔迹之后,获取用户在当前界面的笔迹信息。
在本发明实施例中,可以将当前界面作为一个坐标系,以当前界面的中心点作为原点,确定用户笔迹的起始点坐标和节点区域的坐标,通过遍历所有的节点区域,可以确定起始点位于节点区域内的笔迹。
S3、将笔迹与节点区域绑定,并确定笔迹所占的笔迹区域;
在本发明实施例中,可以根据笔迹的坐标点信息,确定笔迹所占的笔迹区域。该笔迹区域可以为包含该笔迹的矩形区域。
S4、在笔迹区域不被节点区域包含时,将节点区域扩容至节点区域和笔迹区域的合集区域;
在本发明实施例中,在笔迹区域不被节点区域包含时,判断此时需要对节点区域进行扩容,以适应笔迹区域的大小。本发明实施例中节点区域和笔迹区域的合集区域可以为包含节点区域和笔迹区域的最小矩形区域。
在本发明实施例中,在笔迹区域被节点区域包含时,无需对节点区域进行扩容。
请参阅图3-4,为本发明实施例在节点区域内输入一条笔迹和两条笔迹后的节点区域扩容示意图。
S5、获取所有节点的位置,根据节点的位置将所有的节点进行连接,并根据节点区域绘制节点框。
在本发明实施例中,可以通过调用全局绘制的方式,连接同一级节点的父节点和子节点,并根据节点区域的大小绘制节点框,以生成思维导图。
本发明实施例通过获取用户在当前界面输入的笔迹信息,根据所述笔迹信息确定起始点位于节点区域内的笔迹,将所述笔迹与所述节点区域绑定,并确定所述笔迹所占的笔迹区域,在所述笔迹区域不被所述节点区域包含时,将所述节点区域扩容至所述节点区域和所述笔迹区域的合集区域,能够根据用户输入笔迹的位置以及大小,对笔迹绑定的节点区域进行动态调整,使得节点区域能够合理适应节点内容,无需人为拉拽节点区域,不仅能够提高生成思维导图的效率,且自动动态调整节点区域的大小,还能够有效提高生成思维导图的效果。
在一个实施例中,若干个节点包括一个第一级父节点和若干个第一级子节点,在当前界面创建若干个节点,还包括:
同一级子节点之间的垂直方向间隔距离保持一致且不变,同一级父节点和子节点的水平方向间隔距离保持一致。
在本发明实施例中,节点与节点之间的间隔大小保持不变,在任意操作一个节点时,例如在进行增删节点、对节点区域进行扩容、缩容等操作时,整个思维导图的位置发生适应性变化,从而可以保证思维导图的整体联动性。
在一个实施例中,在当前界面创建若干个节点之后,还包括:
响应用户输入的节点创建指令,在当前界面的预设位置创建节点;
或响应用户输入的节点删除指令,将待删除节点从当前界面中删除。
在本发明实施例中,可以根据用户输入的节点创建指令,在当前界面创建新的节点,用户可以通过当前界面切换为节点选择模式,并在当前界面上选中一个 节点,通过操作工具栏,选择具体如何创建节点。
请参阅图5,在显示思维导图的操作工具栏之后,用户可以点击左边按钮删除选中节点,可以点击上方按钮向上添加兄弟节点,可以点击右边按钮在选中节点右侧添加一个子节点,可以点击下方按钮向下添加一个兄弟节点。
当用户输入节点创建指令,若为子节点创建指令,则添加一个子节点,若为兄弟节点创建指令,则获取当前的选中节点的父节点,调用父节点的创建子节点方法,将子节点创建到指定位置。
当用户输入节点删除指令,获取选中节点在其父节点的位置,调用子节点结合的方法,从集合中删除该节点,并解绑关系。
在一个实施例中,思维导图生成方法还包括:
在删除笔迹后,当节点区域内的所有笔迹区域组成的并集区域包含在节点区域内时,将节点区域缩容至并集区域。
在本发明实施例中,用户可以将选中的笔迹进行删除,在删除笔迹之后,节点区域内的笔迹发生变化,笔迹锁组成的笔迹区域也发生变化,当节点区域内的所有笔迹区域组成的并集区域包含在节点区域内时,将节点区域缩容至并集区域的大小,以适应笔迹区域的大小。在本发明实施例中,可以设置节点区域大小的下限值和上限值,在对节点区域进行扩容或缩容时,不超过下限值和上限值。
请参阅图6,为本发明实施例提供的删除笔迹后节点区域进行缩容的示意图。
在一个实施例中,思维导图生成方法还包括在对节点区域进行缩容或扩容后,确定节点区域的最新区域,根据最新区域和缩容或扩容之前的节点区域,确定四个方向的偏移值,将偏移值赋值至根节点上,更新根节点的位置,并基于更新后的根节点位置,重新计算并确定所有子节点的位置。
请参阅图7,为本发明实施例提供的一种三级思维导图。
请参阅图8,在三级思维导图中,在其第二级节点中,添加了一条从左往上的笔迹,导致其子节点即第三级节点向右边移动,且其上方的兄弟节点向上移动。
请参阅图9,在图8的基础上,在第三级节点中从右往下画一条笔迹,导致其父节点向左移动,其父节点以及该父节点的父节点向左移动,父节点的兄弟节 点向下移动。
在本发明实施例中,步骤S2根据笔迹信息确定起始点位于节点区域内的笔迹,还可以包括以下子步骤:
S21、确定笔迹的起始点的坐标;
在本发明实施例中,可以将当前界面作为坐标系平面,以中心点作为原点,确定笔迹的起始点坐标和节点区域的坐标。
S22、遍历所有节点的节点区域,在判定到节点区域是否包含起始点的坐标时,判定笔迹位于节点区域内。
在本发明实施例中,若判断到所有的节点区域均不包含笔迹的起始点坐标,则返回空,表示该笔迹的起始点位于节点区域内,无需绑定节点。
在一个实施例中,确定笔迹所占的笔迹区域,包括:
根据笔迹的坐标点信息,确定包含笔迹的最小矩形区域,将最小矩形区域的长和宽增加预设数值,得到笔迹所占的笔迹区域。
在本发明实施例中,为了使得笔迹和节点区域的边缘保持一定的距离,本发明实施例对包含笔迹的最小矩形区域的长边和宽边增加预设数值,已得到笔迹所占的笔迹区域。例如可以在最小矩形区域的场边和宽边均增加10px、12px或14px。
在一个实施例中,根据节点的位置将所有的节点进行连接,包括:
根据节点的位置确定同一级节点中父节点与子节点的中心点,基于中心点,通过直线将父节点连接至子节点。
在本发明实施例中,在将节点连接起来之前,重新计算各个节点的位置,可以先确定根节点的位置,逐级确定其他节点的位置。具体可以为:计算子节点的宽高(onMeasure),根据宽高调用onLayout放置子节点的位置,onMeasure里先递归其子节点,调用其子节点的onMeasure,再根据自身内部笔迹,计算得到mWidth,mHeight。onLayout内部也可以根据参数left,top,right,bottom来分配自己的的区域(cellRegion),然后再递归调用其子节点的onLayout方法,以逐级确定所有的节点位置。
在本发明实施例中,可以先移动点到当前节点的右中位置(startX,startY),再与父节点和子节点间隔的中心点(centerX,centerY)通过直线连接。再循环绘制连接其子节点,从中心点(centerX,centerY)出发,连接到(centerX,cornerY),即连线的x方向不变,只在y方向变化,再连接到子节点的左中心(nodeRect.left,cornerY)。
在绘制了连接线之后,在drawFull中,通过在cellRegion的区域上绘制一个圆角矩形addRoundRect,绘制节点区域对应的节点框,再循环绘制节点中的笔迹集合cellShapeList,最后再循环调用子节点集合(childNoteList)的drawFull方法,以逐级绘制直至生成完整的思维导图。
实施本发明实施例,具有以下有益效果:
本发明实施例通过获取用户在当前界面输入的笔迹信息,根据所述笔迹信息确定起始点位于节点区域内的笔迹,将所述笔迹与所述节点区域绑定,并确定所述笔迹所占的笔迹区域,在所述笔迹区域不被所述节点区域包含时,将所述节点区域扩容至所述节点区域和所述笔迹区域的合集区域,能够根据用户输入笔迹的位置以及大小,对笔迹绑定的节点区域进行动态调整,使得节点区域能够合理适应节点内容,无需人为拉拽节点区域,不仅能够提高生成思维导图的效率,且自动动态调整节点区域的大小,还能够有效提高生成思维导图的效果。
进一步的,在本发明实施例中,节点与节点之间的间隔大小保持不变,在任意操作一个节点时,例如在进行增删节点、对节点区域进行扩容、缩容等操作时,整个思维导图的位置发生适应性变化,从而可以保证思维导图的整体联动性。
请参阅图10,基于与上述实施例相同的发明构思,本发明的一个实施例提供了一种思维导图生成装置,包括:
初始节点创建模块10,用于在当前界面创建若干个节点,每一节点均设置有一个节点区域;
笔迹确定模块20,用于获取用户在当前界面输入的笔迹信息,根据笔迹信息确定起始点位于节点区域内的笔迹;
笔迹区域确定模块30,用于将笔迹与节点区域绑定,并确定笔迹所占的笔迹 区域;
节点区域扩容模块40,用于在笔迹区域不被节点区域包含时,将节点区域扩容至节点区域和笔迹区域的合集区域;
思维导图生成模块50,用于获取所有节点的位置,根据节点的位置将所有的节点进行连接,并根据节点区域绘制节点框。
在一个实施例中,思维导图生成装置还包括间隔设置模块,用于:
同一级子节点之间的垂直方向间隔距离保持一致且不变,同一级父节点和子节点的水平方向间隔距离保持一致。
在一个实施例中,思维导图生成装置还包括节点操作模块,用于:
响应用户输入的节点创建指令,在当前界面的预设位置创建节点;
或响应用户输入的节点删除指令,将待删除节点从当前界面中删除。
在一个实施例中,思维歹徒生成装置还包括节点区域缩容模块,用于:
在删除笔迹后,当节点区域内的所有笔迹区域组成的并集区域包含在节点区域内时,将节点区域缩容至并集区域。
在一个实施例中,笔迹确定模块30还用于:
确定笔迹的起始点的坐标;
遍历所有节点的节点区域,在判定到节点区域是否包含起始点的坐标时,判定笔迹位于节点区域内。
在一个实施例中,笔迹区域确定模块40还用于:
根据笔迹的坐标点信息,确定包含笔迹的最小矩形区域,将最小矩形区域的长和宽增加预设数值,得到笔迹所占的笔迹区域。
在一个实施例中,思维导图生成模块50还用于:
根据节点的位置确定同一级节点中父节点与子节点的中心点,基于中心点,通过直线将父节点连接至子节点。
本发明的一个实施例提供了一种计算机可读存储介质,计算机可读存储介质包括存储的计算机程序,其中,在计算机程序运行时控制计算机可读存储介质所在设备执行如上述的思维导图生成方法。
本发明的一个实施例提供了一种计算机程序产品当计算机程序产品在终端设备上运行时,使得终端设备执行如上述的思维导图生成方法。
以上是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (10)

  1. 一种思维导图生成方法,其特征在于,包括:
    在当前界面创建若干个节点,每一所述节点均设置有一个节点区域;
    获取用户在当前界面输入的笔迹信息,根据所述笔迹信息确定起始点位于节点区域内的笔迹;
    将所述笔迹与所述节点区域绑定,并确定所述笔迹所占的笔迹区域;
    在所述笔迹区域不被所述节点区域包含时,将所述节点区域扩容至所述节点区域和所述笔迹区域的合集区域;
    获取所有节点的位置,根据节点的位置将所有的节点进行连接,并根据节点区域绘制节点框。
  2. 如权利要求1所述的思维导图生成方法,其特征在于,若干个节点包括一个第一级父节点和若干个第一级子节点,在当前界面创建若干个节点,还包括:
    同一级子节点之间的垂直方向间隔距离保持一致且不变,同一级父节点和子节点的水平方向间隔距离保持一致。
  3. 如权利要求1所述的思维导图生成方法,其特征在于,在当前界面创建若干个节点之后,还包括:
    响应用户输入的节点创建指令,在当前界面的预设位置创建节点;
    或响应用户输入的节点删除指令,将待删除节点从当前界面中删除。
  4. 如权利要求1所述的思维导图生成方法,其特征在于,还包括:
    在删除笔迹后,当所述节点区域内的所有笔迹区域组成的并集区域包含在所述节点区域内时,将所述节点区域缩容至所述并集区域。
  5. 如权利要求1所述的思维导图生成方法,其特征在于,根据所述笔迹信息确定起始点位于节点区域内的笔迹,包括:
    确定笔迹的起始点的坐标;
    遍历所有节点的节点区域,在判定到所述节点区域是否包含所述起始点的坐标时,判定所述笔迹位于所述节点区域内。
  6. 如权利要求1所述的思维导图生成方法,其特征在于,确定所述笔迹所占的笔迹区域,包括:
    根据所述笔迹的坐标点信息,确定包含所述笔迹的最小矩形区域,将所述最小矩形区域的长和宽增加预设数值,得到所述笔迹所占的笔迹区域。
  7. 如权利要求1-6任意一项所述的思维导图生成方法,其特征在于,根据节点的位置将所有的节点进行连接,包括:
    根据所述节点的位置确定父节点与子节点的中心点,基于所述中心点,通过直线将父节点连接至子节点。
  8. 一种思维导图生成装置,其特征在于,包括:
    初始节点创建模块,用于在当前界面创建若干个节点,每一所述节点均设置有一个节点区域;
    笔迹确定模块,用于获取用户在当前界面输入的笔迹信息,根据所述笔迹信息确定起始点位于节点区域内的笔迹;
    笔迹区域确定模块,用于将所述笔迹与所述节点区域绑定,并确定所述笔迹所占的笔迹区域;
    节点区域扩容模块,用于在所述笔迹区域不被所述节点区域包含时,将所述节点区域扩容至所述节点区域和所述笔迹区域的合集区域;
    思维导图生成模块,用于获取所有节点的位置,根据节点的位置将所有的节点进行连接,并根据节点区域绘制节点框。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括 存储的计算机程序,其中,在所述计算机程序运行时控制所述计算机可读存储介质所在设备执行如权利要求1至7中任意一项所述的思维导图生成方法。
  10. 一种计算机程序产品,其特征在于,当计算机程序产品在终端设备上运行时,使得终端设备执行如权利要求1至7任意一项所述的思维导图生成方法。
PCT/CN2023/137335 2023-01-13 2023-12-08 一种思维导图生成方法、装置及存储介质 WO2024148997A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202310085479.2A CN115963974A (zh) 2023-01-13 2023-01-13 一种思维导图生成方法、装置及存储介质
CN202310085479.2 2023-01-13

Publications (1)

Publication Number Publication Date
WO2024148997A1 true WO2024148997A1 (zh) 2024-07-18

Family

ID=87354318

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/137335 WO2024148997A1 (zh) 2023-01-13 2023-12-08 一种思维导图生成方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN115963974A (zh)
WO (1) WO2024148997A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115963974A (zh) * 2023-01-13 2023-04-14 广州朗国电子科技股份有限公司 一种思维导图生成方法、装置及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150205266A1 (en) * 2014-01-21 2015-07-23 Young Gyo CHUNG Method for associating schedule information of electronic diary with mind map, server for providing program for performing the same, and computer-readable recording medium having the program recorded therein
CN106294664A (zh) * 2016-08-03 2017-01-04 广州视睿电子科技有限公司 一种生成思维导图的方法和装置
CN110069204A (zh) * 2019-04-15 2019-07-30 广州视源电子科技股份有限公司 基于书写轨迹的图形处理方法、装置、设备及存储介质
CN115202553A (zh) * 2021-04-14 2022-10-18 广州视源电子科技股份有限公司 白板应用的控制方法、装置和电子设备
CN115963974A (zh) * 2023-01-13 2023-04-14 广州朗国电子科技股份有限公司 一种思维导图生成方法、装置及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150205266A1 (en) * 2014-01-21 2015-07-23 Young Gyo CHUNG Method for associating schedule information of electronic diary with mind map, server for providing program for performing the same, and computer-readable recording medium having the program recorded therein
CN106294664A (zh) * 2016-08-03 2017-01-04 广州视睿电子科技有限公司 一种生成思维导图的方法和装置
CN110069204A (zh) * 2019-04-15 2019-07-30 广州视源电子科技股份有限公司 基于书写轨迹的图形处理方法、装置、设备及存储介质
CN115202553A (zh) * 2021-04-14 2022-10-18 广州视源电子科技股份有限公司 白板应用的控制方法、装置和电子设备
CN115963974A (zh) * 2023-01-13 2023-04-14 广州朗国电子科技股份有限公司 一种思维导图生成方法、装置及存储介质

Also Published As

Publication number Publication date
CN115963974A (zh) 2023-04-14

Similar Documents

Publication Publication Date Title
WO2024148997A1 (zh) 一种思维导图生成方法、装置及存储介质
US6442575B2 (en) Method and system for merging cells in a table and for adding an integrated header and a nested table to a table in an electronic document
JP3569153B2 (ja) 図形編集装置、および図形編集方法、並びにそのためのプログラムを格納した記憶媒体
CN110795093B (zh) 一种交互式视图生成方法和装置
CN109190326A (zh) 生成工艺流程图的方法及装置
WO2023273700A1 (zh) 一种交互窗口显示方法、装置、设备及存储介质
JP3795238B2 (ja) 文書画像処理装置及び文書画像処理方法
CN116245052A (zh) 一种图纸迁移方法、装置、设备和存储介质
CN110309239B (zh) 一种可视化地图编辑方法和装置
CN111045654A (zh) 基于Vue快速生成常用指令的方法、装置、计算机设备及存储介质
CN109828806A (zh) 一种基于ui自定义多样化组合控件的优化方法
CN109684024A (zh) 多窗口的显示方法、智能终端及计算机可读存储介质
JP2686758B2 (ja) 図形編集装置
US20040117749A1 (en) System and method based on an object-oriented software design framework for displaying constrained graphical layouts
CN115202553A (zh) 白板应用的控制方法、装置和电子设备
CN114489639A (zh) 文件生成方法、装置、设备及存储介质
CN115984147B (zh) 基于齿科扫描仪点云自适应处理方法、设备及介质
JP2575664B2 (ja) 画面制御方法
JP2001291112A (ja) 図形編集装置、および図形編集方法、並びにそのためのプログラムを格納した記録媒体
JPH05265736A (ja) レイアウト装置
CN115185503B (zh) 前端低代码开发方法、装置、电子设备、介质
JP2902820B2 (ja) 図形のクリッピング方法
CN107368237A (zh) 基于用户界面展示的布局方法
JP3988900B2 (ja) 文書処理装置およびそのプログラム記憶媒体
CN116091642A (zh) 一种利用中间变量快速定位绘图元素的方法