CN111610908B - Method for generating frame diagram, computer equipment and readable storage medium - Google Patents

Method for generating frame diagram, computer equipment and readable storage medium Download PDF

Info

Publication number
CN111610908B
CN111610908B CN201910136925.1A CN201910136925A CN111610908B CN 111610908 B CN111610908 B CN 111610908B CN 201910136925 A CN201910136925 A CN 201910136925A CN 111610908 B CN111610908 B CN 111610908B
Authority
CN
China
Prior art keywords
node
text file
frame
association
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910136925.1A
Other languages
Chinese (zh)
Other versions
CN111610908A (en
Inventor
鲁昂
曲涛
谭晓栋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN201910136925.1A priority Critical patent/CN111610908B/en
Publication of CN111610908A publication Critical patent/CN111610908A/en
Application granted granted Critical
Publication of CN111610908B publication Critical patent/CN111610908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • 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

Abstract

The invention discloses a method for generating a frame diagram, computer equipment and a readable storage medium, wherein the method comprises the following steps: acquiring a first text file for describing a distributed system; determining each node in the distributed system according to the first text file, and determining the association relation among the nodes; and respectively drawing wire frames corresponding to the nodes in a display interface, and drawing connecting wires representing the association relationship among the wire frames in the display interface so as to generate a first frame diagram corresponding to the first text file. The invention can automatically draw the frame diagram of the distributed system and can carry out version maintenance and version difference comparison.

Description

Method for generating frame diagram, computer equipment and readable storage medium
Technical Field
The invention relates to the technical field of distributed systems, in particular to a method for generating a frame graph, computer equipment and a readable storage medium.
Background
With the continuous development of internet technology, in order to bear massive users, a distributed solution scheme is mostly adopted for system construction; the distributed system is a collection of independent computers, and has high cohesiveness and transparency. For a better understanding and design of distributed systems, system developers typically draw a framework diagram that reflects the distributed system. In the prior art, a system developer usually uses a drawing board tool to manually draw a frame diagram of a distributed system, which is inefficient. In addition, the drawn frame map is usually stored in a JPG (Joint Photographic Experts Group) or PNG (Portable Network Graphics) format, and the frame map in the JPG or PNG format cannot be modified; therefore, when the distributed system is continuously evolved and updated, the corresponding frame diagram needs to be repeatedly drawn, and the maintenance cost of the frame diagram of the distributed system is increased.
Disclosure of Invention
The invention aims to provide a method for generating a frame map, a computer device and a readable storage medium, which can automatically draw the frame map of a distributed system and can carry out version maintenance and version difference comparison.
According to an aspect of the present invention, there is provided a method of generating a skeleton map, the method comprising the steps of:
acquiring a first text file for describing a distributed system;
determining each node in the distributed system according to the first text file, and determining the association relation among the nodes;
and respectively drawing wire frames corresponding to the nodes in a display interface, and drawing connecting wires representing the association relationship among the wire frames in the display interface so as to generate a first frame diagram corresponding to the first text file.
Optionally, the first text file includes: a description portion and an association portion;
the description part includes: describing part identification and describing information corresponding to each node respectively; wherein the description information of each node includes: node name, node ID and node attribute;
the association section includes: an association part identifier and a plurality of node association information; wherein each node association information comprises: the ID of the father node, the ID of the child node and the incidence relation between the node corresponding to the father node ID and the node corresponding to the child node ID.
Optionally, the determining, according to the first text file, each node in the distributed system specifically includes:
creating a linked list data structure; wherein the linked list data structure comprises: a plurality of nodes;
traversing the first text file, and acquiring each piece of description information positioned behind the description part identifier when the description part identifier is identified;
and aiming at one piece of description information, adding the node name, the node ID and the node attribute in the description information into one node in the linked list data structure.
Optionally, the determining, according to the first text file, an association relationship between the nodes specifically includes:
creating a graph data structure; wherein the graph data structure comprises: a vertex set and an edge set;
traversing the first text file, and acquiring the association information of each node behind the association part identifier when the association part identifier is identified;
and aiming at one node association information, adding a father node ID and a child node ID in the node association information into the vertex set, and adding an association relation in the node association information into the edge set.
Optionally, the drawing, in the display interface, wire frames corresponding to the nodes respectively includes:
drawing wire frames corresponding to parent node IDs and child node IDs in the vertex set respectively in the display interface according to the vertex set in the graph data structure;
after the wire frame is drawn, searching a node containing the father node ID or the child node ID from the linked list data structure according to the father node ID or the child node ID corresponding to the wire frame, and adding the node attribute in the node into the wire frame.
Optionally, the drawing a connection line representing the association relationship between the wire frames in the display interface specifically includes:
and drawing connecting lines corresponding to the association relations in the edge set among the wire frames in the display interface according to the edge set in the graph data structure.
Optionally, the method further includes:
receiving an updating instruction;
according to the updating instruction, adding description information of a new node in the description part of the first text file, and/or deleting the description information of a corresponding node from the description part of the first text file;
adding new node association information to the association part of the first text file according to the updating instruction, and/or deleting corresponding node association information from the association part of the first text file to form a second text file;
and generating a second frame image corresponding to the second text file.
Optionally, the method further includes:
when a comparison instruction is received, displaying the first frame image and the second frame image in the display interface;
determining a first wire frame which is contained in the first frame diagram and is not contained in the second frame diagram, and marking the first wire frame in the display interface according to a first preset marking mode;
and determining a second wire frame which is not contained in the first frame diagram and is contained in the second frame diagram, and marking the second wire frame in the display interface according to a second preset marking mode.
Optionally, the determining a first wire frame that is included in the first frame diagram and not included in the second frame diagram specifically includes:
determining first text content which is contained in the first text file and not contained in the second text file according to the text content of the first text file and the text content of the second text file;
a first wire frame corresponding to the first text content is determined in the first frame map.
Optionally, the determining a second wire frame that is not included in the first frame diagram and is included in the second frame diagram specifically includes:
determining second text content which is not contained in the first text file and is contained in the second text file according to the text content of the first text file and the text content of the second text file;
and determining a second wire frame corresponding to the second text content in the second frame diagram.
In order to achieve the above object, the present invention further provides a computer device, which specifically includes: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above-described method for generating a frame map when executing the computer program.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, realizes the above-mentioned steps of the method for generating a frame map.
According to the method for generating the frame diagram, the computer equipment and the readable storage medium, the text content for reflecting the distributed system is written through the markup language, and in the running environment, the image rendering is carried out according to the written text content so as to display the frame diagram for reflecting the distributed system in the display interface. Compared with the prior art, the method and the device do not need to manually draw the frame diagram, and can improve the working efficiency. In addition, in the invention, when the version of the distributed system is updated, the text content of the new version can be formed according to the text content of the old version, so that the frame diagram of the new version can be obtained. The difference between the new version and the old version can be determined by acquiring the text content of the new version and the old version, and the difference between the new version and the old version can be compared more intuitively by marking in the new version of the frame diagram, so that the version management of the frame diagram of the distributed system is realized.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic flow chart of an alternative method for generating a frame map according to an embodiment;
FIG. 2 is a diagram illustrating a first frame corresponding to a first text file according to the first embodiment;
FIG. 3 is a diagram illustrating a second frame corresponding to a second text file according to the first embodiment;
FIG. 4 is a schematic diagram of an alternative program module of the apparatus for generating a frame map according to the second embodiment;
fig. 5 is a schematic diagram of an alternative hardware architecture of the computer device according to the third embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
The method for generating the frame diagram provided by the invention is explained with reference to the accompanying drawings.
Fig. 1 is an optional schematic flow chart of the method for generating a frame diagram of the present invention, as shown in fig. 1, the method specifically includes the following steps:
step S101: a first text file describing a distributed system is obtained.
The first text file is written by designers of the distributed system by using a markup language; each designed distributed system is provided with one or more corresponding text files; a distributed system's text file may reflect the nodes contained in the distributed system and the associations between the nodes in the distributed system.
It should be noted that the node in this embodiment is a computer software unit constituting the distributed system, and the association relationship in this embodiment is used to explain how each computer software unit in the distributed system works cooperatively.
Specifically, the text file includes: (1) description section and (2) association section.
(1) The description part includes: describing part identification and describing information corresponding to each node in the distributed system respectively; the description part identification is used for representing the text content after the description part identification as the description information of each node, and the description information of each node comprises: node name, node ID, and node attributes.
Preferably, the description section identifies: < metadata >;
the text format of the description information of a node is:
node name { ID: node ID value, node attribute name 1: node attribute value 1, node attribute name 2: node attribute value 2, … … }.
It should be noted that the node name is used to indicate the name of the corresponding computer software unit; including node ID and node attributes in parenthesis behind the node name; the node ID consists of a node ID identification and a node ID value, and is separated by a half-corner colon; separated by a half-angle comma between the node ID and the node attribute; one or more node attributes can be contained in one description information, and each node attribute is separated by a half-angle comma; a node attribute is composed of a node attribute name and a node attribute value, and is separated by a half corner colon. In addition, each computer software unit in a distributed system has a corresponding node ID value, and the node ID values of any two computer software units are inconsistent; the node attribute names may be domain name (domain), number (size), algorithm (algorithm), alias (name).
(2) The association section includes: an association part identifier and a plurality of node association information; the association part identifier is used for indicating that the text content after the association part identifier is the association information of each node, and each node association information comprises: the ID of the father node, the ID of the child node and the incidence relation between the node corresponding to the father node ID and the node corresponding to the child node ID.
Preferably, the association portion is identified as: < relationship >;
the text format of the description information of a node is: parent ID. associates (child ID).
It should be noted that a node in the distributed system may be only a parent node of another node, may also be only a child node of another node, and may also be a parent node of another node and a child node of another node; the parent node ID and the incidence relation are separated by a half-angle period, and the child node ID is positioned in a small bracket behind the incidence relation; the ID values of the parent node ID and the child node ID are inconsistent; the father node ID is a node ID value in the description information, and the child node ID is another node ID value in the description information; the association relationship may be a reverse proxy relationship (reverse proxy) or a dependency relationship (dependencies on).
Step S102: and determining each node in the distributed system and determining the association relation among the nodes according to the first text file.
Specifically, the determining each node in the distributed system according to the first text file specifically includes:
creating a linked list data structure; wherein the linked list data structure comprises: a plurality of nodes;
traversing the first text file, and acquiring each piece of description information positioned behind the description part identifier when the description part identifier is identified;
and aiming at one piece of description information, adding the node name, the node ID and the node attribute in the description information into one node in the linked list data structure.
Preferably, in this embodiment, the node attribute in the description information is converted into a MAP data structure, the node name, the node ID, and the node attribute of the MAP data structure are stored as a ternary data structure according to a { node ID, the node name, and the node attribute of the MAP data structure } format, and the ternary data structure is added to one node in the linked list data structure.
Further, the determining an association relationship between the nodes according to the first text file specifically includes:
creating a graph data structure; wherein the graph data structure comprises: a vertex set and an edge set;
traversing the first text file, and acquiring the association information of each node behind the association part identifier when the association part identifier is identified;
and aiming at one node association information, adding a father node ID and a child node ID in the node association information into the vertex set, and adding an association relation in the node association information into the edge set.
It should be noted that, since the child node ID in one node related information may be the parent node ID in another node related information, when the parent node ID and the child node ID in one node related information are stored in the vertex set, it is determined whether the parent node ID or the child node ID exists in the vertex set, and if so, the storage is not repeated. Therefore, the same two node IDs are not stored repeatedly in the vertex set.
Step S103: and respectively drawing wire frames corresponding to the nodes in a display interface, and drawing connecting wires representing the association relationship among the wire frames in the display interface so as to generate a first frame diagram corresponding to the first text file.
The display interface is used for drawing a frame diagram of the distributed system; the wire frame may be a rectangular-shaped wire frame or a circular-shaped wire frame.
Specifically, the drawing, in the display interface, wire frames corresponding to the nodes respectively includes:
drawing wire frames corresponding to parent node IDs and child node IDs in the vertex set respectively in the display interface according to the vertex set in the graph data structure;
after the wire frame is drawn, searching a node containing the father node ID or the child node ID from the linked list data structure according to the father node ID or the child node ID corresponding to the wire frame, and adding the node attribute in the node into the wire frame.
Preferably, the adding the node attribute in the node to the wire frame specifically includes:
judging whether the node attribute with the node attribute name of 'alias' is included in the node; if yes, adding the node attribute value of the node attribute and the node attribute values of other node attributes into the wire frame; and if not, adding the node names in the nodes and the node attribute values of the node attributes into the wire frame.
Further, the drawing of the connecting line representing the association relationship between the wire frames in the display interface specifically includes:
and drawing connecting lines corresponding to the association relations in the edge set among the wire frames in the display interface according to the edge set in the graph data structure.
Preferably, in this embodiment, different types of connection lines are used to represent different types of association relationships; however, the connection lines in this embodiment all have directionality, and the connection lines all point to the wire frames corresponding to the child node IDs from the wire frames corresponding to the parent node IDs.
In practical application, the terminal executing steps S101 to S103 converts the description part of the text file into a linked list data structure and converts the associated part of the text file into a graph data structure, and the terminal draws a wire frame of each node and a connecting wire between the wire frames in the display interface based on the graph data structure and the linked list data structure.
For example, the text content of a first text file of a distributed system is as follows:
Figure BDA0001977223700000091
Figure BDA0001977223700000101
as shown in fig. 2, a first frame diagram is drawn according to the first text file in the above example.
Further, after generating a first skeleton map from a first text file of the distributed system, the method further comprises:
step A1: receiving an updating instruction;
step A2: according to the updating instruction, adding description information of a new node in the description part of the first text file, and/or deleting the description information of a corresponding node from the description part of the first text file;
step A3: adding new node association information to the association part of the first text file according to the updating instruction, and/or deleting corresponding node association information from the association part of the first text file to form a second text file;
step A4: and generating a second frame image corresponding to the second text file.
Wherein the first text file and the second text file are two versions of the text file of the distributed system. In this embodiment, when a developer needs to update or upgrade the distributed system, a second text file is formed on the basis of the first text file according to each node in the updated distributed system and the association relationship between each node, and then a second frame map corresponding to the second text file is drawn according to the methods in steps S101 to S103, so that when the distributed system is updated, the frame map of the updated distributed system can be automatically obtained by updating the text file without redrawing by the developer.
For example, the text content of the second text file formed from the first text file in the above example is as follows:
Figure BDA0001977223700000111
Figure BDA0001977223700000121
as shown in fig. 3, a second frame diagram is drawn according to the second text file in the above example.
Still further, the method further comprises:
step B1: when a comparison instruction is received, displaying the first frame image and the second frame image in the display interface.
Step B2: and determining a first wire frame which is contained in the first frame diagram and is not contained in the second frame diagram, and marking the first wire frame in the display interface according to a first preset marking mode.
Wherein, the determining a first wire frame included in the first frame diagram and not included in the second frame diagram specifically includes:
determining first text content which is contained in the first text file and not contained in the second text file according to the text content of the first text file and the text content of the second text file;
a first wire frame corresponding to the first text content is determined in the first frame map.
Preferably, the first preset marking mode is as follows: setting a background color of the first wireframe to red.
Step B3: and determining a second wire frame which is not contained in the first frame diagram and is contained in the second frame diagram, and marking the second wire frame in the display interface according to a second preset marking mode.
Wherein, the determining a second wire frame which is not included in the first frame diagram and is included in the second frame diagram specifically includes:
determining second text content which is not contained in the first text file and is contained in the second text file according to the text content of the first text file and the text content of the second text file;
and determining a second wire frame corresponding to the second text content in the second frame diagram.
Preferably, the second preset marking mode is as follows: setting a background color of the second wireframe to green.
In practical applications, the following method may be adopted for determining the first text content and the second text content:
storing all text contents of the first text file into a first queue, and storing all text contents of the second text file into a second queue;
setting a first pointer at the head row position of the first queue, and setting a second pointer at the head row of the second queue;
acquiring data of a row where a second pointer is located, and comparing the data with data of each row in the first queue; if the data appears in the first queue, setting all data from a line where a first pointer in the first queue to a line above the line where the data exists as first text content, and setting the first pointer to a position where the data exists and setting the second pointer to a position where the data exists on a next line; if the data does not appear in the first queue, setting the data as second text content in the second queue, and setting the second pointer at the position of the next line; and so on until the second pointer is at the last row of the second queue.
In this embodiment, when the version of the distributed system is updated, the text content of the new version can be formed according to the text content of the old version, so as to obtain the frame diagram of the new version. The difference between the new version and the old version can be determined by acquiring the text content of the new version and the old version, and the difference between the new version and the old version can be compared more intuitively by marking in the new version of the frame diagram, so that the version management of the frame diagram of the distributed system is realized.
Example two
Based on the method for generating a frame map provided in the first embodiment, an apparatus for generating a frame map is provided in this embodiment, and specifically, fig. 4 illustrates an alternative structural block diagram of the apparatus for generating a frame map, where the apparatus for generating a frame map is divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors, so as to complete the present invention. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and describes the execution process of the apparatus for generating a frame diagram in a storage medium better than the program itself.
As shown in fig. 4, the apparatus for generating the frame map specifically includes the following components:
an obtaining module 401, configured to obtain a first text file for describing a distributed system.
Specifically, the first text file includes: a description portion and an association portion;
the description part includes: describing part identification and describing information corresponding to each node respectively; wherein the description information of each node includes: node name, node ID and node attribute;
the association section includes: an association part identifier and a plurality of node association information; wherein each node association information comprises: the ID of the father node, the ID of the child node and the incidence relation between the node corresponding to the father node ID and the node corresponding to the child node ID.
And the analysis module 402 is configured to determine, according to the first text file, each node in the distributed system and determine an association relationship between the nodes.
Specifically, the parsing module 402 includes:
the node analysis unit is used for creating a linked list data structure; wherein the linked list data structure comprises: a plurality of nodes; traversing the first text file, and acquiring each piece of description information positioned behind the description part identifier when the description part identifier is identified; adding the node name, the node ID and the node attribute in the description information to a node in the linked list data structure aiming at the description information;
a relationship analysis unit for creating a graph data structure; wherein the graph data structure comprises: a vertex set and an edge set; traversing the first text file, and acquiring the association information of each node behind the association part identifier when the association part identifier is identified; and aiming at one node association information, adding a father node ID and a child node ID in the node association information into the vertex set, and adding an association relation in the node association information into the edge set.
A drawing module 403, configured to draw wire frames corresponding to the nodes in a display interface respectively, and draw connecting lines representing the association relationship between the wire frames in the display interface, so as to generate a first frame diagram corresponding to the first text file.
Specifically, the drawing module 403 includes:
the wire frame drawing unit is used for respectively drawing wire frames corresponding to the parent node ID and the child node ID in the vertex set in the display interface according to the vertex set in the graph data structure;
the attribute adding unit is used for searching a node containing a father node ID or a child node ID from the linked list data structure according to the father node ID or the child node ID corresponding to the wire frame after the wire frame is drawn, and adding the node attribute in the node into the wire frame;
and the line drawing unit is used for drawing connecting lines corresponding to the association relations in the edge set among the wire frames in the display interface according to the edge set in the graph data structure.
Further, the apparatus further comprises:
the updating module is used for receiving an updating instruction; according to the updating instruction, adding description information of a new node in the description part of the first text file, and/or deleting the description information of a corresponding node from the description part of the first text file; adding new node association information to the association part of the first text file according to the updating instruction, and/or deleting corresponding node association information from the association part of the first text file to form a second text file; and generating a second frame image corresponding to the second text file.
Further, the apparatus further comprises:
the comparison module is used for displaying the first frame image and the second frame image in the display interface when a comparison instruction is received; determining a first wire frame which is contained in the first frame diagram and is not contained in the second frame diagram, and marking the first wire frame in the display interface according to a first preset marking mode; and determining a second wire frame which is not contained in the first frame diagram and is contained in the second frame diagram, and marking the second wire frame in the display interface according to a second preset marking mode.
Further, the comparison module is specifically configured to:
determining first text content which is contained in the first text file and not contained in the second text file according to the text content of the first text file and the text content of the second text file; determining a first wire frame corresponding to the first text content in the first frame diagram;
determining second text content which is not contained in the first text file and is contained in the second text file according to the text content of the first text file and the text content of the second text file; and determining a second wire frame corresponding to the second text content in the second frame diagram.
EXAMPLE III
The embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers) capable of executing programs, and the like. As shown in fig. 5, the computer device 50 of the present embodiment includes at least but is not limited to: a memory 501, a processor 502 communicatively coupled to each other via a system bus. It is noted that FIG. 5 only shows the computer device 50 having the components 501 and 502, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the memory 501 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 501 may be an internal storage unit of the computer device 50, such as a hard disk or a memory of the computer device 50. In other embodiments, the memory 501 may also be an external storage device of the computer device 50, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 50. Of course, the memory 501 may also include both internal and external storage devices for the computer device 50. In this embodiment, the memory 501 is generally used for storing an operating system installed in the computer device 50 and various types of application software, such as program codes of the apparatus for generating a frame diagram in the second embodiment. Further, the memory 501 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 502 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 502 generally serves to control the overall operation of the computer device 50.
Specifically, in this embodiment, the processor 502 is configured to execute a program of a method for generating a frame map stored in the processor 502, and when the program of the method for generating a frame map is executed, the following steps are implemented:
acquiring a first text file for describing a distributed system;
determining each node in the distributed system according to the first text file, and determining the association relation among the nodes;
and respectively drawing wire frames corresponding to the nodes in a display interface, and drawing connecting wires representing the association relationship among the wire frames in the display interface so as to generate a first frame diagram corresponding to the first text file.
The specific embodiment process of the above method steps can be referred to in the first embodiment, and the detailed description of this embodiment is not repeated here.
Example four
The present embodiments also provide a computer readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., having stored thereon a computer program that when executed by a processor implements the method steps of:
acquiring a first text file for describing a distributed system;
determining each node in the distributed system according to the first text file, and determining the association relation among the nodes;
and respectively drawing wire frames corresponding to the nodes in a display interface, and drawing connecting wires representing the association relationship among the wire frames in the display interface so as to generate a first frame diagram corresponding to the first text file.
The specific embodiment process of the above method steps can be referred to in the first embodiment, and the detailed description of this embodiment is not repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method of generating a skeleton map, the method comprising:
acquiring a first text file for describing a distributed system;
determining each node in the distributed system according to the first text file, and determining the association relation among the nodes;
respectively drawing wire frames corresponding to the nodes in a display interface, and drawing connecting wires representing the association relationship among the wire frames in the display interface so as to generate a first frame graph corresponding to the first text file;
wherein the first text file comprises: a description portion and an association portion;
the description part includes: describing part identification and describing information corresponding to each node respectively; wherein the description information of each node includes: node name, node ID and node attribute;
the association section includes: an association part identifier and a plurality of node association information; wherein each node association information comprises: father node ID, child node ID and the incidence relation between the node corresponding to the father node ID and the node corresponding to the child node ID;
the method further comprises the following steps:
receiving an updating instruction;
according to the updating instruction, adding description information of a new node in the description part of the first text file, and/or deleting the description information of a corresponding node from the description part of the first text file;
adding new node association information to the association part of the first text file according to the updating instruction, and/or deleting corresponding node association information from the association part of the first text file to form a second text file;
generating a second frame image corresponding to the second text file;
when a comparison instruction is received, displaying the first frame image and the second frame image in the display interface;
determining a first wire frame which is contained in the first frame diagram and is not contained in the second frame diagram, and marking the first wire frame in the display interface according to a first preset marking mode;
and determining a second wire frame which is not contained in the first frame diagram and is contained in the second frame diagram, and marking the second wire frame in the display interface according to a second preset marking mode.
2. The method for generating a frame map according to claim 1, wherein the determining each node in the distributed system according to the first text file specifically includes:
creating a linked list data structure; wherein the linked list data structure comprises: a plurality of nodes;
traversing the first text file, and acquiring each piece of description information positioned behind the description part identifier when the description part identifier is identified;
and aiming at one piece of description information, adding the node name, the node ID and the node attribute in the description information into one node in the linked list data structure.
3. The method for generating a frame map according to claim 2, wherein the determining the association relationship between the nodes according to the first text file specifically includes:
creating a graph data structure; wherein the graph data structure comprises: a vertex set and an edge set;
traversing the first text file, and acquiring the association information of each node behind the association part identifier when the association part identifier is identified;
and aiming at one node association information, adding a father node ID and a child node ID in the node association information into the vertex set, and adding an association relation in the node association information into the edge set.
4. The method according to claim 3, wherein the drawing the wire frames corresponding to the nodes in the display interface respectively includes:
drawing wire frames corresponding to parent node IDs and child node IDs in the vertex set respectively in the display interface according to the vertex set in the graph data structure;
after the wire frame is drawn, searching a node containing the father node ID or the child node ID from the linked list data structure according to the father node ID or the child node ID corresponding to the wire frame, and adding the node attribute in the node into the wire frame.
5. The method according to claim 4, wherein the drawing of the connecting lines representing the association relationship between the wire frames in the display interface specifically includes:
and drawing connecting lines corresponding to the association relations in the edge set among the wire frames in the display interface according to the edge set in the graph data structure.
6. The method according to claim 1, wherein the determining a first wire frame that is included in the first frame map and not included in the second frame map specifically includes:
determining first text content which is contained in the first text file and not contained in the second text file according to the text content of the first text file and the text content of the second text file;
a first wire frame corresponding to the first text content is determined in the first frame map.
7. The method according to claim 1, wherein the determining a second wire frame that is not included in the first frame map and is included in the second frame map specifically includes:
determining second text content which is not contained in the first text file and is contained in the second text file according to the text content of the first text file and the text content of the second text file;
and determining a second wire frame corresponding to the second text content in the second frame diagram.
8. A computer device, the computer device comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201910136925.1A 2019-02-25 2019-02-25 Method for generating frame diagram, computer equipment and readable storage medium Active CN111610908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910136925.1A CN111610908B (en) 2019-02-25 2019-02-25 Method for generating frame diagram, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910136925.1A CN111610908B (en) 2019-02-25 2019-02-25 Method for generating frame diagram, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111610908A CN111610908A (en) 2020-09-01
CN111610908B true CN111610908B (en) 2021-06-29

Family

ID=72204564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910136925.1A Active CN111610908B (en) 2019-02-25 2019-02-25 Method for generating frame diagram, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111610908B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113138829B (en) * 2021-06-22 2022-03-01 阿里云计算有限公司 Management method, device, equipment and storage medium of cloud application architecture

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222090A (en) * 2011-06-02 2011-10-19 清华大学 Mass data resource management frame under cloud environment
CN102547757A (en) * 2010-12-31 2012-07-04 北京亿阳信通软件研究院有限公司 Network optimization analysis system and method
CN102542074A (en) * 2012-02-17 2012-07-04 清华大学 Demonstration and search tool of topological relationship of elements
CN102831167A (en) * 2012-07-24 2012-12-19 东软集团股份有限公司 XML (extensive makeup language) processing method and device for graph structure
CN103218706A (en) * 2013-03-20 2013-07-24 深圳市赛为智能股份有限公司 Method and device for generating workflow file and executing method and system for generating workflow file
CN103369414A (en) * 2012-03-31 2013-10-23 中兴通讯股份有限公司 Method and device for generating intelligent network service by using service creation environment (SCE)
CN103577569A (en) * 2013-10-31 2014-02-12 国家电网公司 Method for realizing PSASP (power system analysis software package) data file graphics on basis of SVG (scalable vector graphics) technology
CN103634587A (en) * 2012-08-22 2014-03-12 联想(北京)有限公司 Image processing method and device, and electronic equipment
CN104133895A (en) * 2014-07-31 2014-11-05 国家电网公司 Intelligent substation secondary device connection diagram encoding algorithm based on binary tree
CN104461918A (en) * 2014-12-05 2015-03-25 上海斐讯数据通信技术有限公司 Method and system for performing statistic operation on dynamically-applied memory blocks
CN108304511A (en) * 2018-01-19 2018-07-20 福建师范大学 A kind of river network storage expression based on XML data format
CN109101575A (en) * 2018-07-18 2018-12-28 广东惠禾科技发展有限公司 Calculation method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547757A (en) * 2010-12-31 2012-07-04 北京亿阳信通软件研究院有限公司 Network optimization analysis system and method
CN102222090A (en) * 2011-06-02 2011-10-19 清华大学 Mass data resource management frame under cloud environment
CN102542074A (en) * 2012-02-17 2012-07-04 清华大学 Demonstration and search tool of topological relationship of elements
CN103369414A (en) * 2012-03-31 2013-10-23 中兴通讯股份有限公司 Method and device for generating intelligent network service by using service creation environment (SCE)
CN102831167A (en) * 2012-07-24 2012-12-19 东软集团股份有限公司 XML (extensive makeup language) processing method and device for graph structure
CN103634587A (en) * 2012-08-22 2014-03-12 联想(北京)有限公司 Image processing method and device, and electronic equipment
CN103218706A (en) * 2013-03-20 2013-07-24 深圳市赛为智能股份有限公司 Method and device for generating workflow file and executing method and system for generating workflow file
CN103577569A (en) * 2013-10-31 2014-02-12 国家电网公司 Method for realizing PSASP (power system analysis software package) data file graphics on basis of SVG (scalable vector graphics) technology
CN104133895A (en) * 2014-07-31 2014-11-05 国家电网公司 Intelligent substation secondary device connection diagram encoding algorithm based on binary tree
CN104461918A (en) * 2014-12-05 2015-03-25 上海斐讯数据通信技术有限公司 Method and system for performing statistic operation on dynamically-applied memory blocks
CN108304511A (en) * 2018-01-19 2018-07-20 福建师范大学 A kind of river network storage expression based on XML data format
CN109101575A (en) * 2018-07-18 2018-12-28 广东惠禾科技发展有限公司 Calculation method and device

Also Published As

Publication number Publication date
CN111610908A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN111639287A (en) Page processing method and device, terminal equipment and readable storage medium
CN104391725A (en) Page display method and page display device
CN111752565A (en) Interface generation method and device, computer equipment and readable storage medium
CN113760276A (en) Method and device for generating page code
CN116644213A (en) XML file reading method, device, equipment and storage medium
CN109710224B (en) Page processing method, device, equipment and storage medium
CN111241803A (en) Method and device for generating text file, computer equipment and readable storage medium
CN110716804A (en) Method and device for automatically deleting useless resources, storage medium and electronic equipment
CN111610908B (en) Method for generating frame diagram, computer equipment and readable storage medium
CN111444368B (en) Method and device for constructing user portrait, computer equipment and storage medium
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN115617797A (en) Dynamic expansion method of service metadata field, electronic equipment and storage medium
CN114169306A (en) Method, device and equipment for generating electronic receipt and readable storage medium
CN111125163A (en) Method and apparatus for processing data
CN115080114A (en) Application program transplanting processing method, device and medium
CN114816470A (en) Metadata database management method and device, electronic equipment and medium
CN113741953A (en) Form processing method and device, electronic equipment and computer storage medium
CN111400058A (en) Method and device for calling message, computer equipment and storage medium
CN113239670A (en) Method and device for uploading service template, computer equipment and storage medium
CN112363768A (en) Method for realizing application skin changing by inserting U disk based on android system
CN116821117B (en) Stream data processing method, system, equipment and storage medium
US11714954B1 (en) System for determining reliability of extracted data using localized graph analysis
CN116679852B (en) Project icon quotation method and device, electronic equipment and medium
CN115421785B (en) Method, device and medium for transplanting application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant