WO2023071124A1 - Information storage method and apparatus, and storage medium - Google Patents

Information storage method and apparatus, and storage medium Download PDF

Info

Publication number
WO2023071124A1
WO2023071124A1 PCT/CN2022/090259 CN2022090259W WO2023071124A1 WO 2023071124 A1 WO2023071124 A1 WO 2023071124A1 CN 2022090259 W CN2022090259 W CN 2022090259W WO 2023071124 A1 WO2023071124 A1 WO 2023071124A1
Authority
WO
WIPO (PCT)
Prior art keywords
cell
content information
array
series
graph
Prior art date
Application number
PCT/CN2022/090259
Other languages
French (fr)
Chinese (zh)
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 WO2023071124A1 publication Critical patent/WO2023071124A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Definitions

  • the present application relates to the fields of artificial intelligence and computer technology, and in particular to an information storage method, device and storage medium.
  • a flowchart is a block diagram representation of an algorithm, workflow, or process, with different boxes representing different steps and arrows connecting each two steps. This notation is convenient for illustrating solutions to known problems.
  • Flowcharts are widely used in analyzing, designing, documenting and manipulating processes and procedures in many fields.
  • a data structure such as a tree is usually used to store flowcharts and drawings.
  • a tree is an abstract data type or a data structure that implements this abstract data type, and is used to simulate a data collection with tree-like structural properties. It is a set with a hierarchical relationship composed of n (n>0) finite nodes.
  • Each node has a limited number of child nodes or no child nodes; a node without a parent node is called a root node; each non-root node has one and only one parent node; except for the root node, each child node can be divided into multiple disjoint nodes Subtree; there are no cycles in the tree.
  • the present application provides an information storage method, the method comprising: acquiring a series-parallel graph, the serial-parallel graph including multiple nodes and connections between the multiple nodes; A closed figure of a figure; divide the closed figure into a plurality of cells according to the target division rule; obtain the content information in each of the plurality of cells, and use multiple array objects in the multidimensional array in order Store content information in each cell.
  • the construction includes a closed graph of the series-parallel graph, including:
  • the dividing the closed figure into multiple cells according to the target division rule includes:
  • each column including at least one node connected in parallel;
  • each row including at least one node connected in series;
  • m*n cells obtained by dividing the closed graph are determined.
  • the acquiring the content information in each cell of the plurality of cells includes:
  • each cell in the plurality of cells iterating through each cell in the plurality of cells in turn, if the cell includes a node, then obtain the content information of the node; if the cell includes a connection, obtain the content information of the connection Line type identifier; if the cell does not include nodes and lines, the content information in the cell is empty.
  • the use of multiple array objects in the multidimensional array to sequentially store the content information in each cell includes:
  • one array object is used to store content information in a cell, and the array object includes a first attribute name and a second attribute name;
  • the content information in the cell includes the content information of the node, then set the associated storage content of the first attribute name in the corresponding array object as the content information of the node;
  • the content information in the cell includes the line type identifier, set the associated storage content of the second attribute name in the corresponding array object as the line type identifier.
  • each array object in the multidimensional array When a drawing instruction is detected, traverse each array object in the multidimensional array in turn, perform rendering and drawing according to the storage content in each array object, and obtain a drawing result in a cell corresponding to each array object;
  • the drawing results in the cells corresponding to the array objects are spliced in order to obtain the series-parallel graph.
  • the performing rendering and drawing according to the storage content in each array object, and obtaining the drawing result in the cell corresponding to each array object includes:
  • the first UI components are used to generate nodes according to node content
  • the associated storage content of the second attribute name in the array object is not empty, then input the associated storage content of the second attribute name into the second UI component for drawing rendering to obtain a second drawing rendering result, the second The UI component is used to generate connection lines according to the line type identification;
  • the drawing result in the cell corresponding to the array object is obtained.
  • an information storage device which includes:
  • a first acquiring unit configured to acquire a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
  • a division unit configured to divide the closed figure into a plurality of cells according to the target division rule
  • a second acquiring unit configured to acquire content information in each of the plurality of cells
  • the storage unit is used to sequentially store the content information in each cell by adopting multiple array objects in the multidimensional array object.
  • the device further includes:
  • a third acquisition unit configured to acquire the maximum value in the series direction and the maximum value in the parallel direction in the series-parallel graph
  • the construction unit is specifically configured to use the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle, respectively, to construct a rectangle including the series-parallel figure as a closed figure.
  • the division unit is specifically configured to:
  • each column including at least one node connected in parallel;
  • each row including at least one node connected in series;
  • m*n cells obtained by dividing the closed graph are determined.
  • the second obtaining unit is specifically configured to: sequentially traverse each cell in the plurality of cells, and if the cell includes a node, obtain the The content information of the node; if the cell includes a connection line, obtain the line type identifier of the connection line; if the cell does not include a node and does not include a connection line, then the content information in the cell Is empty.
  • the device further includes:
  • the fourth acquisition unit is used to acquire a plurality of array objects in the multidimensional array, an array object is used to store content information in a cell, and the array object includes a first attribute name and a second attribute name;
  • the storage unit is specifically used for:
  • the content information in the cell includes the content information of the node, then set the associated storage content of the first attribute name in the corresponding array object as the content information of the node;
  • the content information in the cell includes the line type identifier, set the associated storage content of the second attribute name in the corresponding array object as the line type identifier.
  • the device further includes:
  • a traversal unit configured to sequentially traverse each array object in the multidimensional array when a drawing instruction is detected
  • a drawing unit configured to render and draw according to the storage content in each array object, and obtain the drawing result in the cell corresponding to each array object;
  • the splicing unit is configured to splice the drawing results in the cells corresponding to the respective array objects in order to obtain the series-parallel graph.
  • the drawing unit is specifically used for:
  • the first UI components are used to generate nodes according to node content
  • the associated storage content of the second attribute name in the array object is not empty, then input the associated storage content of the second attribute name into the second UI component for drawing rendering to obtain a second drawing rendering result, the second The UI component is used to generate connection lines according to the line type identification;
  • the drawing result in the cell corresponding to the array object is obtained.
  • the present application provides an information storage device, which includes a processor, a memory, and a communication interface, and the processor, memory, and communication interface are connected to each other, wherein the communication interface is used to receive and send data,
  • the memory is used to store program codes, and the processor is used to call the program codes and execute instructions as follows:
  • serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes
  • the content information in each cell of the plurality of cells is obtained, and the content information in each cell is sequentially stored by using multiple array objects in the multidimensional array.
  • the present application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium; when the computer program runs on one or more processors, the following steps are performed: The command:
  • serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes
  • the content information in each cell of the plurality of cells is obtained, and the content information in each cell is sequentially stored by using multiple array objects in the multidimensional array.
  • the closed figure formed by the series-parallel figure is divided into cells in the form of matrix cells, and the content information in each cell is acquired and stored sequentially.
  • Such a storage method can be organized from complex to The node and connection information in the series-parallel graph is obtained and stored, and the storage method is simple, which can realize the storage of the closed loop structure in the series-parallel flow chart.
  • FIG. 1 is a schematic flow diagram of an information storage method provided in an embodiment of the present application.
  • FIG. 2 is a schematic flow diagram of a method for constructing a closed graph provided in an embodiment of the present application
  • Fig. 3 is an example diagram of a series-parallel graph provided by the embodiment of the present application.
  • FIG. 4 is an example diagram of a closed graph constructed based on a series-parallel graph provided in an embodiment of the present application
  • FIG. 5 is an example diagram of dividing cells of a closed figure provided by the embodiment of the present application.
  • FIG. 6 is an example diagram of a line type of a series-parallel graph provided by the embodiment of the present application.
  • FIG. 7 is a schematic flow chart for obtaining drawing results provided by the embodiment of the present application.
  • FIG. 8 is an example diagram of obtaining drawing results in a cell provided by the embodiment of the present application.
  • Fig. 9 is an example diagram of a series-parallel graph obtained by splicing drawing results provided by the embodiment of the present application.
  • FIG. 10 is a schematic diagram of an information storage device provided by an embodiment of the present application.
  • FIG. 1 is a schematic flowchart of an information storage method provided by an embodiment of the present application. As shown in Figure 1, the method includes the following steps:
  • the serial-parallel graph can be a graph with a series-parallel structure such as a series-parallel flow chart.
  • the series-parallel graph includes a series structure and a parallel structure.
  • the connection order of each node is used to indicate the execution order of the operations indicated by each node and the relationship between the operations indicated by each node. For example, if Node 1 and Node 2 are connected in parallel, the operations indicated by Node 1 and Node 2 can be executed in parallel. , and for example, node 3 and node 4 are connected in series, then the operations respectively indicated by node 3 and node 4 are in a serial relationship.
  • Figure 3 is an example diagram of a series-parallel graph provided by the embodiment of the present application. Nodes are parallel relationships.
  • the closed figures in the embodiment of the present application include but are not limited to rectangles, circles, triangles, other polygons or irregular polygons, and the like. All the series-parallel graphs are included in the closed graph.
  • the rectangle is described below as an example.
  • the rectangle may be the smallest rectangle containing the series-parallel image. Specifically, it is optional to obtain the maximum length value in the series direction and the maximum length value in the parallel direction in the above-mentioned series-parallel graph, and use the above-mentioned series direction
  • the maximum value of and the maximum value of the parallel direction are the length and width of the rectangle, and a rectangle including the above-mentioned series-parallel figure is constructed as a closed figure.
  • the serial direction is the direction in which two or more nodes in the serial-parallel graph are serially connected one by one
  • the maximum length value of the serial direction refers to the maximum length value in the serial direction in the above-mentioned serial-parallel graph, as shown in Figure 3
  • the block diagram A1 in is the maximum length value in the series direction.
  • the parallel direction refers to the direction in which two or more nodes are connected in parallel in the series-parallel graph.
  • the maximum length value in the parallel direction refers to the maximum length in the parallel direction in the series-parallel graph.
  • the length value, as shown in the block diagram A2 in Figure 3 is the maximum length value in the parallel direction.
  • FIG. 2 for a schematic flowchart of a method for constructing a closed graph provided in the embodiment of the present application
  • FIG. 4 for an example diagram of a closed graph constructed from the example diagram of a series-parallel connection diagram provided in step S101.
  • the target division rule can be any rule that can divide the above-mentioned closed graph into multiple cells. For example, after dividing according to the target division rule, a cell contains at most one node, and a cell The maximum number of connections contained in is one. In actual situations, the target division rule can be determined according to the situation, which is not limited in this embodiment of the present application.
  • the above-mentioned closed graph is divided into multiple cells according to the target target division rule, including: dividing the above-mentioned closed graph into m columns, each column including at least one node connected in parallel; dividing the above-mentioned closed graph into n Rows, each row including at least one node connected in series; m*n cells obtained by dividing the closed graph above are determined according to the above m columns and the above n rows.
  • the above-mentioned closed graph is divided into multiple cells according to the above-mentioned target division rules, wherein, in the above-mentioned target division rules, each column does not include multiple series nodes, and each row does not include multiple parallel nodes, that is, each unit There is only one node in the grid.
  • FIG. 5 is an example diagram of dividing cells of a closed figure provided by the embodiment of the present application.
  • the example figure of a closed figure as shown in FIG. 4 is divided into cells according to the above-mentioned target division rules as shown in Figure 5 As shown, since a cell contains at most one node, the maximum value of the closed graph in the series direction and the maximum value in the parallel direction are both 7, and a total of 49 cells are divided.
  • a cell A cell may not contain nodes or links, as shown in cell 501 in Figure 5, or a cell may only contain nodes, such as cell 502 in Figure 5, or a cell may only include links , as shown in cell 503 in Figure 5, or a cell may contain a node and a connection line associated with the node, such as cell 504 in Figure 5, wherein the connection line associated with the node may refer to the connection line associated with the node
  • the lines connected to the nodes for example, the form of the lines in each cell can be divided into at least two line types, the line type of the line is used to mark the line type of the line, which is convenient for storage and use, See Figure 6 for an example diagram of the line type obtained from Figure 5.
  • each of the above-mentioned multiple cells traverse each of the above-mentioned multiple cells in turn, if the above-mentioned cell includes a node, then obtain the content information of the above-mentioned node, if the above-mentioned cell includes a connection line, then obtain the line type of the above-mentioned connection line If the above-mentioned cell does not include a node and does not include a connection line, the content information in the above-mentioned cell is empty.
  • multiple array objects in the multidimensional array are used to sequentially store the content information in each cell, including: obtaining multiple array objects in the multidimensional array, one array object is used to store the content information in a cell, the above The array object includes the first attribute name and the second attribute name; obtain the content information in each of the above-mentioned multiple cells in turn; if the content information in the above-mentioned cells is empty, it will correspond to the above-mentioned first attribute in the array object Set the associative storage content of the above-mentioned second attribute name to empty, and set the associated storage content of the above-mentioned second attribute name in the above-mentioned corresponding array object to be empty; if the content information in the above-mentioned cell includes the content information of the node, then set the above-mentioned The associated storage content of the first attribute name is set to the content information of the above-mentioned node; if the content information in the above-mentioned cell includes the connection type identifier,
  • the storage order can be stored from left to right in row units
  • the dimension of the multidimensional array can be the number of rows in the matrix
  • the above line type identification can be obtained after dividing the cells of the closed graph into several line types Get the ID, or call the line type ID pre-stored in the database.
  • the content information pointed to by the first attribute name of the array object used to store the content information in the above-mentioned cell is empty; if the above-mentioned cell does not include a connection line, it is used to store The content information pointed to by the second attribute name of the array object of the content information in the above cell is empty, for example, ⁇ line: '1', node: ⁇ title: '301' ⁇ can be understood as an array object, and the array object
  • the attribute name line is the line type, which is the second attribute name above, the attribute name node is the node, which is the first attribute name above, title: '301' is the specific content of the node, then ⁇ line: '1', node : ⁇ means that the cell includes lines but not nodes, ⁇ line: ", node: ⁇ title: '301' ⁇ means that the cell includes nodes but no lines, ⁇ line: '1', node:
  • a multidimensional array is used to store the contents of each cell in the closed graph after the cells are divided as shown in Figure 5, and the dimension of the multidimensional array is the same as the row
  • the quantity is the same as 7, and the storage result is as follows:
  • Figure 2 is a schematic flow chart of a method for constructing a closed graph provided by the embodiment of the present application, the method includes but is not limited to the following steps:
  • FIG. 3 is an example diagram of a series-parallel graph provided by the embodiment of the present application.
  • 301-317 represent each node of the series-parallel graph, and the content information of each node is set as the label of the node.
  • the content information of the node whose node label is 301 is 301
  • the serial direction of the series-parallel graph is as shown in Fig.
  • the horizontal direction framed by the middle frame A1 the parallel direction of the series-parallel graph is the vertical direction framed by the frame A2 in the figure, then the maximum value of the serial direction of the serial-parallel graph is the maximum value of the number of nodes in the serial direction 7, The maximum value of the parallel direction of the series-parallel graph is 7, the maximum value of the number of nodes in the parallel direction.
  • Fig. 4 is an example diagram of a closed graph constructed according to the series-parallel graph provided by the embodiment of the present application, wherein A3 in FIG. 4 is a closed graph constructed as a matrix including the series-parallel graph shown in FIG. 3 above.
  • Figure 6 is an example diagram of the line type of a series-parallel graph provided by the embodiment of the present application.
  • the 10 types of lines shown in Figure 6 are only for the above-mentioned closed figure as an example, in actual situations, the line types of the connecting lines can be determined according to the situation, and the implementation of this application Examples are not limited to this.
  • the identification of each line type is set as the number in the upper left corner. It can be understood that the connection of line type 1 is the connection connected with node 301, node 304 and node 311 in FIG.
  • the line of line type 3 is the same line as the line in cell 503 in Figure 5
  • the line of line type 4 is the line connected to node 311
  • line type The connection of line type 5 is the connection to node 314
  • the connection of line type 6 is the connection to node 313
  • the connection of line type 7 is the connection to node 316
  • the connection of line type 8 is The connection connected to node 317
  • the connection of line type 9 is the same connection as the connection in cell 505 in Figure 5
  • the connection of line type 10 is the same connection as the connection in cell 506 in Figure 5 Wire.
  • Fig. 7 is a schematic flow chart of obtaining drawing results provided by the embodiment of the present application, the method includes but is not limited to the following steps:
  • the drawing instruction may include traversing each array object of the multidimensional array, the multidimensional array may be a multidimensional array stored in the database, or the array object in the multidimensional array may be obtained by modifying the node content or line type identifier of the node , or the multidimensional array obtained after creating a new multidimensional array and configuring the node content and line type identification in it.
  • the above-mentioned first attribute name is not empty
  • the first UI component for drawing rendering inputs the associated storage content of the above-mentioned first attribute name into the first UI component for drawing rendering, and obtain the first drawing rendering result
  • the above-mentioned first The UI component is used to generate nodes according to the node content
  • the second UI component is used to generate a connection line according to the line type identifier; according to the first drawing rendering result and/or the second drawing rendering result, obtain the drawing result in the cell corresponding to the array object.
  • the obtained array is as follows:
  • the cells of the closed graph are 3 rows and 3 columns.
  • the node information in the corresponding cell and the line type identifier of the connection line are obtained, and the cell corresponding to each array object is obtained.
  • the drawing results are shown in Figure 8.
  • the information storage device 1000 may include:
  • the first acquiring unit 1001 is configured to acquire a series-parallel graph, where the serial-parallel graph includes multiple nodes and connections between the multiple nodes;
  • a construction unit 1002 configured to construct a closed graph including the above series-parallel graph
  • a division unit 1003, configured to divide the above-mentioned closed figure into multiple cells according to the target division rule
  • the second obtaining unit 1004 is configured to obtain the content information in each cell of the plurality of cells
  • the storage unit 1005 is configured to use multiple array objects in the multi-dimensional array object to sequentially store the content information in each cell.
  • the device also includes:
  • the third acquiring unit 1006 is configured to acquire the maximum value in the series direction and the maximum value in the parallel direction in the series-parallel graph;
  • the construction unit 1002 is specifically configured to use the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle, respectively, to construct a rectangle including the above-mentioned series-parallel figure as a closed figure.
  • the dividing unit 1003 is specifically used for:
  • the second acquiring unit 1004 is specifically configured to:
  • the line type identifier of the above-mentioned connection line is obtained; if the above-mentioned cell does not include a node and does not include a connection line, the content information in the above-mentioned cell is empty.
  • the device also includes:
  • the fourth obtaining unit 1010 is used to obtain multiple array objects in the multidimensional array, one array object is used to store the content information in one cell, and the above-mentioned array object includes the first attribute name and the second attribute name;
  • the storage unit 1005 is specifically used for:
  • the content information in the above-mentioned cell includes the content information of the node, then set the associated storage content of the above-mentioned first attribute name in the corresponding array object as the content information of the above-mentioned node;
  • the content information in the above cell includes the connection type identifier, then set the associated storage content of the above second attribute name in the corresponding array object as the above line type identifier.
  • the device also includes:
  • the traversal unit 1007 is configured to sequentially traverse each array object in the above-mentioned multidimensional array when a drawing instruction is detected;
  • the drawing unit 1008 is configured to perform rendering and drawing according to the storage content in each of the above-mentioned array objects, and obtain the drawing results in the cells corresponding to the above-mentioned each of the array objects;
  • the splicing unit 1009 is configured to splice the drawing results in the cells corresponding to the above-mentioned array objects in order to obtain the above-mentioned series-parallel graph.
  • the drawing unit 1008 is specifically used for:
  • the associated storage content of the first attribute name in the above-mentioned array object is not empty, then input the associated storage content of the above-mentioned first attribute name into the first UI component for drawing rendering, and obtain the first drawing rendering result.
  • the above-mentioned first UI component uses to generate nodes based on node content;
  • the associated storage content of the second attribute name in the above-mentioned array object is not empty, then input the associated storage content of the above-mentioned second attribute name into the second UI component for drawing rendering, and obtain the second drawing rendering result.
  • the above-mentioned second UI component uses Used to generate connection lines according to the line type identification;
  • the drawing result in the cell corresponding to the array object is obtained.
  • the embodiment of the present application also provides a computer storage medium, the computer storage medium can store a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor as in the above-mentioned embodiment shown in FIG. 1 , FIG. 2 or FIG. 7
  • the computer-readable storage medium may be non-volatile or volatile.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (eg, floppy disk, hard disk, magnetic tape), an optical medium (eg, DVD), or a semiconductor medium (eg, a solid-state hard disk), and the like.
  • the processes can be completed by computer programs to instruct related hardware.
  • the programs can be stored in computer-readable storage media.
  • When the programs are executed may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.

Landscapes

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

Abstract

An information storage method and apparatus, and a storage medium, relating to the technical field of computers. The information storage method comprises: acquiring a series-parallel graph, the series-parallel graph comprising a plurality of nodes and connecting lines between the plurality of nodes (S101); constructing a closed graph comprising the series-parallel graph (S102); dividing the closed graph into a plurality of cells according to a target division rule (S103); and acquiring content information in each of the plurality of cells, and sequentially storing the content information in each cell by using a plurality of array objects in a multi-dimensional array (S104). A series-parallel flowchart can be stored more flexibly.

Description

信息存储方法、装置及存储介质Information storage method, device and storage medium
优先权申明priority statement
本申请要求于2021年10月30日提交中国专利局、申请号为202111278009.5,发明名称为“信息存储方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111278009.5 and the title of the invention "information storage method, device and storage medium" submitted to the China Patent Office on October 30, 2021, the entire contents of which are incorporated by reference in this application middle.
技术领域technical field
本申请涉及人工智能、计算机技术领域,尤其涉及一种信息存储方法、装置及存储介质。The present application relates to the fields of artificial intelligence and computer technology, and in particular to an information storage method, device and storage medium.
背景技术Background technique
流程图是表示算法、工作流或流程的一种框图表示,它以不同的框代表不同的步骤,每两个步骤之间则以箭头连接。这种表示方法便于说明解决已知问题的方法。流程图在分析、设计、记录及操控许多领域的流程和程序都有广泛应用。通常会采用树这种数据结构来存储流程图以及绘图。在计算机科学中,树是一种抽象数据类型或是实现这种抽象数据类型的数据结构,用来模拟具有树状结构性质的数据集合。它是由n(n>0)个有限节点组成一个具有层次关系的集合。每个节点存在有限个子节点或无子节点;没有父节点的节点称为根节点;每一个非根节点有且只有一个父节点;除了根节点外,每个子节点可以分为多个不相交的子树;树里面没有环路(cycle)。A flowchart is a block diagram representation of an algorithm, workflow, or process, with different boxes representing different steps and arrows connecting each two steps. This notation is convenient for illustrating solutions to known problems. Flowcharts are widely used in analyzing, designing, documenting and manipulating processes and procedures in many fields. A data structure such as a tree is usually used to store flowcharts and drawings. In computer science, a tree is an abstract data type or a data structure that implements this abstract data type, and is used to simulate a data collection with tree-like structural properties. It is a set with a hierarchical relationship composed of n (n>0) finite nodes. Each node has a limited number of child nodes or no child nodes; a node without a parent node is called a root node; each non-root node has one and only one parent node; except for the root node, each child node can be divided into multiple disjoint nodes Subtree; there are no cycles in the tree.
发明人意识到如果流程图中存在串并联的框图,即流程图中存在闭合环路,如果继续利用树的结构来存储或绘图就变得极为复杂,串并联流程图中子树最终是要相交的,因此采用树的结构存储串并联流程图的方式不够灵活。The inventor realized that if there is a series-parallel block diagram in the flow chart, that is, there is a closed loop in the flow chart, it will become extremely complicated if you continue to use the tree structure for storage or drawing, and the sub-trees in the series-parallel flow chart will eventually intersect Therefore, the method of storing series-parallel flow charts in a tree structure is not flexible enough.
发明内容Contents of the invention
基于此,有必要针对上述技术问题,提供一种信息存储方法、装置与存储介质,通过矩阵单元格的方式对串并联流程图所构成的封闭图形进行划分得到多个单元格,并获取每个单元格中的内容信息,依次存储每个单元格中的内容信息,可以更加灵活的存储串并联流程图。Based on this, it is necessary to provide an information storage method, device and storage medium for the above technical problems, which divide the closed graph formed by the series-parallel flow chart into multiple cells by means of matrix cells, and obtain each The content information in the cells stores the content information in each cell in turn, which can store the series-parallel flow chart more flexibly.
第一方面,本申请提供一种信息存储方法,所述方法包括:获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;构建包括所述串并联图形的封闭图形;按照目标划分规则,将所述封闭图形划分为多个单元格;获取所述多个单元格中每个单元格中的内容信息,并采用多维数组中的多个数组对象依次存储每个单元格中的内容信息。In a first aspect, the present application provides an information storage method, the method comprising: acquiring a series-parallel graph, the serial-parallel graph including multiple nodes and connections between the multiple nodes; A closed figure of a figure; divide the closed figure into a plurality of cells according to the target division rule; obtain the content information in each of the plurality of cells, and use multiple array objects in the multidimensional array in order Store content information in each cell.
在一种可选的实施方式中,所述构建包括所述串并联图形的封闭图形,包括:In an optional implementation manner, the construction includes a closed graph of the series-parallel graph, including:
获取所述串并联图形中串联方向的最大值和并联方向的最大值;Obtaining the maximum value of the series direction and the maximum value of the parallel direction in the series-parallel graph;
分别以所述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括所述串并联图形的矩形,作为封闭图形。Taking the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle respectively, construct a rectangle including the series-parallel figure as a closed figure.
在一种可选的实施方式中,所述按照目标划分规则,将所述封闭图形划分为多个单元格,包括:In an optional implementation manner, the dividing the closed figure into multiple cells according to the target division rule includes:
将所述封闭图形划分为m列,每列包括并联的至少一个节点;dividing the closed graph into m columns, each column including at least one node connected in parallel;
将所述封闭图形划分为n行,每行包括串联的至少一个节点;dividing the closed graph into n rows, each row including at least one node connected in series;
根据所述m列和所述n行,确定将所述封闭图形划分得到的m*n个单元格。According to the m columns and the n rows, m*n cells obtained by dividing the closed graph are determined.
在一种可选的实施方式中,所述获取所述多个单元格中每个单元格中的内容信息,包括:In an optional implementation manner, the acquiring the content information in each cell of the plurality of cells includes:
依次遍历所述多个单元格中的每个单元格,若所述单元格中包括节点,则获取所述节点的内容信息;若所述单元格中包括连线,则获取所述连线的线类型标识;若所述单元格中不包括节点且不包括连线,则所述单元格中的内容信息为空。Iterating through each cell in the plurality of cells in turn, if the cell includes a node, then obtain the content information of the node; if the cell includes a connection, obtain the content information of the connection Line type identifier; if the cell does not include nodes and lines, the content information in the cell is empty.
在一种可选的实施方式中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息,包括:In an optional implementation manner, the use of multiple array objects in the multidimensional array to sequentially store the content information in each cell includes:
获取多维数组中的多个数组对象,一个数组对象用于存储一个单元格中的内容信息,所述数组对象包括第一属性名和第二属性名;Obtain multiple array objects in the multidimensional array, one array object is used to store content information in a cell, and the array object includes a first attribute name and a second attribute name;
依次获取所述多个单元格中每个单元格中的内容信息;Obtaining the content information in each of the plurality of cells in sequence;
若所述单元格中的内容信息为空,则将对应数组对象中所述第一属性名的关联存储内容设置为空,且将所述对应数组对象中所述第二属性名的关联存储内容设置为空;If the content information in the cell is empty, set the associated storage content of the first attribute name in the corresponding array object to empty, and set the associated storage content of the second attribute name in the corresponding array object set to null;
若所述单元格中的内容信息包括节点的内容信息,则将对应数组对象中所述第一属性名的关联存储内容设置为所述节点的内容信息;If the content information in the cell includes the content information of the node, then set the associated storage content of the first attribute name in the corresponding array object as the content information of the node;
若所述单元格中的内容信息包括连线类型标识,则将对应数组对象中所述第二属性名的关联存储内容设置为所述线类型标识。If the content information in the cell includes the line type identifier, set the associated storage content of the second attribute name in the corresponding array object as the line type identifier.
在一种可选的实施方式中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息之后,还包括:In an optional implementation manner, after sequentially storing the content information in each cell by using multiple array objects in the multidimensional array, it further includes:
当检测到绘图指令时,依次遍历所述多维数组中的各个数组对象,根据所述各个数组对象中的存储内容进行渲染绘图,获得所述各个数组对象对应的单元格中的绘图结果;When a drawing instruction is detected, traverse each array object in the multidimensional array in turn, perform rendering and drawing according to the storage content in each array object, and obtain a drawing result in a cell corresponding to each array object;
将所述各个数组对象对应的单元格中的绘图结果按照顺序拼接,得到所述串并联图形。The drawing results in the cells corresponding to the array objects are spliced in order to obtain the series-parallel graph.
在一种可选的实施方式中,所述根据所述各个数组对象中的存储内容进行渲染绘图,获得所述各个数组对象对应的单元格中的绘图结果,包括:In an optional implementation manner, the performing rendering and drawing according to the storage content in each array object, and obtaining the drawing result in the cell corresponding to each array object includes:
若所述数组对象中第一属性名的关联存储内容不为空,则将所述第一属性名的关联存储内容输入第一UI组件进行绘图渲染,获得第一绘图渲染结果,所述第一UI组件用于根据节点内容生成节点;If the associated storage content of the first attribute name in the array object is not empty, input the associated storage content of the first attribute name into the first UI component for drawing rendering, and obtain the first drawing rendering result, the first UI components are used to generate nodes according to node content;
若所述数组对象中第二属性名的关联存储内容不为空,则将所述第二属性名的关联存储内容输入第二UI组件进行绘图渲染,获得第二绘图渲染结果,所述第二UI组件用于根据线类型标识生成连线;If the associated storage content of the second attribute name in the array object is not empty, then input the associated storage content of the second attribute name into the second UI component for drawing rendering to obtain a second drawing rendering result, the second The UI component is used to generate connection lines according to the line type identification;
根据所述第一绘图渲染结果和/或第二绘图渲染结果,获得所述数组对象对应的单元格中的绘图结果。According to the first drawing rendering result and/or the second drawing rendering result, the drawing result in the cell corresponding to the array object is obtained.
第二方面,本申请提供一种信息存储装置,该装置包括:In a second aspect, the present application provides an information storage device, which includes:
第一获取单元,用于获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;a first acquiring unit, configured to acquire a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
构建单元,用于构建包括所述串并联图形的封闭图形;A construction unit for constructing a closed graph including the series-parallel graph;
划分单元,用于按照目标划分规则,将所述封闭图形划分为多个单元格;A division unit, configured to divide the closed figure into a plurality of cells according to the target division rule;
第二获取单元,用于获取所述多个单元格中每个单元格中的内容信息;a second acquiring unit, configured to acquire content information in each of the plurality of cells;
存储单元,用于采用多维数组对象中的多个数组对象依次存储每个单元格中的内容信息。The storage unit is used to sequentially store the content information in each cell by adopting multiple array objects in the multidimensional array object.
结合第二方面,在一些实施例中,所述装置还包括:With reference to the second aspect, in some embodiments, the device further includes:
第三获取单元,用于获取所述串并联图形中串联方向的最大值和并联方向的最大值;A third acquisition unit, configured to acquire the maximum value in the series direction and the maximum value in the parallel direction in the series-parallel graph;
所述构建单元,具体用于分别以所述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括所述串并联图形的矩形,作为封闭图形。The construction unit is specifically configured to use the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle, respectively, to construct a rectangle including the series-parallel figure as a closed figure.
结合第二方面,在一些实施例中,所述划分单元,具体用于:With reference to the second aspect, in some embodiments, the division unit is specifically configured to:
将所述封闭图形划分为m列,每列包括并联的至少一个节点;dividing the closed graph into m columns, each column including at least one node connected in parallel;
将所述封闭图形划分为n行,每行包括串联的至少一个节点;dividing the closed graph into n rows, each row including at least one node connected in series;
根据所述m列和所述n行,确定将所述封闭图形划分得到的m*n个单元格。According to the m columns and the n rows, m*n cells obtained by dividing the closed graph are determined.
结合第二方面,在一些实施例中,所述第二获取单元,具体用于:依次遍历所述多个单元格中的每个单元格,若所述单元格中包括节点,则获取所述节点的内容信息;若所述单元格中包括连线,则获取所述连线的线类型标识;若所述单元格中不包括节点且不包括连线,则所述单元格中的内容信息为空。With reference to the second aspect, in some embodiments, the second obtaining unit is specifically configured to: sequentially traverse each cell in the plurality of cells, and if the cell includes a node, obtain the The content information of the node; if the cell includes a connection line, obtain the line type identifier of the connection line; if the cell does not include a node and does not include a connection line, then the content information in the cell Is empty.
结合第二方面,在一些实施例中,所述装置还包括:With reference to the second aspect, in some embodiments, the device further includes:
第四获取单元,用于获取多维数组中的多个数组对象,一个数组对象用于存储一个单元 格中的内容信息,所述数组对象包括第一属性名和第二属性名;The fourth acquisition unit is used to acquire a plurality of array objects in the multidimensional array, an array object is used to store content information in a cell, and the array object includes a first attribute name and a second attribute name;
所述存储单元,具体用于:The storage unit is specifically used for:
若所述单元格中的内容信息为空,则将对应数组对象中所述第一属性名的关联存储内容设置为空,且将所述对应数组对象中所述第二属性名的关联存储内容设置为空;If the content information in the cell is empty, set the associated storage content of the first attribute name in the corresponding array object to empty, and set the associated storage content of the second attribute name in the corresponding array object set to null;
若所述单元格中的内容信息包括节点的内容信息,则将对应数组对象中所述第一属性名的关联存储内容设置为所述节点的内容信息;If the content information in the cell includes the content information of the node, then set the associated storage content of the first attribute name in the corresponding array object as the content information of the node;
若所述单元格中的内容信息包括连线类型标识,则将对应数组对象中所述第二属性名的关联存储内容设置为所述线类型标识。If the content information in the cell includes the line type identifier, set the associated storage content of the second attribute name in the corresponding array object as the line type identifier.
结合第二方面,在一些实施例中,所述装置还包括:With reference to the second aspect, in some embodiments, the device further includes:
遍历单元,用于当检测到绘图指令时,依次遍历所述多维数组中的各个数组对象;A traversal unit, configured to sequentially traverse each array object in the multidimensional array when a drawing instruction is detected;
绘图单元,用于根据所述各个数组对象中的存储内容进行渲染绘图,获得所述各个数组对象对应的单元格中的绘图结果;A drawing unit, configured to render and draw according to the storage content in each array object, and obtain the drawing result in the cell corresponding to each array object;
拼接单元,用于将所述各个数组对象对应的单元格中的绘图结果按照顺序拼接,得到所述串并联图形。The splicing unit is configured to splice the drawing results in the cells corresponding to the respective array objects in order to obtain the series-parallel graph.
结合第二方面,在一些实施例中,所述绘图单元具体用于:With reference to the second aspect, in some embodiments, the drawing unit is specifically used for:
若所述数组对象中第一属性名的关联存储内容不为空,则将所述第一属性名的关联存储内容输入第一UI组件进行绘图渲染,获得第一绘图渲染结果,所述第一UI组件用于根据节点内容生成节点;If the associated storage content of the first attribute name in the array object is not empty, input the associated storage content of the first attribute name into the first UI component for drawing rendering, and obtain the first drawing rendering result, the first UI components are used to generate nodes according to node content;
若所述数组对象中第二属性名的关联存储内容不为空,则将所述第二属性名的关联存储内容输入第二UI组件进行绘图渲染,获得第二绘图渲染结果,所述第二UI组件用于根据线类型标识生成连线;If the associated storage content of the second attribute name in the array object is not empty, then input the associated storage content of the second attribute name into the second UI component for drawing rendering to obtain a second drawing rendering result, the second The UI component is used to generate connection lines according to the line type identification;
根据所述第一绘图渲染结果和/或第二绘图渲染结果,获得所述数组对象对应的单元格中的绘图结果。According to the first drawing rendering result and/or the second drawing rendering result, the drawing result in the cell corresponding to the array object is obtained.
第三方面,本申请提供一种信息存储的装置,其中,包括处理器、存储器以及通信接口,所述处理器、存储器和通信接口相互连接,其中,所述通信接口用于接收和发送数据,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,执行如以下步骤的指令:In a third aspect, the present application provides an information storage device, which includes a processor, a memory, and a communication interface, and the processor, memory, and communication interface are connected to each other, wherein the communication interface is used to receive and send data, The memory is used to store program codes, and the processor is used to call the program codes and execute instructions as follows:
获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;Obtaining a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
构建包括所述串并联图形的封闭图形;Constructing a closed graph comprising the series-parallel graph;
按照目标划分规则,将所述封闭图形划分为多个单元格;Divide the closed figure into a plurality of cells according to the target division rule;
获取所述多个单元格中每个单元格中的内容信息,并采用多维数组中的多个数组对象依次存储每个单元格中的内容信息。The content information in each cell of the plurality of cells is obtained, and the content information in each cell is sequentially stored by using multiple array objects in the multidimensional array.
第四方面,本申请提供一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机程序;当所述计算机程序在一个或多个处理器上运行时,执行如以下步骤的指令:In a fourth aspect, the present application provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium; when the computer program runs on one or more processors, the following steps are performed: The command:
获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;Obtaining a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
构建包括所述串并联图形的封闭图形;Constructing a closed graph comprising the series-parallel graph;
按照目标划分规则,将所述封闭图形划分为多个单元格;Divide the closed figure into a plurality of cells according to the target division rule;
获取所述多个单元格中每个单元格中的内容信息,并采用多维数组中的多个数组对象依次存储每个单元格中的内容信息。The content information in each cell of the plurality of cells is obtained, and the content information in each cell is sequentially stored by using multiple array objects in the multidimensional array.
本申请实施例中,采用矩阵单元格的方式将串并联图形所构成的封闭图形进行单元格划分,获取并依次存储每个单元格中的内容信息,这样的存储方式可以有条理的从复杂的串并联图形中获取到其中的节点和连线信息并进行存储,存储方式简单,能够实现对串并联流程图中闭合环路结构的存储。In the embodiment of the present application, the closed figure formed by the series-parallel figure is divided into cells in the form of matrix cells, and the content information in each cell is acquired and stored sequentially. Such a storage method can be organized from complex to The node and connection information in the series-parallel graph is obtained and stored, and the storage method is simple, which can realize the storage of the closed loop structure in the series-parallel flow chart.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following will briefly introduce the drawings that are used in the embodiments.
图1为本申请实施例提供的一种信息存储方法的流程示意图;FIG. 1 is a schematic flow diagram of an information storage method provided in an embodiment of the present application;
图2为本申请实施例提供的一种构建封闭图形方法的流程示意图;FIG. 2 is a schematic flow diagram of a method for constructing a closed graph provided in an embodiment of the present application;
图3为本申请实施例提供的一个串并联图形的示例图;Fig. 3 is an example diagram of a series-parallel graph provided by the embodiment of the present application;
图4为本申请实施例提供的一个根据串并联图形构建的封闭图形的示例图;FIG. 4 is an example diagram of a closed graph constructed based on a series-parallel graph provided in an embodiment of the present application;
图5为本申请实施例提供的一个对封闭图形划分单元格的示例图;FIG. 5 is an example diagram of dividing cells of a closed figure provided by the embodiment of the present application;
图6为本申请实施例提供的一个串并联图形的线类型的示例图;FIG. 6 is an example diagram of a line type of a series-parallel graph provided by the embodiment of the present application;
图7为本申请实施例提供的一种获取绘图结果的流程示意图;FIG. 7 is a schematic flow chart for obtaining drawing results provided by the embodiment of the present application;
图8为本申请实施例提供的一个获取单元格中绘图结果的示例图;FIG. 8 is an example diagram of obtaining drawing results in a cell provided by the embodiment of the present application;
图9为本申请实施例提供的一个拼接绘图结果得到串并联图形的示例图;Fig. 9 is an example diagram of a series-parallel graph obtained by splicing drawing results provided by the embodiment of the present application;
图10为本申请实施例提供的一种信息存储装置的示意图。FIG. 10 is a schematic diagram of an information storage device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图对本申请作进一步详细描述。The application will be described in further detail below in conjunction with the accompanying drawings.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素,此外,本申请不同实施例中具有同样命名的部件、特征、要素可能具有相同含义,也可能具有不同含义,其具体含义需以其在该具体实施例中的解释或者进一步结合该具体实施例中上下文进行确定。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article, or device that includes the element. In addition, different implementations of the present application Components, features, and elements with the same name in the example may have the same meaning, or may have different meanings, and the specific meaning shall be determined based on the explanation in the specific embodiment or further combined with the context in the specific embodiment.
应当理解,在本文中,术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,表示前后关联对象是一种“或”的关系。It should be understood that, in this article, the term "and/or" is only an association relationship describing associated objects, indicating that there may be three relationships, for example, A and/or B may mean: A exists alone, and A exists at the same time and B, there are three cases of B alone. In addition, the character "/" in this article indicates that the contextual objects are an "or" relationship.
应当理解,在本文中,出现的“多个”是指两个或两个以上。It should be understood that in this article, "plurality" refers to two or more than two.
应当理解,在本文中,出现的第一、第二等描述,仅作示意与区分描述对象之用,没有次序之分,也不表示本申请实施例中对设备个数的特别限定,不能构成对本申请实施例的任何限制。It should be understood that in this article, the first, second, and other descriptions appearing are only for the purpose of illustrating and distinguishing the description objects, and there is no order, nor does it represent a special limitation on the number of devices in this embodiment of the application, and cannot constitute Any limitations on the examples of this application.
本申请实施例提供了一种信息存储方法,为了更清楚地描述本申请的方案,下面对本申请涉及的一些附图作进一步介绍。An embodiment of the present application provides an information storage method. In order to describe the solution of the present application more clearly, some drawings involved in the present application are further introduced below.
请参阅图1,图1为本申请实施例提供的一种信息存储方法的流程示意图。如图1所示,该方法包括以下步骤:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of an information storage method provided by an embodiment of the present application. As shown in Figure 1, the method includes the following steps:
S101,获取串并联图形,上述串并联图形包括多个节点以及上述多个节点之间的连线;S101. Obtain a series-parallel graph, where the above-mentioned series-parallel graph includes multiple nodes and connections between the multiple nodes;
本申请实施例中,串并联图形中存在闭合环路,串并联图形可以是串并联流程图等具有串并联结构的图形,该串并联图形中包括串联结构和并联结构,该串并联流程图中各个节点的连接顺序用于表示各个节点所指示操作的执行顺序以及各个节点所指示操作之间的关系,比如,节点1和节点2并联,则该节点1和节点2分别指示的操作可以并行执行,又比如节点3和节点4串联,则该节点3和节点4分别指示的操作是串行关系。请参见图3,图3为本申请实施例提供的一个串并联图形的示例图,如图所示,框图A1中各个节点即是串联结构示意图,即节点301-节点307串联,框图A2中各个节点即是并联关系。In the embodiment of the present application, there is a closed loop in the series-parallel graph, and the serial-parallel graph can be a graph with a series-parallel structure such as a series-parallel flow chart. The series-parallel graph includes a series structure and a parallel structure. In the series-parallel flow chart The connection order of each node is used to indicate the execution order of the operations indicated by each node and the relationship between the operations indicated by each node. For example, if Node 1 and Node 2 are connected in parallel, the operations indicated by Node 1 and Node 2 can be executed in parallel. , and for example, node 3 and node 4 are connected in series, then the operations respectively indicated by node 3 and node 4 are in a serial relationship. Please refer to Figure 3, Figure 3 is an example diagram of a series-parallel graph provided by the embodiment of the present application. Nodes are parallel relationships.
S102,构建包括上述串并联图形的封闭图形;S102, constructing a closed graph including the above series-parallel graph;
本申请实施例中封闭图形包括但不限于矩形、圆形、三角形、其他多边形或不规则多边形等等。该串并联图形全部被包含于该封闭图形中。下面以矩形作为举例描述,该矩形可以是包含该串并联图像的最小矩形,具体可选的,获取上述串并联图形中串联方向的最大长度值和并联方向的最大长度值,分别以上述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括上述串并联图形的矩形,作为封闭图形。其中,串联方向是串并联图形中两个或两个以上的节点逐个顺次串联的方向,串联方向的最大长度值是指在上述串并联图形中在串联方向上的最大长度值,如图3中的框图A1即是串联方向的最大长度值,并联方向是 指串并联图形中两个或两个以上节点并联的方向,并联方向的最大长度值是指在串并联图形中在并联方向的最大长度值,如图3中的框图A2即是并联方向的最大长度值。The closed figures in the embodiment of the present application include but are not limited to rectangles, circles, triangles, other polygons or irregular polygons, and the like. All the series-parallel graphs are included in the closed graph. The rectangle is described below as an example. The rectangle may be the smallest rectangle containing the series-parallel image. Specifically, it is optional to obtain the maximum length value in the series direction and the maximum length value in the parallel direction in the above-mentioned series-parallel graph, and use the above-mentioned series direction The maximum value of and the maximum value of the parallel direction are the length and width of the rectangle, and a rectangle including the above-mentioned series-parallel figure is constructed as a closed figure. Among them, the serial direction is the direction in which two or more nodes in the serial-parallel graph are serially connected one by one, and the maximum length value of the serial direction refers to the maximum length value in the serial direction in the above-mentioned serial-parallel graph, as shown in Figure 3 The block diagram A1 in is the maximum length value in the series direction. The parallel direction refers to the direction in which two or more nodes are connected in parallel in the series-parallel graph. The maximum length value in the parallel direction refers to the maximum length in the parallel direction in the series-parallel graph. The length value, as shown in the block diagram A2 in Figure 3, is the maximum length value in the parallel direction.
其中,本申请实施例提供的一种构建封闭图形方法的流程示意图请参见图2,对步骤S101中提供的串并联图形示例图构建的封闭图形示例图请参见图4。Wherein, please refer to FIG. 2 for a schematic flowchart of a method for constructing a closed graph provided in the embodiment of the present application, and refer to FIG. 4 for an example diagram of a closed graph constructed from the example diagram of a series-parallel connection diagram provided in step S101.
S103,按照目标划分规则,将上述封闭图形划分为多个单元格;S103. Divide the above-mentioned closed figure into multiple cells according to the target division rule;
本申请实施例中,目标划分规则可以是任意能够将上述封闭图形划分为多个单元格的规则,例如,按照目标划分规则进行划分之后,一个单元格包含的节点数量最多为一个,一个单元格中包含的连线数量最多为一个,在实际情况中,该目标划分规则可以视情况而定,本申请实施例对此不作限定。具体可选的,上述按照目标目标划分规则,将上述封闭图形划分为多个单元格,包括:将上述封闭图形划分为m列,每列包括并联的至少一个节点;将上述封闭图形划分为n行,每行包括串联的至少一个节点;根据上述m列和上述n行,确定将上述封闭图形划分得到的m*n个单元格。在划分时,按照上述目标划分规则将上述封闭图形划分为多个单元格,其中,上述目标划分规则中,每一列不包括多个串联节点,每一行不包括多个并列节点,即每一个单元格中只有一个节点。In the embodiment of the present application, the target division rule can be any rule that can divide the above-mentioned closed graph into multiple cells. For example, after dividing according to the target division rule, a cell contains at most one node, and a cell The maximum number of connections contained in is one. In actual situations, the target division rule can be determined according to the situation, which is not limited in this embodiment of the present application. Specifically, optionally, the above-mentioned closed graph is divided into multiple cells according to the target target division rule, including: dividing the above-mentioned closed graph into m columns, each column including at least one node connected in parallel; dividing the above-mentioned closed graph into n Rows, each row including at least one node connected in series; m*n cells obtained by dividing the closed graph above are determined according to the above m columns and the above n rows. When dividing, the above-mentioned closed graph is divided into multiple cells according to the above-mentioned target division rules, wherein, in the above-mentioned target division rules, each column does not include multiple series nodes, and each row does not include multiple parallel nodes, that is, each unit There is only one node in the grid.
其中,请参见图5,图5为本申请实施例提供的一个对封闭图形划分单元格的示例图,对如图4所示的封闭图形示例图按照上述目标划分规则进行单元格划分如图5所示,由于一个单元格包含的节点数量最多为一个,该封闭图形串联方向的最大值和并联方向的最大值均为7,总共划分了49个单元格,由图5可以看出,一个单元格可以不包含节点,也不包含连线,如图5中的单元格501,或者,一个单元格也可以仅仅包含节点,如图5中的单元格502,或者一个单元格可以仅仅包括连线,如图5中的单元格503,或者一个单元格可以包含一个节点和与该节点相关联的连线,如图5中的单元格504,其中,与节点相关联的连线可以是指与该节点相连的连线,示例性的,可以将各个单元格中的连线的形态划分为至少两种线类型,该连线的线类型用于标记连线的线类型,便于存储和使用,根据图5得到的线类型的示例图请参见图6。Wherein, please refer to FIG. 5. FIG. 5 is an example diagram of dividing cells of a closed figure provided by the embodiment of the present application. The example figure of a closed figure as shown in FIG. 4 is divided into cells according to the above-mentioned target division rules as shown in Figure 5 As shown, since a cell contains at most one node, the maximum value of the closed graph in the series direction and the maximum value in the parallel direction are both 7, and a total of 49 cells are divided. It can be seen from Figure 5 that a cell A cell may not contain nodes or links, as shown in cell 501 in Figure 5, or a cell may only contain nodes, such as cell 502 in Figure 5, or a cell may only include links , as shown in cell 503 in Figure 5, or a cell may contain a node and a connection line associated with the node, such as cell 504 in Figure 5, wherein the connection line associated with the node may refer to the connection line associated with the node The lines connected to the nodes, for example, the form of the lines in each cell can be divided into at least two line types, the line type of the line is used to mark the line type of the line, which is convenient for storage and use, See Figure 6 for an example diagram of the line type obtained from Figure 5.
S104,获取上述多个单元格中每个单元格中的内容信息,并采用多维数组中的多个数组对象依次存储每个单元格中的内容信息。S104. Obtain the content information in each of the plurality of cells, and sequentially store the content information in each cell by using multiple array objects in the multidimensional array.
具体的,依次遍历上述多个单元格中的每个单元格,若上述单元格中包括节点,则获取上述节点的内容信息,若上述单元格中包括连线,则获取上述连线的线类型标识,若上述单元格中不包括节点且不包括连线,则上述单元格中的内容信息为空。例如,如图5所示,单元格501中不存在节点和连线,因此获取其内容信息为空,单元格502中只存在节点,因此获取其内容信息为该节点的内容信息,单元格503中只存在连线,因此获取其内容信息为该连线的线类型标识,单元格504中存在节点和连线,因此获取其内容信息为该节点的内容信息和该连线的线类型标识。Specifically, traverse each of the above-mentioned multiple cells in turn, if the above-mentioned cell includes a node, then obtain the content information of the above-mentioned node, if the above-mentioned cell includes a connection line, then obtain the line type of the above-mentioned connection line If the above-mentioned cell does not include a node and does not include a connection line, the content information in the above-mentioned cell is empty. For example, as shown in Figure 5, there are no nodes and connections in cell 501, so its content information is empty, and there are only nodes in cell 502, so its content information is the content information of this node, and cell 503 There is only a connection in , so its content information is the line type identifier of the connection, and there are nodes and connections in cell 504, so its content information is the content information of the node and the line type identifier of the connection.
具体的,采用多维数组中的多个数组对象依次存储每个单元格中的内容信息,包括:获取多维数组中的多个数组对象,一个数组对象用于存储一个单元格中的内容信息,上述数组对象包括第一属性名和第二属性名;依次获取上述多个单元格中每个单元格中的内容信息;若上述单元格中的内容信息为空,则将对应数组对象中上述第一属性名的关联存储内容设置为空,且将上述对应数组对象中上述第二属性名的关联存储内容设置为空;若上述单元格中的内容信息包括节点的内容信息,则将对应数组对象中上述第一属性名的关联存储内容设置为上述节点的内容信息;若上述单元格中的内容信息包括连线类型标识,则将对应数组对象中上述第二属性名的关联存储内容设置为上述线类型标识。。可选的,存储顺序可以是以行为单位从左到右进行存储,该多维数组的维度可以是矩阵的行数量,上述线类型标识可以是对封闭图形进行划分单元格后得到若干个线类型后进行标识获得,或者是调用预存在数据库中的线类型标识获得。Specifically, multiple array objects in the multidimensional array are used to sequentially store the content information in each cell, including: obtaining multiple array objects in the multidimensional array, one array object is used to store the content information in a cell, the above The array object includes the first attribute name and the second attribute name; obtain the content information in each of the above-mentioned multiple cells in turn; if the content information in the above-mentioned cells is empty, it will correspond to the above-mentioned first attribute in the array object Set the associative storage content of the above-mentioned second attribute name to empty, and set the associated storage content of the above-mentioned second attribute name in the above-mentioned corresponding array object to be empty; if the content information in the above-mentioned cell includes the content information of the node, then set the above-mentioned The associated storage content of the first attribute name is set to the content information of the above-mentioned node; if the content information in the above-mentioned cell includes the connection type identifier, then the associated storage content of the above-mentioned second attribute name in the corresponding array object is set to the above-mentioned line type logo. . Optionally, the storage order can be stored from left to right in row units, the dimension of the multidimensional array can be the number of rows in the matrix, and the above line type identification can be obtained after dividing the cells of the closed graph into several line types Get the ID, or call the line type ID pre-stored in the database.
可选的,如果需要在流程图中新增或删除节点,只需要修改存储的该流程图对应的多维数组中数组对象中该节点对应的数组对象中该节点内容和周围单元格所对应数组对象的线类 型。其中,若上述单元格中不包括节点,则用于存储上述单元格中内容信息的数组对象的第一属性名指向的内容信息为空,若上述单元格中不包括连线,则用于存储上述单元格中内容信息的数组对象的第二属性名指向的内容信息为空,例如,{line:’1’,node:{title:’301’}}可以理解为一个数组对象,该数组对象中属性名line为线类型,即为上述第二属性名,属性名node为节点,即为上述第一属性名,title:’301’为节点的具体内容,则{line:’1’,node:{}}表示单元格中包括连线而不包括节点,{line:”,node:{title:’301’}}表示单元格中包括节点而不包括连线,{line:’1’,node:{title:’301’}}表示单元格中既包括节点又包括连线,{line:”,node:{}}表示单元格中不包括节点和连线。Optionally, if you need to add or delete a node in the flow chart, you only need to modify the content of the node in the array object corresponding to the node in the array object in the multidimensional array corresponding to the stored flow chart and the array object corresponding to the surrounding cells the line type. Wherein, if the above-mentioned cell does not include a node, the content information pointed to by the first attribute name of the array object used to store the content information in the above-mentioned cell is empty; if the above-mentioned cell does not include a connection line, it is used to store The content information pointed to by the second attribute name of the array object of the content information in the above cell is empty, for example, {line: '1', node: {title: '301'}} can be understood as an array object, and the array object The attribute name line is the line type, which is the second attribute name above, the attribute name node is the node, which is the first attribute name above, title: '301' is the specific content of the node, then {line: '1', node : {}} means that the cell includes lines but not nodes, {line: ", node: {title: '301'}} means that the cell includes nodes but no lines, {line: '1', node: {title: '301'}} indicates that the cell includes both nodes and lines, {line: ", node: {}} indicates that the cell does not include nodes and lines.
示例性的,根据图6所示的串并联图形的线类型采用多维数组对图5所示的划分单元格后的封闭图形中各个单元格的内容进行存储,该多维数组的维度与矩阵的行数量相同为7,其存储结果如下:Exemplarily, according to the line type of the series-parallel graph shown in Figure 6, a multidimensional array is used to store the contents of each cell in the closed graph after the cells are divided as shown in Figure 5, and the dimension of the multidimensional array is the same as the row The quantity is the same as 7, and the storage result is as follows:
[[
[[
{line:’1’,node:{title:’301’}},{line: '1', node: {title: '301'}},
{line:’2’,node:{title:’302’}},{line: '2', node: {title: '302'}},
{line:’2’,node:{title:’303’}},{line: '2', node: {title: '303'}},
{line:’1’,node:{title:’304’}},{line: '1', node: {title: '304'}},
{line:’2’,node:{title:’305’}},{line: '2', node: {title: '305'}},
{line:’1’,node:{title:’306’}},{line: '1', node: {title: '306'}},
{line:”,node:{title:’307’}}{line: ", node: {title: '307'}}
],],
[[
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{title:’308’}},{line: ", node: {title: '308'}},
{line:”,node:{}},{line: ", node: {}},
{line:’3’,node:{title:’309’}},{line: '3', node: {title: '309'}},
{line:”,node:{}},{line: ", node: {}},
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{}}{line: ", node: {}}
],],
[[
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{}},{line: ", node: {}},
{line:”,node:{}},{line: ", node: {}},
{line:’3’,node:{title:’310’}},{line: '3', node: {title: '310'}},
{line:”,node:{}},{line: ", node: {}},
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{}}{line: ", node: {}}
],],
[[
{line:’4’,node:{}},{line: '4', node: {}},
{line:’1’,node:{title:’311’}},{line: '1', node: {title: '311'}},
{line:’2’,node:{title:’312’}},{line: '2', node: {title: '312'}},
{line:’6’,node:{title:’313’}},{line: '6', node: {title: '313'}},
{line:”,node:{}},{line: ", node: {}},
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{}}{line: ", node: {}}
],],
[[
{line:’3’,node:{}},{line: '3', node: {}},
{line:’5’,node:{}},{line: '5', node: {}},
{line:’2’,node:{title:’314’}},{line: '2', node: {title: '314'}},
{line:’7’,node:{title:’315’}},{line: '7', node: {title: '315'}},
{line:”,node:{}},{line: ", node: {}},
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{}}{line: ", node: {}}
],],
[[
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{}},{line: ", node: {}},
{line:”,node:{}},{line: ", node: {}},
{line:”,node:{title:’316’}},{line: ", node: {title: '316'}},
{line:”,node:{}},{line: ", node: {}},
{line:’3’,node:{}},{line: '3', node: {}},
{line:”,node:{}}{line: ", node: {}}
],],
[[
{line:’5’,node:{}},{line: '5', node: {}},
{line:’8’,node:{title:’317’}},{line: '8', node: {title: '317'}},
{line:’9’,node:{}},{line: '9', node: {}},
{line:’9’,node:{}},{line: '9', node: {}},
{line:’9’,node:{}},{line: '9', node: {}},
{line:’10’,node:{}},{line: '10', node: {}},
{line:”,node:{}}{line: ", node: {}}
]]
]]
请参阅图2,图2为本申请实施例提供的一种构建封闭图形方法的流程示意图,该方法包括但不限于如下步骤:Please refer to Figure 2, Figure 2 is a schematic flow chart of a method for constructing a closed graph provided by the embodiment of the present application, the method includes but is not limited to the following steps:
S201,获取上述串并联图形中串联方向的最大值和并联方向的最大值;S201, obtaining the maximum value of the series direction and the maximum value of the parallel direction in the above series-parallel graph;
示例性的,请参阅图3,图3为本申请实施例提供的一个串并联图形的示例图。为方便理解,301~317表示该串并联图形的各个节点,各个节点的内容信息设为该节点的标号,如节点标号为301的节点的内容信息为301,该串并联图形的串联方向为图中框A1所框出的水平方向,该串并联图形的并联方向为图中框A2所框出的竖直方向,则该串并联图形串联方向的最大值为串联方向节点数量的最大值7,该串并联图形并联方向的最大值为并联方向节点数量的最大值7。For example, please refer to FIG. 3 , which is an example diagram of a series-parallel graph provided by the embodiment of the present application. For the convenience of understanding, 301-317 represent each node of the series-parallel graph, and the content information of each node is set as the label of the node. For example, the content information of the node whose node label is 301 is 301, and the serial direction of the series-parallel graph is as shown in Fig. The horizontal direction framed by the middle frame A1, the parallel direction of the series-parallel graph is the vertical direction framed by the frame A2 in the figure, then the maximum value of the serial direction of the serial-parallel graph is the maximum value of the number of nodes in the serial direction 7, The maximum value of the parallel direction of the series-parallel graph is 7, the maximum value of the number of nodes in the parallel direction.
S202,分别以上述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括上述串并联图形的矩阵,作为封闭图形。S202, taking the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle respectively, constructing a matrix including the series-parallel figure as a closed figure.
示例性的,根据步骤S201中图3所示的串并联图形的串联方向最大值和并联方向最大值,构建包括上述串并联图形的矩阵,矩阵的长和宽为7,请参见图4,图4为本申请实施例提供的一个根据串并联图形构建的封闭图形的示例图,其中,图4中A3为构建包括上述图3所示的串并联图形的矩阵作为的封闭图形。Exemplarily, according to the series direction maximum value and the parallel direction maximum value of the series-parallel connection figure shown in Figure 3 in step S201, construct the matrix that comprises above-mentioned series-parallel figure, the length and width of matrix are 7, please refer to Figure 4, Fig. 4 is an example diagram of a closed graph constructed according to the series-parallel graph provided by the embodiment of the present application, wherein A3 in FIG. 4 is a closed graph constructed as a matrix including the series-parallel graph shown in FIG. 3 above.
请参阅图6,图6为本申请实施例提供的一个串并联图形的线类型的示例图,根据图5所示的对封闭图形划分单元格的示例图,可以将其中的连线划分为图6所示的10种线类型,需要说明的是,图6所示的线类型仅为针对上述封闭图形为例示出的,在实际情况中连线的 线类型可以视情况而定,本申请实施例对此不作限定。如图6所示,为方便理解,设定每个线类型的标识为左上角的数字。可理解的,线类型1的连线为与图5中节点301、节点304和节点311相连的连线,线类型2的连线为与图5中节点302、节点303、节点305、节点306、节点312、节点314相连的连线,线类型3的连线为与图5中单元格503中连线相同的连线,线类型4的连线为与节点311相连的连线,线类型5的连线为与节点314相连的连线,线类型6的连线为与节点313相连的连线,线类型7的连线为与节点316相连的连线,线类型8的连线为与节点317相连的连线,线类型9的连线为与图5中单元格505中连线相同的连线,线类型10的连线为与图5中单元格506中连线相同的连线。Please refer to Figure 6, Figure 6 is an example diagram of the line type of a series-parallel graph provided by the embodiment of the present application. The 10 types of lines shown in Figure 6, it should be noted that the line types shown in Figure 6 are only for the above-mentioned closed figure as an example, in actual situations, the line types of the connecting lines can be determined according to the situation, and the implementation of this application Examples are not limited to this. As shown in Figure 6, for the convenience of understanding, the identification of each line type is set as the number in the upper left corner. It can be understood that the connection of line type 1 is the connection connected with node 301, node 304 and node 311 in FIG. , node 312, and node 314, the line of line type 3 is the same line as the line in cell 503 in Figure 5, the line of line type 4 is the line connected to node 311, line type The connection of line type 5 is the connection to node 314, the connection of line type 6 is the connection to node 313, the connection of line type 7 is the connection to node 316, and the connection of line type 8 is The connection connected to node 317, the connection of line type 9 is the same connection as the connection in cell 505 in Figure 5, and the connection of line type 10 is the same connection as the connection in cell 506 in Figure 5 Wire.
请参照图7,图7为本申请实施例提供的一种获取绘图结果的流程示意图,该方法包括但不限于如下步骤:Please refer to Fig. 7, Fig. 7 is a schematic flow chart of obtaining drawing results provided by the embodiment of the present application, the method includes but is not limited to the following steps:
S701,当检测到绘图指令时,依次遍历上述多维数组中的各个数组对象,根据上述各个数组对象中存储内容进行渲染绘图,获得上述各个数组对象对应的单元格中的绘图结果;S701. When a drawing instruction is detected, sequentially traverse each array object in the above-mentioned multi-dimensional array, perform rendering and drawing according to the storage content in each of the above-mentioned array objects, and obtain a drawing result in a cell corresponding to each of the above-mentioned array objects;
可选的,该绘图指令可以包括遍历多维数组的各个数组对象,该多维数组可以是存储在数据库内的多维数组,或者是对多维数组中的数组对象修改节点的节点内容或线类型标识后得到的多维数组,或者是新建一个多维数组并配置其中的节点内容和线类型标识后得到的多维数组。具体的,若上述数组对象中第一属性名的关联存储内容不为空,则将上述第一属性名的关联存储内容输入第一UI组件进行绘图渲染,获得第一绘图渲染结果,上述第一UI组件用于根据节点内容生成节点;若上述数组对象中第二属性名的关联存储内容不为空,则将上述第二属性名的关联存储内容输入第二UI组件进行绘图渲染,获得第二绘图渲染结果,上述第二UI组件用于根据线类型标识生成连线;根据上述第一绘图渲染结果和/或第二绘图渲染结果,获得上述数组对象对应的单元格中的绘图结果。Optionally, the drawing instruction may include traversing each array object of the multidimensional array, the multidimensional array may be a multidimensional array stored in the database, or the array object in the multidimensional array may be obtained by modifying the node content or line type identifier of the node , or the multidimensional array obtained after creating a new multidimensional array and configuring the node content and line type identification in it. Specifically, if the associated storage content of the first attribute name in the above-mentioned array object is not empty, then input the associated storage content of the above-mentioned first attribute name into the first UI component for drawing rendering, and obtain the first drawing rendering result, the above-mentioned first The UI component is used to generate nodes according to the node content; if the associated storage content of the second attribute name in the above-mentioned array object is not empty, then input the associated storage content of the above-mentioned second attribute name into the second UI component for drawing rendering, and obtain the second Drawing rendering result, the second UI component is used to generate a connection line according to the line type identifier; according to the first drawing rendering result and/or the second drawing rendering result, obtain the drawing result in the cell corresponding to the array object.
示例性的,依次遍历多维数组的各个数组对象后,得到的数组如下:Exemplarily, after traversing each array object of the multidimensional array in turn, the obtained array is as follows:
[[
[[
{line:’1’,node:{title:’901’}},{line: '1', node: {title: '901'}},
{line:”,node:{title:’902’}},{line: ", node: {title: '902'}},
{line:”,node:{}}{line: ", node: {}}
],],
[[
{line:’5’,node:{}},{line: '5', node: {}},
{line:’1’,node:{title:’903’}},{line: '1', node: {title: '903'}},
{line:”,node:{title:’904’}}{line: ", node: {title: '904'}}
],],
[[
{line:”,node:{}},{line: ", node: {}},
{line:’5’,node:{}},{line: '5', node: {}},
{line:”,node:{title:’905’}}{line: ", node: {title: '905'}}
]]
]]
根据遍历结果可知,该封闭图形的单元格为3行3列,依据数组对象的存储内容得到对应单元格内的节点信息和连线的线类型标识,获得每个数组对象对应的单元格中的绘图结果如图8所示。According to the traversal results, it can be seen that the cells of the closed graph are 3 rows and 3 columns. According to the storage content of the array object, the node information in the corresponding cell and the line type identifier of the connection line are obtained, and the cell corresponding to each array object is obtained. The drawing results are shown in Figure 8.
S702,将上述各个数组对象对应的单元格中的绘图结果按照顺序拼接,得到串并联图形。S702, splicing the drawing results in the cells corresponding to the above array objects in sequence to obtain a series-parallel graph.
示例性的,将上述图8中每个数组对象对应的单元格中的绘图结果按照顺序进行拼接,该顺序与该多维数组存储单元格信息时的顺序一致,请参见图9,图9为拼接图8所示的绘图结果得到串并联图形的示例图。Exemplarily, the drawing results in the cells corresponding to each array object in Figure 8 above are spliced in order, which is consistent with the order in which the multidimensional array stores cell information, please refer to Figure 9, Figure 9 is splicing The plotting results shown in Figure 8 are an example of series-parallel graphs.
请参见图10,为本申请实施例提供了一种信息存储装置的结构示意图。如图10所示, 该信息存储装置1000可以包括:Please refer to FIG. 10 , which provides a schematic structural diagram of an information storage device according to an embodiment of the present application. As shown in Figure 10, the information storage device 1000 may include:
第一获取单元1001,用于获取串并联图形,上述串并联图形包括多个节点以及上述多个节点之间的连线;The first acquiring unit 1001 is configured to acquire a series-parallel graph, where the serial-parallel graph includes multiple nodes and connections between the multiple nodes;
构建单元1002,用于构建包括上述串并联图形的封闭图形;A construction unit 1002, configured to construct a closed graph including the above series-parallel graph;
划分单元1003,用于按照目标划分规则,将上述封闭图形划分为多个单元格;A division unit 1003, configured to divide the above-mentioned closed figure into multiple cells according to the target division rule;
第二获取单元1004,用于获取上述多个单元格中每个单元格中的内容信息;The second obtaining unit 1004 is configured to obtain the content information in each cell of the plurality of cells;
存储单元1005,用于采用多维数组对象中的多个数组对象依次存储每个单元格中的内容信息。The storage unit 1005 is configured to use multiple array objects in the multi-dimensional array object to sequentially store the content information in each cell.
在一种可能的设计中,该装置还包括:In one possible design, the device also includes:
第三获取单元1006,用于获取上述串并联图形中串联方向的最大值和并联方向的最大值;The third acquiring unit 1006 is configured to acquire the maximum value in the series direction and the maximum value in the parallel direction in the series-parallel graph;
该构建单元1002,具体用于分别以上述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括上述串并联图形的矩形,作为封闭图形。The construction unit 1002 is specifically configured to use the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle, respectively, to construct a rectangle including the above-mentioned series-parallel figure as a closed figure.
在一种可能的设计中,该划分单元1003,具体用于:In a possible design, the dividing unit 1003 is specifically used for:
将上述封闭图形划分为m列,每列包括并联的至少一个节点;Dividing the closed graph above into m columns, each column including at least one node connected in parallel;
将上述封闭图形划分为n行,每行包括串联的至少一个节点;Dividing the above closed graph into n rows, each row including at least one node connected in series;
根据上述m列和上述n行,确定将上述封闭图形划分得到的m*n个单元格。According to the above m columns and the above n rows, m*n cells obtained by dividing the above closed graph are determined.
在一种可能的设计中,该第二获取单元1004,具体用于:In a possible design, the second acquiring unit 1004 is specifically configured to:
依次遍历上述多个单元格中的每个单元格,若上述单元格中包括节点,则获取上述节点的内容信息;Iterating through each of the above-mentioned plurality of cells in turn, if the above-mentioned cell includes a node, then obtaining the content information of the above-mentioned node;
若上述单元格中包括连线,则获取上述连线的线类型标识;若上述单元格中不包括节点且不包括连线,则上述单元格中的内容信息为空。If the above-mentioned cell includes a connection line, the line type identifier of the above-mentioned connection line is obtained; if the above-mentioned cell does not include a node and does not include a connection line, the content information in the above-mentioned cell is empty.
在一种可能的设计中,该装置还包括:In one possible design, the device also includes:
第四获取单元1010,用于获取多维数组中的多个数组对象,一个数组对象用于存储一个单元格中的内容信息,上述数组对象包括第一属性名和第二属性名;The fourth obtaining unit 1010 is used to obtain multiple array objects in the multidimensional array, one array object is used to store the content information in one cell, and the above-mentioned array object includes the first attribute name and the second attribute name;
该存储单元1005,具体用于:The storage unit 1005 is specifically used for:
若上述单元格中的内容信息为空,则将对应数组对象中上述第一属性名的关联存储内容设置为空,且将上述对应数组对象中上述第二属性名的关联存储内容设置为空;If the content information in the above-mentioned cell is empty, set the associated storage content of the above-mentioned first attribute name in the corresponding array object to empty, and set the associated storage content of the above-mentioned second attribute name in the above-mentioned corresponding array object to empty;
若上述单元格中的内容信息包括节点的内容信息,则将对应数组对象中上述第一属性名的关联存储内容设置为上述节点的内容信息;If the content information in the above-mentioned cell includes the content information of the node, then set the associated storage content of the above-mentioned first attribute name in the corresponding array object as the content information of the above-mentioned node;
若上述单元格中的内容信息包括连线类型标识,则将对应数组对象中上述第二属性名的关联存储内容设置为上述线类型标识。If the content information in the above cell includes the connection type identifier, then set the associated storage content of the above second attribute name in the corresponding array object as the above line type identifier.
在一种可能的设计中,该装置还包括:In one possible design, the device also includes:
遍历单元1007,用于当检测到绘图指令时,依次遍历上述多维数组中的各个数组对象;The traversal unit 1007 is configured to sequentially traverse each array object in the above-mentioned multidimensional array when a drawing instruction is detected;
绘图单元1008,用于根据上述各个数组对象中的存储内容进行渲染绘图,获得上述各个数组对象对应的单元格中的绘图结果;The drawing unit 1008 is configured to perform rendering and drawing according to the storage content in each of the above-mentioned array objects, and obtain the drawing results in the cells corresponding to the above-mentioned each of the array objects;
拼接单元1009,用于将上述各个数组对象对应的单元格中的绘图结果按照顺序拼接,得到上述串并联图形。The splicing unit 1009 is configured to splice the drawing results in the cells corresponding to the above-mentioned array objects in order to obtain the above-mentioned series-parallel graph.
在一种可能的设计中,该绘图单元1008具体用于:In a possible design, the drawing unit 1008 is specifically used for:
若上述数组对象中第一属性名的关联存储内容不为空,则将上述第一属性名的关联存储内容输入第一UI组件进行绘图渲染,获得第一绘图渲染结果,上述第一UI组件用于根据节点内容生成节点;If the associated storage content of the first attribute name in the above-mentioned array object is not empty, then input the associated storage content of the above-mentioned first attribute name into the first UI component for drawing rendering, and obtain the first drawing rendering result. The above-mentioned first UI component uses to generate nodes based on node content;
若上述数组对象中第二属性名的关联存储内容不为空,则将上述第二属性名的关联存储内容输入第二UI组件进行绘图渲染,获得第二绘图渲染结果,上述第二UI组件用于根据线类型标识生成连线;If the associated storage content of the second attribute name in the above-mentioned array object is not empty, then input the associated storage content of the above-mentioned second attribute name into the second UI component for drawing rendering, and obtain the second drawing rendering result. The above-mentioned second UI component uses Used to generate connection lines according to the line type identification;
根据上述第一绘图渲染结果和/或第二绘图渲染结果,获得上述数组对象对应的单元格中的绘图结果。According to the first drawing rendering result and/or the second drawing rendering result, the drawing result in the cell corresponding to the array object is obtained.
其中,图1000所示装置实施例的具体描述可以参照前述图1,图2或图7所示方法实施例的具体说明,在此不进行赘述。Wherein, for the specific description of the device embodiment shown in Figure 1000, reference may be made to the specific description of the method embodiment shown in Figure 1, Figure 2 or Figure 7, and details are not repeated here.
本申请实施例还提供了一种计算机存储介质,所述计算机存储介质可以存储有多条指令,所述指令适于由处理器加载并执行如上述图1,图2或图7所示实施例的方法步骤,具体执行过程可以参见图1,图2或图7所示实施例的具体说明,在此不进行赘述。所述计算机可读存储介质可以是非易失性,也可以是易失性。The embodiment of the present application also provides a computer storage medium, the computer storage medium can store a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor as in the above-mentioned embodiment shown in FIG. 1 , FIG. 2 or FIG. 7 For the specific execution process, refer to the specific description of the embodiment shown in FIG. 1 , FIG. 2 or FIG. 7 , and details are not repeated here. The computer-readable storage medium may be non-volatile or volatile.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The usable medium may be a magnetic medium (eg, floppy disk, hard disk, magnetic tape), an optical medium (eg, DVD), or a semiconductor medium (eg, a solid-state hard disk), and the like.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are realized. The processes can be completed by computer programs to instruct related hardware. The programs can be stored in computer-readable storage media. When the programs are executed , may include the processes of the foregoing method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.

Claims (20)

  1. 一种信息存储方法,其中,包括:An information storage method, comprising:
    获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;Obtaining a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
    构建包括所述串并联图形的封闭图形;Constructing a closed graph comprising the series-parallel graph;
    按照目标划分规则,将所述封闭图形划分为多个单元格;Divide the closed figure into a plurality of cells according to the target division rule;
    获取所述多个单元格中每个单元格中的内容信息,并采用多维数组中的多个数组对象依次存储每个单元格中的内容信息。The content information in each cell of the plurality of cells is obtained, and the content information in each cell is sequentially stored by using multiple array objects in the multidimensional array.
  2. 如权利要求1所述的方法,其中,所述构建包括所述串并联图形的封闭图形,包括:The method of claim 1, wherein said constructing a closed graph comprising said series-parallel graph comprises:
    获取所述串并联图形中串联方向的最大值和并联方向的最大值;Obtaining the maximum value of the series direction and the maximum value of the parallel direction in the series-parallel graph;
    分别以所述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括所述串并联图形的矩形,作为封闭图形。Taking the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle respectively, construct a rectangle including the series-parallel figure as a closed figure.
  3. 如权利要求2所述的方法,其中,所述按照目标划分规则,将所述封闭图形划分为多个单元格,包括:The method according to claim 2, wherein said dividing the closed figure into a plurality of cells according to the target division rule comprises:
    将所述封闭图形划分为m列,每列包括并联的至少一个节点;dividing the closed graph into m columns, each column including at least one node connected in parallel;
    将所述封闭图形划分为n行,每行包括串联的至少一个节点;dividing the closed graph into n rows, each row including at least one node connected in series;
    根据所述m列和所述n行,确定将所述封闭图形划分得到的m*n个单元格。According to the m columns and the n rows, m*n cells obtained by dividing the closed graph are determined.
  4. 如权利要求3所述的方法,其中,所述获取所述多个单元格中每个单元格中的内容信息,包括:The method according to claim 3, wherein said acquiring the content information in each cell of said plurality of cells comprises:
    依次遍历所述多个单元格中的每个单元格,若所述单元格中包括节点,则获取所述节点的内容信息;若所述单元格中包括连线,则获取所述连线的线类型标识;若所述单元格中不包括节点且不包括连线,则所述单元格中的内容信息为空。Iterating through each cell in the plurality of cells in turn, if the cell includes a node, then obtain the content information of the node; if the cell includes a connection, obtain the content information of the connection Line type identifier; if the cell does not include nodes and lines, the content information in the cell is empty.
  5. 如权利要求4所述的方法,其中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息,包括:The method according to claim 4, wherein said adopting multiple array objects in the multidimensional array to sequentially store the content information in each cell comprises:
    获取多维数组中的多个数组对象,一个数组对象用于存储一个单元格中的内容信息,所述数组对象包括第一属性名和第二属性名;Obtain multiple array objects in the multidimensional array, one array object is used to store content information in a cell, and the array object includes a first attribute name and a second attribute name;
    依次获取所述多个单元格中每个单元格中的内容信息;Obtaining the content information in each of the plurality of cells in sequence;
    若所述单元格中的内容信息为空,则将对应数组对象中所述第一属性名的关联存储内容设置为空,且将所述对应数组对象中所述第二属性名的关联存储内容设置为空;If the content information in the cell is empty, set the associated storage content of the first attribute name in the corresponding array object to empty, and set the associated storage content of the second attribute name in the corresponding array object set to null;
    若所述单元格中的内容信息包括节点的内容信息,则将对应数组对象中所述第一属性名的关联存储内容设置为所述节点的内容信息;If the content information in the cell includes the content information of the node, then set the associated storage content of the first attribute name in the corresponding array object as the content information of the node;
    若所述单元格中的内容信息包括连线类型标识,则将对应数组对象中所述第二属性名的关联存储内容设置为所述线类型标识。If the content information in the cell includes the line type identifier, set the associated storage content of the second attribute name in the corresponding array object as the line type identifier.
  6. 如权利要求4所述的方法,其中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息之后,还包括:The method according to claim 4, wherein, after storing the content information in each cell sequentially by using a plurality of array objects in the multidimensional array, further comprising:
    当检测到绘图指令时,依次遍历所述多维数组中的各个数组对象,根据所述各个数组对象中的存储内容进行渲染绘图,获得所述各个数组对象对应的单元格中的绘图结果;When a drawing instruction is detected, traverse each array object in the multidimensional array in turn, perform rendering and drawing according to the storage content in each array object, and obtain a drawing result in a cell corresponding to each array object;
    将所述各个数组对象对应的单元格中的绘图结果按照顺序拼接,得到所述串并联图形。The drawing results in the cells corresponding to the array objects are spliced in order to obtain the series-parallel graph.
  7. 如权利要求6所述的方法,其中,所述根据所述各个数组对象中的存储内容进行渲染绘图,获得所述各个数组对象对应的单元格中的绘图结果,包括:The method according to claim 6, wherein said rendering and drawing according to the storage content in each array object, and obtaining the drawing result in the cell corresponding to each array object comprises:
    若所述数组对象中第一属性名的关联存储内容不为空,则将所述第一属性名指向的存储内容输入第一UI组件进行绘图渲染,获得第一绘图渲染结果,所述第一UI组件用于根据节点内容生成节点;If the storage content associated with the first attribute name in the array object is not empty, then input the storage content pointed to by the first attribute name into the first UI component for drawing rendering, and obtain the first drawing rendering result, the first UI components are used to generate nodes according to node content;
    若所述数组对象中第二属性名的关联存储内容不为空,则将所述第二属性名指向的存储内容输入第二UI组件进行绘图渲染,获得第二绘图渲染结果,所述第二UI组件用于根据线类型标识生成连线;If the storage content associated with the second attribute name in the array object is not empty, input the storage content pointed to by the second attribute name into the second UI component for drawing rendering, and obtain a second drawing rendering result, the second The UI component is used to generate connection lines according to the line type identification;
    根据所述第一绘图渲染结果和/或第二绘图渲染结果,获得所述数组对象对应的单元格中的绘图结果。According to the first drawing rendering result and/or the second drawing rendering result, the drawing result in the cell corresponding to the array object is obtained.
  8. 一种信息存储的装置,其中,包括:An information storage device, including:
    第一获取单元,用于获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;a first acquiring unit, configured to acquire a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
    构建单元,用于构建包括所述串并联图形的封闭图形;A construction unit for constructing a closed graph including the series-parallel graph;
    划分单元,用于按照目标划分规则,将所述封闭图形划分为多个单元格;A division unit, configured to divide the closed figure into a plurality of cells according to the target division rule;
    第二获取单元,用于获取所述多个单元格中每个单元格中的内容信息;a second acquiring unit, configured to acquire content information in each of the plurality of cells;
    存储单元,用于采用多维数组对象中的多个数组对象依次存储每个单元格中的内容信息。The storage unit is used to sequentially store the content information in each cell by adopting multiple array objects in the multidimensional array object.
  9. 一种信息存储的装置,其中,包括处理器、存储器以及通信接口,所述处理器、存储器和通信接口相互连接,其中,所述通信接口用于接收和发送数据,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,执行如以下步骤的指令:An information storage device, which includes a processor, a memory, and a communication interface, and the processor, memory, and communication interface are connected to each other, wherein the communication interface is used to receive and send data, and the memory is used to store programs Code, the processor is used to call the program code to execute instructions as follows:
    获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;Obtaining a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
    构建包括所述串并联图形的封闭图形;Constructing a closed graph comprising the series-parallel graph;
    按照目标划分规则,将所述封闭图形划分为多个单元格;Divide the closed figure into a plurality of cells according to the target division rule;
    获取所述多个单元格中每个单元格中的内容信息,并采用多维数组中的多个数组对象依次存储每个单元格中的内容信息。The content information in each cell of the plurality of cells is obtained, and the content information in each cell is sequentially stored by using multiple array objects in the multidimensional array.
  10. 如权利要求9所述的装置,其中,所述构建包括所述串并联图形的封闭图形,包括:The apparatus of claim 9, wherein said constructing a closed graph comprising said series-parallel graph comprises:
    获取所述串并联图形中串联方向的最大值和并联方向的最大值;Obtaining the maximum value of the series direction and the maximum value of the parallel direction in the series-parallel graph;
    分别以所述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括所述串并联图形的矩形,作为封闭图形。Taking the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle respectively, construct a rectangle including the series-parallel figure as a closed figure.
  11. 如权利要求10所述的装置,其中,所述按照目标划分规则,将所述封闭图形划分为多个单元格,包括:The device according to claim 10, wherein said dividing the closed figure into a plurality of cells according to the target division rule comprises:
    将所述封闭图形划分为m列,每列包括并联的至少一个节点;dividing the closed graph into m columns, each column including at least one node connected in parallel;
    将所述封闭图形划分为n行,每行包括串联的至少一个节点;dividing the closed graph into n rows, each row including at least one node connected in series;
    根据所述m列和所述n行,确定将所述封闭图形划分得到的m*n个单元格。According to the m columns and the n rows, m*n cells obtained by dividing the closed graph are determined.
  12. 如权利要求11所述的装置,其中,所述获取所述多个单元格中每个单元格中的内容信息,包括:The device according to claim 11, wherein said acquiring the content information in each of said plurality of cells comprises:
    依次遍历所述多个单元格中的每个单元格,若所述单元格中包括节点,则获取所述节点的内容信息;若所述单元格中包括连线,则获取所述连线的线类型标识;若所述单元格中不包括节点且不包括连线,则所述单元格中的内容信息为空。Iterating through each cell in the plurality of cells in turn, if the cell includes a node, then obtain the content information of the node; if the cell includes a connection, obtain the content information of the connection Line type identifier; if the cell does not include nodes and lines, the content information in the cell is empty.
  13. 如权利要求12所述的装置,其中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息,包括:The device according to claim 12, wherein said adopting multiple array objects in the multidimensional array to sequentially store the content information in each cell comprises:
    获取多维数组中的多个数组对象,一个数组对象用于存储一个单元格中的内容信息,所述数组对象包括第一属性名和第二属性名;Obtain multiple array objects in the multidimensional array, one array object is used to store content information in a cell, and the array object includes a first attribute name and a second attribute name;
    依次获取所述多个单元格中每个单元格中的内容信息;Obtaining the content information in each of the plurality of cells in sequence;
    若所述单元格中的内容信息为空,则将对应数组对象中所述第一属性名的关联存储内容设置为空,且将所述对应数组对象中所述第二属性名的关联存储内容设置为空;If the content information in the cell is empty, set the associated storage content of the first attribute name in the corresponding array object to empty, and set the associated storage content of the second attribute name in the corresponding array object set to null;
    若所述单元格中的内容信息包括节点的内容信息,则将对应数组对象中所述第一属性名的关联存储内容设置为所述节点的内容信息;If the content information in the cell includes the content information of the node, then set the associated storage content of the first attribute name in the corresponding array object as the content information of the node;
    若所述单元格中的内容信息包括连线类型标识,则将对应数组对象中所述第二属性名的关联存储内容设置为所述线类型标识。If the content information in the cell includes the line type identifier, set the associated storage content of the second attribute name in the corresponding array object as the line type identifier.
  14. 如权利要求12所述的装置,其中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息之后,还包括:The device according to claim 12, wherein, after storing the content information in each cell in sequence using multiple array objects in the multidimensional array, further comprising:
    当检测到绘图指令时,依次遍历所述多维数组中的各个数组对象,根据所述各个数组对象中的存储内容进行渲染绘图,获得所述各个数组对象对应的单元格中的绘图结果;When a drawing instruction is detected, traverse each array object in the multidimensional array in turn, perform rendering and drawing according to the storage content in each array object, and obtain a drawing result in a cell corresponding to each array object;
    将所述各个数组对象对应的单元格中的绘图结果按照顺序拼接,得到所述串并联图形。The drawing results in the cells corresponding to the array objects are spliced in order to obtain the series-parallel graph.
  15. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机程序;当所述计算机程序在一个或多个处理器上运行时,执行如以下步骤的指令:A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium; when the computer program runs on one or more processors, instructions such as the following steps are executed:
    获取串并联图形,所述串并联图形包括多个节点以及所述多个节点之间的连线;Obtaining a series-parallel graph, where the serial-parallel graph includes a plurality of nodes and connections between the plurality of nodes;
    构建包括所述串并联图形的封闭图形;Constructing a closed graph comprising the series-parallel graph;
    按照目标划分规则,将所述封闭图形划分为多个单元格;Divide the closed figure into a plurality of cells according to the target division rule;
    获取所述多个单元格中每个单元格中的内容信息,并采用多维数组中的多个数组对象依次存储每个单元格中的内容信息。The content information in each cell of the plurality of cells is obtained, and the content information in each cell is sequentially stored by using multiple array objects in the multidimensional array.
  16. 如权利要求1所述的计算机可读存储介质,其中,所述构建包括所述串并联图形的封闭图形,包括:The computer-readable storage medium of claim 1, wherein said constructing a closed graph comprising said series-parallel graph comprises:
    获取所述串并联图形中串联方向的最大值和并联方向的最大值;Obtaining the maximum value of the series direction and the maximum value of the parallel direction in the series-parallel graph;
    分别以所述串联方向的最大值和并联方向的最大值为矩形的长和宽,构建包括所述串并联图形的矩形,作为封闭图形。Taking the maximum value in the series direction and the maximum value in the parallel direction as the length and width of the rectangle respectively, construct a rectangle including the series-parallel figure as a closed figure.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述按照目标划分规则,将所述封闭图形划分为多个单元格,包括:The computer-readable storage medium according to claim 16, wherein said dividing the closed figure into multiple cells according to the target division rule comprises:
    将所述封闭图形划分为m列,每列包括并联的至少一个节点;dividing the closed graph into m columns, each column including at least one node connected in parallel;
    将所述封闭图形划分为n行,每行包括串联的至少一个节点;dividing the closed graph into n rows, each row including at least one node connected in series;
    根据所述m列和所述n行,确定将所述封闭图形划分得到的m*n个单元格。According to the m columns and the n rows, m*n cells obtained by dividing the closed graph are determined.
  18. 如权利要求17所述的计算机可读存储介质,其中,所述获取所述多个单元格中每个单元格中的内容信息,包括:The computer-readable storage medium according to claim 17, wherein said acquiring the content information in each cell of said plurality of cells comprises:
    依次遍历所述多个单元格中的每个单元格,若所述单元格中包括节点,则获取所述节点的内容信息;若所述单元格中包括连线,则获取所述连线的线类型标识;若所述单元格中不包括节点且不包括连线,则所述单元格中的内容信息为空。Iterating through each cell in the plurality of cells in turn, if the cell includes a node, then obtain the content information of the node; if the cell includes a connection, obtain the content information of the connection Line type identifier; if the cell does not include nodes and lines, the content information in the cell is empty.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息,包括:The computer-readable storage medium according to claim 18, wherein said storing the content information in each cell sequentially by using a plurality of array objects in the multidimensional array comprises:
    获取多维数组中的多个数组对象,一个数组对象用于存储一个单元格中的内容信息,所述数组对象包括第一属性名和第二属性名;Obtain multiple array objects in the multidimensional array, one array object is used to store content information in a cell, and the array object includes a first attribute name and a second attribute name;
    依次获取所述多个单元格中每个单元格中的内容信息;Obtaining the content information in each of the plurality of cells in sequence;
    若所述单元格中的内容信息为空,则将对应数组对象中所述第一属性名的关联存储内容设置为空,且将所述对应数组对象中所述第二属性名的关联存储内容设置为空;If the content information in the cell is empty, set the associated storage content of the first attribute name in the corresponding array object to empty, and set the associated storage content of the second attribute name in the corresponding array object set to null;
    若所述单元格中的内容信息包括节点的内容信息,则将对应数组对象中所述第一属性名的关联存储内容设置为所述节点的内容信息;If the content information in the cell includes the content information of the node, then set the associated storage content of the first attribute name in the corresponding array object as the content information of the node;
    若所述单元格中的内容信息包括连线类型标识,则将对应数组对象中所述第二属性名的关联存储内容设置为所述线类型标识。If the content information in the cell includes the line type identifier, set the associated storage content of the second attribute name in the corresponding array object as the line type identifier.
  20. 如权利要求18所述的计算机可读存储介质,其中,所述采用多维数组中的多个数组对象依次存储每个单元格中的内容信息之后,还包括:The computer-readable storage medium according to claim 18, wherein, after storing the content information in each cell in sequence using multiple array objects in the multidimensional array, further comprising:
    当检测到绘图指令时,依次遍历所述多维数组中的各个数组对象,根据所述各个数组对象中的存储内容进行渲染绘图,获得所述各个数组对象对应的单元格中的绘图结果;When a drawing instruction is detected, traverse each array object in the multidimensional array in turn, perform rendering and drawing according to the storage content in each array object, and obtain a drawing result in a cell corresponding to each array object;
    将所述各个数组对象对应的单元格中的绘图结果按照顺序拼接,得到所述串并联图形。The drawing results in the cells corresponding to the array objects are spliced in order to obtain the series-parallel graph.
PCT/CN2022/090259 2021-10-30 2022-04-29 Information storage method and apparatus, and storage medium WO2023071124A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111278009.5 2021-10-30
CN202111278009.5A CN113971232A (en) 2021-10-30 2021-10-30 Information storage method, device and storage medium

Publications (1)

Publication Number Publication Date
WO2023071124A1 true WO2023071124A1 (en) 2023-05-04

Family

ID=79589285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/090259 WO2023071124A1 (en) 2021-10-30 2022-04-29 Information storage method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN113971232A (en)
WO (1) WO2023071124A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113971232A (en) * 2021-10-30 2022-01-25 平安科技(深圳)有限公司 Information storage method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467378A (en) * 2010-11-11 2012-05-23 深圳市金蝶友商电子商务服务有限公司 HTML (Hypertext Markup Language) form processing method based on two-dimensional matrix and computer
CN109101688A (en) * 2018-07-06 2018-12-28 烽火通信科技股份有限公司 A kind of method of template type customization duct section sectional view
CN111737196A (en) * 2020-06-22 2020-10-02 国能日新科技股份有限公司 Meteorological resource grid text to vector diagram conversion method and device based on electric power transaction system
US20210224235A1 (en) * 2020-01-21 2021-07-22 Oracle International Corporation Parallel and efficient technique for building and maintaining a main memory csr based graph index in a rdbms
CN113971232A (en) * 2021-10-30 2022-01-25 平安科技(深圳)有限公司 Information storage method, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102467378A (en) * 2010-11-11 2012-05-23 深圳市金蝶友商电子商务服务有限公司 HTML (Hypertext Markup Language) form processing method based on two-dimensional matrix and computer
CN109101688A (en) * 2018-07-06 2018-12-28 烽火通信科技股份有限公司 A kind of method of template type customization duct section sectional view
US20210224235A1 (en) * 2020-01-21 2021-07-22 Oracle International Corporation Parallel and efficient technique for building and maintaining a main memory csr based graph index in a rdbms
CN111737196A (en) * 2020-06-22 2020-10-02 国能日新科技股份有限公司 Meteorological resource grid text to vector diagram conversion method and device based on electric power transaction system
CN113971232A (en) * 2021-10-30 2022-01-25 平安科技(深圳)有限公司 Information storage method, device and storage medium

Also Published As

Publication number Publication date
CN113971232A (en) 2022-01-25

Similar Documents

Publication Publication Date Title
US9740744B2 (en) Systems and methods for visualizing and manipulating graph databases
US20090125872A1 (en) Extracting Ontological Information from Software Design Data
US11416473B2 (en) Using path encoding method and relational set operations for search and comparison of hierarchial structures
US8190633B2 (en) Enabling provenance management for pre-existing applications
CN111324577B (en) Yml file reading and writing method and device
US10650559B2 (en) Methods and systems for simplified graphical depictions of bipartite graphs
CN108845942B (en) Product feature management method, device, system and storage medium
CN104685467A (en) Graphically representing programming attributes
US11681867B2 (en) System and method for reactive computing
US8145667B2 (en) Schemaless XML payload generation
WO2023071124A1 (en) Information storage method and apparatus, and storage medium
US20180095719A1 (en) Sorted linked list with a midpoint binary tree
JP2018005933A (en) Method and apparatus for managing system specification
Ledur et al. Towards a domain-specific language for geospatial data visualization maps with big data sets
CN106250110A (en) Set up the method and device of model
CN111475511A (en) Data storage method, data access method, data storage device, data access device and data access equipment based on tree structure
Ma et al. DTL-RnB: Algorithms and tools for summarizing the space of DTL reconciliations
US20160154860A1 (en) Recursive Filter Algorithms on Hierarchical Data Models Described for the Use by the Attribute Value Derivation
Papadopoulos et al. Drawing graphs using modular decomposition
Sainudiin et al. The transmission process: A combinatorial stochastic process for the evolution of transmission trees over networks
CN111767223B (en) File processing method and device, electronic equipment and storage medium
Litovkin et al. ORM Diagram as an Intermediate Model for OWL Ontology Engineering: Protégé ORM Plugin Implementation
Sultana et al. Querying KEGG pathways in logic
US20240160614A1 (en) Method for fast and efficient computing of tree form-factors
CN118297148B (en) Cross-angle correlation processing method and system for architecture design model

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22885038

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE