CN108628918B - System deployment and dependency relationship automatic drawing system and method - Google Patents

System deployment and dependency relationship automatic drawing system and method Download PDF

Info

Publication number
CN108628918B
CN108628918B CN201710903955.1A CN201710903955A CN108628918B CN 108628918 B CN108628918 B CN 108628918B CN 201710903955 A CN201710903955 A CN 201710903955A CN 108628918 B CN108628918 B CN 108628918B
Authority
CN
China
Prior art keywords
instance
service
deployment
systems
dependency relationship
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
CN201710903955.1A
Other languages
Chinese (zh)
Other versions
CN108628918A (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.)
Nanjing Tuniu Technology Co ltd
Original Assignee
Nanjing Tuniu 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 Nanjing Tuniu Technology Co ltd filed Critical Nanjing Tuniu Technology Co ltd
Priority to CN201710903955.1A priority Critical patent/CN108628918B/en
Publication of CN108628918A publication Critical patent/CN108628918A/en
Application granted granted Critical
Publication of CN108628918B publication Critical patent/CN108628918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements

Abstract

The invention discloses a system deployment and dependency relationship automatic drawing system and an automatic drawing method, wherein deployment information, a service list and a mutual dependency relationship of a system are obtained by analyzing a call log between the systems and are displayed. The system comprises: the system comprises an intersystem service call log module, a system deployment service and dependency relationship analysis module, a system deployment and dependency relationship display module and a static data management module. Compared with the traditional method, the invention greatly improves the manufacturing speed and can be updated at any time according to the requirement; and the accuracy is higher, the analysis is completely carried out based on the behavior of the system, all the dependency relationships are combed, and omission and errors are avoided.

Description

System deployment and dependency relationship automatic drawing system and method
Technical Field
The invention belongs to the technical field of data analysis, and relates to a system and a method capable of automatically drawing system deployment and dependency relationship.
Background
Internet enterprises generally use a large number of application systems, and besides externally open websites, APPs and the like, a large number of application systems are also provided inside the internet enterprises to support the operation and management of the enterprises. There is usually a complex calling relationship between internal application systems, and a certain function called a service is provided by one system for another system. The system types of the internet enterprises are also complicated, and the traditional web application and the novel microserver application are provided. The system deployment and dependency relationship diagram is a diagram capable of reflecting the relationship between the system deployment and the complex system, and is often used as an important basis for architecture decision and problem positioning of the complex system, and the importance of the diagram is self-evident. The industry currently adopts a manual method to draw a system deployment and dependency graph.
The manual drawing method is slow in speed and low in efficiency, and obviously has the following limitations:
1. the update is slow. The development of the internet is in a thousand days, and the dependency relationship among systems of internet enterprises is also in the future; the dependency graph as a time-consuming and labor-consuming work can only be updated regularly, and cannot be advanced with time. Particularly, with the development and maturity of the cloud technology, the actual deployment of the system is more dynamic and intelligent, the change is more frequent, and the manual work cannot achieve synchronous updating.
2. Cannot fully reflect objective conditions. After the system is complex, the manpower cannot arrange all the relationships, and the common drawing software cannot bear thousands of dependency relationships.
Disclosure of Invention
In order to solve the problems, the invention discloses an automatic drawing system and an automatic drawing method for system deployment and dependency relationship, which can quickly and accurately make a system deployment and dependency relationship diagram by acquiring and analyzing call log data.
In order to achieve the purpose, the invention provides the following technical scheme:
the system deployment and dependency relationship automatic drawing method comprises the following steps:
step1, collecting an inter-instance service call log, wherein the log comprises the following information: calling time, calling party IP and port number, called party IP and port number and called service identification;
step2, sorting all the instances in the log and the calling relation and the called service thereof, sorting all the services provided on each instance, grouping the instances and the services, making the instances and the services in each group have no intersection after grouping, each group corresponding to a set of system, searching the corresponding grouped system or edge system for each instance, and obtaining the calling relation among all the systems according to the calling relation and the service among the instances in the log and the mapping relation between the instances and the system;
step3, drawing a system deployment and calling relation diagram, arranging rectangle frames of system grouping on the diagram, then drawing small icons of the system, and displaying deployment details and upstream and downstream relations of the system on the relation diagram.
Further, step2 specifically includes the following steps:
step2-1, obtaining the relation data of all calling party instances calling called party instances and called services according to the log information;
step2-2, analyzing the relationship between the instances of step2-1 provided service and the service, and sorting out all the services provided on each instance and recording as map;
step2-3, performing nested loop traversal on the map, grouping the instances and the services, enabling the instances and the services between any two groups after grouping to have no intersection, recording the grouped data as default, wherein each group corresponds to a set of logically independently deployed systems, and each group records a service list and a deployed instance list provided by each system;
step2-4, arranging the system code of each system in the deploy;
step2-5, giving the system a unique identifier;
step2-6, acquiring all the instance identifications according to the data, and sorting all the instance lists instanceList;
step2-7, traversing each instance in instanceList, searching the system corresponding to the instance in deploy, and recording the relation between the instance and the system in instanceBelong; if the corresponding system does not exist in the deployment, combining the corresponding relation between the ip of the edge system and the system code to obtain the mapping relation between the instance and the edge system, and recording the mapping relation into the cNode;
step2-8, searching the client instance and the server instance in the data by combining instanceBelong, deploy and cNode to obtain the calling relation among all systems.
Further, step2-3 comprises the following sub-steps:
1) starting with an ungrouped instance a, putting the instance a into a new group;
2) if the intersection of the service list provided by the group of the instance a and the service list provided by the ungrouped instance b is not null, dividing the instance b into the group of the instance a; repeating the process until the intersection of the group of the instance a and the ungrouped instance service list is empty;
3) repeat execution from 1) until all instances have completed the packet.
Further, step2-8 comprises the following sub-steps:
initializing a null variable link _ temp, traversing data:
1) acquiring a client instance, a client ip, a server instance and a service of the server instance called by the client instance;
2) searching a home system of the client instance from instanceBelong, if the home system does not contain the client instance, searching a system containing the client instance from the cNode, and if the home system does not contain the client ip, searching a system containing the client ip in the cNode, and marking the system as c if the home system can be searched in the searching; entering the next circulation if the current time is not found;
3) searching a system containing service from the deployment, if the system does not contain service instance, finding out a system corresponding to the service instance from instanceBelong, if the system does not contain service instance, finding out the corresponding system in the searching and marking the system as s, and if the system does not contain service instance, entering the next cycle;
4) recording that the system c calls the service of the system s in the link _ temp;
5) and removing the duplicate of the link _ temp data, and sorting the data format to obtain a service list called between systems.
Further, step3 specifically includes the following sub-steps:
step3-1, open the link in the browser, load the necessary html, css, js and data deploy, cNode, link, system code and business domain corresponding relation;
step3-2, obtaining the width gw of the display area, the width sw and the height sh of the system icons, the transverse interval pw and the longitudinal interval ph between the system icons, the maximum system line number ml suggested in the domain frame, the transverse interval dpw of the domain area and the longitudinal interval dph of the domain area;
step3-3, calculating the maximum number of systems that can be arranged in each row under the condition that only system icons are arranged in the display area: cols ═ w + pw)/(sw + pw) and rounded down; and (3) calculating the number of systems contained in the recommendation of the row of each domain: dm ═ cols × ml;
step3-4, arranging the service domains from the upper left, and performing line feed at the place closest to dm;
step3-5, calculating the size of each service domain rectangular frame;
step3-6, drawing the rectangle of each domain in turn from the upper left corner;
step3-7, drawing system icons one by one in the rectangle of each field;
step3-8, when the mouse activates the system icon, extracting the client side systems of the system from the link, and drawing arrows pointing to the systems; extracting the server side systems of the system from the link, and drawing arrows pointing to the systems by the system; the bullet layer displays all the services provided by the system, all the instances of deployment.
Further, step3-4 specifically includes the following sub-steps:
initializing an empty row, traversing the service domain:
1) the system number in the current line is recorded as lt, the system number in the current domain is recorded as t, and st is recorded as lt + t;
2) if st < dm, add the field to the row; otherwise execute 3)
3) If (st-dm) > (dm-lt), initializing a new line, adding the field into the new line, wherein the current line becomes the new line, otherwise, adding the field into the line, initializing a new line, and adding a subsequent system into the new line;
4) repeat 1) -3) until all domains have been processed, the result is recorded as domainLines.
Further, step3-5 specifically includes the following sub-steps:
traversing the domainLines:
1) the number of domains in the current line is dc, the number of systems is sc, and the maximum number of systems which can be accommodated in each line after the domain frame gap is deducted from the current line is calculated by the following formula: cn ═ (gw + pw dc-dpw · (dc-1))/(sw + pw) and rounded down;
2) calculating the number of lines required by all the systems in the current line to be arranged, wherein rn is sc/cn and rounding is performed upwards;
3) rn _ temp increments by 1 from rn
i.tn, 0, traverse each field in the row,
1. the number of systems in the current domain is dsn, minCols dsn/rn _ temp and rounded up, tcn + (minCols)
When tcn < ═ cn, minCols, rn _ temp for each domain is recorded, ending the loop
4) The line height is calculated by the following formula, and is also the uniform height of all fields in the line: height ═ (sh + ph) × rn;
5) calculating the residual length tail of the line, gw + pw dc-dpw (dc-1) - (sw + pw) tcn by the following formula, and obtaining the quotient diff and the remainder diffNum of the dividend tail to the divisor dc;
6) and calculating the width of each domain, wherein the width calculation method of the front diffNum domains in the row comprises the following steps: the width is (sw + pw) minCols-pw + diff +1, and the width of the other domains is calculated by (sw + pw) minCols-pw + diff.
The invention also provides a system deployment and dependency relationship automatic drawing system, which comprises: the system comprises an intersystem service call log module, a system deployment service and dependency relationship analysis module, a system deployment and dependency relationship display module and a static data management module; the inter-system service call log module is used for collecting inter-instance service call logs; the system deployment service and dependency relationship analysis module is used for analyzing logs acquired by the intersystem service call log module, analyzing three data of actual deployment of the system, attribution relationship of instances and services and edge system information, sorting all call relationships in the logs, sorting all systems, instances and service lists of the systems, and finally sorting to obtain the intersystem call relationships; the system deployment and dependency relationship display module is used for drawing a system deployment and calling relationship graph, arranging system grouping rectangular frames on the graph, drawing small icons of the system, and displaying deployment details and upstream and downstream relationships of the system after clicking the system icons; the static data management module is used for managing the corresponding relation between the edge system ip and the system code and the corresponding relation between the system code and the service domain.
Furthermore, the system deployment and dependency relationship display module adopts a specific typesetting method to minimize the required layout height under the condition that the fixed width and the same group of systems are neatly arranged together.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. compared with the traditional method, the method has the advantages that the manufacturing speed is greatly improved, the system can be updated at any time according to needs, manual operation can be completely replaced, and the labor cost is reduced.
2. When the call logs among the systems are analyzed, services provided by the systems are abstracted into points based on graph theory, and the relationship deployed in the same instance is abstracted into lines to form a graph; the method comprises the steps that community discovery is carried out on points on a graph, a system list, an example deployment list and a provided service list are arranged, and the dependency relationship between the systems is arranged through the mapping relationship between examples and the systems when call logs between the systems are analyzed; the accuracy is higher, and the analysis is carried out completely based on the behavior of the system, so that all the dependency relationships are combed, and omission and errors are avoided.
3. When drawing all system deployment and calling relation graphs, the invention adopts a specific typesetting method, so that the grouped system arrangement is more compact.
Drawings
Fig. 1 is a flowchart of the overall steps of the method for automatically drawing the system deployment and dependency relationship provided by the present invention.
Fig. 2 is an exemplary diagram of a log format.
FIG. 3 is a flow chart of substeps in step 2.
FIG. 4 is an exemplary diagram of call relationships between instances in a log.
Fig. 5 is a schematic diagram before and after map grouping.
Fig. 6 is a schematic view of a display area.
Fig. 7 is a flow chart of sub-steps in step 3.
FIG. 8 is a diagram of the final plotted system deployment and dependencies, where the systems are arranged in groups by service domain.
FIG. 9 is a diagram of the state of a page when the system is activated with a mouse.
Detailed Description
The technical solutions provided by the present invention will be described in detail below with reference to specific examples, and it should be understood that the following specific embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention.
The invention refers to a specific deployment of an Application system (Application) on a server as an Instance (Instance), which is uniquely identified by its occupied IP and port number. The method for automatically drawing the system deployment and the dependency relationship, which is provided by the invention, is shown in figure 1 and comprises the following steps:
step1, collecting and storing service call logs between instances.
After one example calls a certain service of another example, the invention records a call log (as shown in the following figure), wherein the log contains the following information: call time (startTime), caller ip (consumerip) and port number (consumerPort), callee ip (serviceip) and port number (servicePort), called service identifier (serviceName), success or failure (success). The logstack is used as an open source tool to store the logs, the data can be saved within 2 seconds after the calling action is finished, and the storage data format is shown in fig. 2.
step2, sorting all the call relations in the log, sorting all the systems and the examples and service lists thereof, and finally sorting to obtain the call relations among the systems. As shown in fig. 3, the method comprises the following steps:
step2-1, collecting the log information, and obtaining the relation that all the caller instances call the callee instances and a certain service of the server instances. In the invention, Logstash is used for analyzing the logs in the last period of time, and analyzing all existing call relations, namely, the relation that c service of all existing a instance call b instances is exhausted (as shown in fig. 4), and the relation is recorded as data.
step2-2, analyze the relationship of the instance providing the service to the service. Processing the data, taking "serviceIp: servicePort" as the unique identifier of an instance, sorting out all services (serviceName) provided on each instance, and storing the services in the form of array ("instance 1" ═ array ("service 1", "service 2")), and recording the results as map. The services are taken as points, the services deployed on the same instance are drawn in pairs, and the direct connection line between the two points contains all instances in which the two services are provided simultaneously, so that a diagram is formed, such as the state before the upper half part in fig. 5 is not grouped.
step2-3, the nested loop traverses the map to group instances and services:
1) starting with an ungrouped instance a, putting the instance a into a new group;
2) if the intersection of the service list provided by the group of the instance a and the service list provided by the ungrouped instance b is not null, dividing the instance b into the group of the instance a; this process is repeated until the intersection of the set in which instance a is located and the ungrouped instance service list is empty.
3) Repeat execution from 1) until all instances have completed the packet.
After grouping, the instances between any two groups do not intersect, the services between any two groups do not intersect, and each group corresponds to a set of logically independently deployed systems. The grouped data is recorded as a deployment, which records a list of services provided by each system and a list of deployed instances. After grouping, all communities on the graph are found, each community corresponds to an application system, points in the communities are services which can be provided by the system, a direct connection line between the two points comprises all examples which provide the two services at the same time, and a specific example of system deployment is found after line duplication removal, as shown in the lower half of fig. 5.
step2-4, arranging the instances and services of each system in the deployment in alphabetical order; the first section of the service name is a system code, and the system code with the largest number of corresponding services is taken as the system code of the aggregated system.
step2-5, arranging the systems in the deploy according to the alphabetical order of the system code and the first service name; traversing a system in the deployment, and if a system code appears for the first time, directly using the system code as a system unique identification code to name the system; if the system code does not appear for the first time, numbers are added after the system code until a character string appearing for the first time is generated to be used as a unique identification code of the system. The processed data deployment is the data actually deployed by the system.
One skilled in the art can also use other data and information as the system code, as long as each system can be uniquely identified.
step2-6, processing the data in the data, obtaining all instance identifications (IP + port numbers), namely all combinations of 'serviceIp: servicePort' and 'consumerIp: consumerPort', and sorting all instance lists to be written as instanceList.
step2-7, traversing each instance in the instanceList, and searching the corresponding system in the default, thereby obtaining the relationship between the instance and the system; if a corresponding system exists during searching, recording the relation between the example and the unique identifier of the corresponding system into instanceBelong; if no corresponding system exists, the relationship between the system code and the instance is recorded into the cNode by combining the corresponding relationship between the edge system ip and the system code (provided by the static data management module). instanceBelong records which system an instance belongs to, and cenode records the list of instances contained in the edge system. Through the steps, the mapping relation between the example and the system and between the example and the edge system is obtained through sorting.
step2-8, the client instance and the server instance in the data are both found back to the system, and the call relation among all systems can be obtained. And processing the data into link by combining instanceBelong, deploy and cNode, wherein a service list called between systems, namely a service list called by the system a to the system b, is recorded. The treatment process in the step specifically comprises the following steps:
initializing a null variable link _ temp, traversing data:
1) acquiring a client instance a, a client ip a1 and a server instance b, a calling the service of b;
2) searching a home system of the instance a from instanceBelong, if not, searching a system containing the instance a from the cNode, and if not, searching a system containing a1 in the cNode, and marking as c; entering the next circulation if the current time is not found;
3) searching a system containing the service from the deployment, if not, finding a system corresponding to the instance b from instanceBelong, marking as s, and if not, entering the next cycle;
4) recording that the system c calls the service of the system s in the link _ temp;
5) and removing the duplicate of the link _ temp data, and sorting the data format to obtain format data such as { "c- > s": service1, service 2. ] } which is marked as link, namely a service list called between systems.
step3, using WEB technology, drawing a system deployment and calling relation diagram. Finally, arranging rectangular frames (namely, frames of the business domain) of system groups on the display graph, drawing small icons of the system, and displaying the deployment details and the upstream and downstream relations of the system after clicking the system icons.
As an improvement, the invention finds a feasible typesetting method under the condition of meeting the requirements of fixed width and neat arrangement of the same group of systems, so that the required layout height is minimum. As shown in fig. 7, the present step specifically includes the following processes:
step3-1, open the link in the browser, load the necessary html, css, js and the corresponding relation of data deploy, cNode, link, system code and service domain.
step3-2, obtaining the width gw of the display area, the width sw and the height sh of the system icons, the transverse interval pw and the longitudinal interval ph between the system icons, the maximum system line number ml suggested in the domain frame, the transverse interval dpw of the domain area and the longitudinal interval dph of the domain area; the layout diagram is shown in fig. 6.
step3-3, calculating the maximum system number that can be arranged in each row (the row refers to the maximum system number that can be arranged in the row of the layout when only system icons are arranged on the layout, and when no domain frame is arranged or when only one domain frame is arranged on the whole layout) under the condition that the system icons are arranged in the display area, wherein cols (gw + pw)/(sw + pw) is rounded downwards; calculating the recommended number of systems to be accommodated by the row of each domain (the row of the domain can accommodate a plurality of rows of systems): dm ═ cols × ml.
step3-4, the business domains are arranged from the top left, and the line feed is performed at the place closest to dm. Initializing an empty row, traversing the service domain:
1) the system number in the row of the current domain is marked as lt, the system number in the current domain is marked as t, and st is marked as lt + t;
2) if st < dm, add the field to the row; otherwise execute 3)
3) If (st-dm) > (dm-lt), initializing a new line, adding the field into the new line, wherein the current line becomes the new line, otherwise, adding the field into the line, initializing a new line, and adding a subsequent system into the new line;
4) repeat 1) -3) until all domains have been processed, the result is noted as domainLines
step3-5, calculate the size of each service domain rectangle box. Traversing the domainLines:
1) the number of domains in the current line is dc, the number of systems is sc, and the maximum number of systems which can be accommodated in each line after the domain frame gap is deducted from the current line is calculated by the following formula: cn ═ w + pw dc-dpw · (dc-1))/(sw + pw) and rounded down.
2) And calculating the number of rows required for arranging all the systems in the current row, wherein rn is sc/cn and rounding up.
3) rn _ temp increments by 1 from rn
i.tn, 0, traverse each field in the row,
1. the number of systems in the current domain is dsn, minCols dsn/rn _ temp and rounded up, tcn + (minCols)
When tcn < ═ cn, minCols, rn _ temp for each domain is recorded, ending the loop
4) The line height is calculated by the following formula, and is also the uniform height of all fields in the line: height ═ (sh + ph) × rn;
5) calculating the residual length tail of the line, gw + pw dc-dpw (dc-1) - (sw + pw) tcn by the following formula, and obtaining the quotient diff and the remainder diffNum of the dividend tail to the divisor dc;
6) and calculating the width of each domain, wherein the width calculation method of the front diffNum domains in the row comprises the following steps: the width of other domains is calculated by (sw + pw) minCols-pw + diff +1
step3-6, drawing the rectangle of each domain in turn from the upper left corner;
step3-7, drawing system icons one by one in the rectangle of each field, wherein the drawn system icons are shown in FIG. 8;
step3-8, when the mouse activates the system icon, extracting the client side systems of the system from the link, and drawing arrows pointing to the systems; extracting the server side systems of the system from the link, and drawing arrows pointing to the systems by the system; the bullet layer displays all the services provided by the system, all the instances deployed, as shown in fig. 9.
In order to implement the method, the invention also provides a system deployment and dependency relationship automatic drawing system, which comprises: the system comprises an intersystem service call log module, a system deployment service and dependency relationship analysis module, a system deployment and dependency relationship display module and a static data management module. The inter-system service call log module is used for collecting inter-instance service call logs, storing the logs by using an open source tool Logstash, and realizing the function of the step 1; the system deployment service and dependency relationship analysis module is used for analyzing logs collected by the intersystem service call log module, analyzing three data of actual deployment, attribution relationship of instances and services and edge system information of the system at regular time, sorting all call relationships in the logs, sorting all systems, instances and service lists of the systems, and finally sorting the call relationships to obtain the intersystem call relationships, so that the function of the step2 is realized. Timing analysis is an optimal mode, and can be performed in real time according to needs, so that real-time drawing and updating of system deployment and dependency relationships are achieved. The system deployment and dependency relationship display module is used for drawing a system deployment and calling relationship diagram by using a WEB technology, arranging rectangular frames of system groups on the display diagram, then drawing small icons of the system, and displaying deployment details and upstream and downstream relationships of the system after clicking the system icon, thereby realizing the function of the step 3. As an improvement, the system deployment and dependency relationship display module adopts a specific typesetting method to ensure that the required layout height is minimum under the condition of meeting the requirements of fixed width and orderly arranging systems in the same group. The static data management module is used for managing the corresponding relation between the ip and the system code of the edge system and the corresponding relation between the system code and the service domain, and the information is introduced from the outside and maintained manually, for example, the operation and maintenance department knows which ip is used by the edge system respectively and the system management department knows the corresponding relation between the system and the service domain.
The technical means disclosed in the invention scheme are not limited to the technical means disclosed in the above embodiments, but also include the technical scheme formed by any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and such improvements and modifications are also considered to be within the scope of the present invention.

Claims (8)

1. The method for automatically drawing the system deployment and the dependency relationship is characterized by comprising the following steps:
step1, collecting an inter-instance service call log, wherein the log comprises the following information: calling time, calling party IP and port number, called party IP and port number and called service identification;
step2, sorting all the instances in the log and the calling relation and the called service thereof, sorting all the services provided on each instance, grouping the instances and the services, making the instances and the services in each group have no intersection after grouping, each group corresponding to a set of system, searching the corresponding grouped system or edge system for each instance, and obtaining the calling relation among all the systems according to the calling relation and the service among the instances in the log and the mapping relation between the instances and the system;
the step2 specifically comprises the following steps:
step2-1, obtaining the relation data of all calling party instances calling called party instances and called services according to the log information;
step2-2, analyzing the relationship between the instances of step2-1 provided service and the service, and sorting out all the services provided on each instance and recording as map;
step2-3, performing nested loop traversal on the map, grouping the instances and the services, enabling the instances and the services between any two groups after grouping to have no intersection, recording the grouped data as default, wherein each group corresponds to a set of logically independently deployed systems, and each group records a service list and a deployed instance list provided by each system;
step2-4, arranging the system code of each system in the deploy;
step2-5, giving the system a unique identifier;
step2-6, acquiring all the instance identifications according to the data, and sorting all the instance lists instanceList;
step2-7, traversing each instance in instanceList, searching the system corresponding to the instance in deploy, and recording the relation between the instance and the system in instanceBelong; if the corresponding system does not exist in the deployment, combining the corresponding relation between the ip of the edge system and the system code to obtain the mapping relation between the instance and the edge system, and recording the mapping relation into the cNode;
step2-8, searching the client instance and the server instance in the data by combining instanceBelong, deploy and cNode to obtain the calling relation among all systems;
step3, drawing a system deployment and calling relation diagram, arranging rectangle frames of system grouping on the diagram, then drawing small icons of the system, and displaying deployment details and upstream and downstream relations of the system on the relation diagram.
2. The system deployment and dependency relationship automatic drawing method as claimed in claim 1, wherein the step2-3 includes the sub-steps of:
1) starting with an ungrouped instance a, putting the instance a into a new group;
2) if the intersection of the service list provided by the group of the instance a and the service list provided by the ungrouped instance b is not null, dividing the instance b into the group of the instance a; repeating the process until the intersection of the group of the instance a and the ungrouped instance service list is empty;
3) repeat execution from 1) until all instances have completed the packet.
3. The system deployment and dependency relationship automatic drawing method as claimed in claim 1, wherein the step2-8 includes the sub-steps of:
initializing a null variable link _ temp, traversing data:
1) acquiring a client instance, a client ip, a server instance and a service of the server instance called by the client instance;
2) searching a home system of the client instance from instanceBelong, if the home system does not contain the client instance, searching a system containing the client instance from the cNode, and if the home system does not contain the client ip, searching a system containing the client ip in the cNode, and marking the system as c if the home system can be searched in the searching; entering the next circulation if the current time is not found;
3) searching a system containing service from the deployment, if the system does not contain service instance, finding out a system corresponding to the service instance from instanceBelong, if the system does not contain service instance, finding out the corresponding system in the searching and marking the system as s, and if the system does not contain service instance, entering the next cycle;
4) recording that the system c calls the service of the system s in the link _ temp;
5) and removing the duplicate of the link _ temp data, and sorting the data format to obtain a service list called between systems.
4. The system deployment and dependency relationship automatic drawing method according to claim 1, wherein the step3 specifically comprises the following sub-steps:
step3-1, open the link in the browser, load the necessary html, css, js and data deploy, cNode, link, system code and business domain corresponding relation;
step3-2, obtaining the width gw of the display area, the width sw and the height sh of the system icons, the transverse interval pw and the longitudinal interval ph between the system icons, the maximum system line number ml suggested in the domain frame, the transverse interval dpw of the domain area and the longitudinal interval dph of the domain area;
step3-3, calculating the maximum number of systems that can be arranged in each row under the condition that only system icons are arranged in the display area: cols = (gw + pw)/(sw + pw) and round down; and (3) calculating the number of systems contained in the recommendation of the row of each domain: dm = cols ml;
step3-4, arranging the service domains from the upper left, and performing line feed at the place closest to dm;
step3-5, calculating the size of each service domain rectangular frame;
step3-6, drawing the rectangle of each domain in turn from the upper left corner;
step3-7, drawing system icons one by one in the rectangle of each field;
step3-8, when the mouse activates the system icon, extracting the client side systems of the system from the link, and drawing arrows pointing to the systems; extracting the server side systems of the system from the link, and drawing arrows pointing to the systems by the system; the bullet layer displays all the services provided by the system, all the instances of deployment.
5. The system deployment and dependency relationship automatic drawing method according to claim 4, wherein the step3-4 specifically comprises the following sub-steps:
initializing an empty row, traversing the service domain:
1) the system number in the current line is recorded as lt, the system number in the current domain is recorded as t, and st = lt + t;
2) if st < = dm, add the field to the row; otherwise execute 3)
3) If (st-dm) > (dm-lt), initializing a new line, adding the field into the new line, wherein the current line becomes the new line, otherwise, adding the field into the line, initializing a new line, and adding a subsequent system into the new line;
4) repeat 1) -3) until all domains have been processed, the result is recorded as domainLines.
6. The system deployment and dependency relationship automatic drawing method according to claim 5, wherein the step3-5 specifically comprises the following sub-steps:
traversing the domainLines:
1) the number of domains in the current line is dc, the number of systems is sc, and the maximum number of systems which can be accommodated in each line after the domain frame gap is deducted from the current line is calculated by the following formula: cn = (gw + pw dc-dpw × (dc-1))/(sw + pw) and rounded down;
2) calculating the number of rows required by all the systems in the current row, wherein rn = sc/cn and rounding up;
3) rn _ temp increments by 1 from rn
Tcn =0, traverse each field in the row,
1, the number of systems in the current domain is dsn, minCols = dsn/rn _ temp and rounded up, tcn + = minCols
When tcn < = cn, record minCols, rn = rn _ temp for each domain, end loop
4) The line height is calculated by the following formula, and is also the uniform height of all fields in the line: height = (sh + ph) × rn;
5) calculating the residual length of the line tail = gw + pw dc-dpw (dc-1) - (sw + pw) tcn by the following formula, and obtaining the quotient diff and the remainder diffNum of the dividend tail to the divisor dc;
6) and calculating the width of each domain, wherein the width calculation method of the front diffNum domains in the row comprises the following steps: width = (sw + pw) minCols-pw + diff +1, and the width of other domains is calculated by the method of width = (sw + pw) minCols-pw + diff.
7. The system deployment and dependency relationship automatic drawing system is used for realizing the system deployment and dependency relationship automatic drawing method of any one of claims 1-6, and comprises the following steps: the system comprises an intersystem service call log module, a system deployment service and dependency relationship analysis module, a system deployment and dependency relationship display module and a static data management module; the inter-system service call log module is used for collecting inter-instance service call logs; the system deployment service and dependency relationship analysis module is used for analyzing logs acquired by the intersystem service call log module, analyzing three data of actual deployment of the system, attribution relationship of instances and services and edge system information, sorting all call relationships in the logs, sorting all systems, instances and service lists of the systems, and finally sorting to obtain the intersystem call relationships; the system deployment and dependency relationship display module is used for drawing a system deployment and calling relationship graph, arranging system grouping rectangular frames on the graph, drawing small icons of the system, and displaying deployment details and upstream and downstream relationships of the system after clicking the system icons; the static data management module is used for managing the corresponding relation between the edge system ip and the system code and the corresponding relation between the system code and the service domain.
8. The system deployment and dependency relationship auto-rendering system of claim 7, wherein: the system deployment and dependency relationship display module adopts a specific typesetting method to ensure that the required layout height is minimum under the condition that the fixed width and the same group of systems are neatly arranged together.
CN201710903955.1A 2017-09-29 2017-09-29 System deployment and dependency relationship automatic drawing system and method Active CN108628918B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710903955.1A CN108628918B (en) 2017-09-29 2017-09-29 System deployment and dependency relationship automatic drawing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710903955.1A CN108628918B (en) 2017-09-29 2017-09-29 System deployment and dependency relationship automatic drawing system and method

Publications (2)

Publication Number Publication Date
CN108628918A CN108628918A (en) 2018-10-09
CN108628918B true CN108628918B (en) 2022-03-25

Family

ID=63705694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710903955.1A Active CN108628918B (en) 2017-09-29 2017-09-29 System deployment and dependency relationship automatic drawing system and method

Country Status (1)

Country Link
CN (1) CN108628918B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672662B (en) * 2018-10-11 2021-03-26 中山大学 Method for constructing service dependency relationship in micro-service environment
CN110928784B (en) * 2019-11-21 2023-09-05 中国民航信息网络股份有限公司 Software testing environment monitoring method and device
CN111831548B (en) * 2020-05-29 2024-04-05 微民保险代理有限公司 Dependency relationship topological graph drawing method and device
CN114564242A (en) * 2022-02-28 2022-05-31 石家庄通合电子科技股份有限公司 Method, device, terminal and storage medium for realizing self-awakening function

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204696A1 (en) * 2008-02-13 2009-08-13 Ming Zhang Service dependency discovery in enterprise networks
CN105207806A (en) * 2015-08-20 2015-12-30 百度在线网络技术(北京)有限公司 Monitoring method and apparatus of distributed service

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790718A (en) * 2017-03-16 2017-05-31 北京搜狐新媒体信息技术有限公司 Service call link analysis method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090204696A1 (en) * 2008-02-13 2009-08-13 Ming Zhang Service dependency discovery in enterprise networks
CN105207806A (en) * 2015-08-20 2015-12-30 百度在线网络技术(北京)有限公司 Monitoring method and apparatus of distributed service

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《Web service schema matching based on invocation instance duplicates》;Wang Ke 等;《 2011 7th International Conference on Next Generation Web Services Practices》;20111231;全文 *
《多Agent 系统中依赖关系的研究》;张春霞 等;《计算机应用》;20000131;第20卷(第1期);全文 *

Also Published As

Publication number Publication date
CN108628918A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
CN108628918B (en) System deployment and dependency relationship automatic drawing system and method
CN110292775B (en) Method and device for acquiring difference data
CN106228306A (en) Operation flow methods of exhibiting based on modeling configuration and operation flow exhibiting device
CN105069134A (en) Method for automatically collecting Oracle statistical information
CN105224658A (en) A kind of Query method in real time of large data and system
CN108875091A (en) A kind of distributed network crawler system of unified management
CN104317942A (en) Massive data comparison method and system based on hadoop cloud platform
CN106339408A (en) Data synchronization method, data synchronization device and server
CN110134663B (en) Organization structure data processing method and device and electronic equipment
CN107391506A (en) Method and apparatus for inquiring about data
CN105630934A (en) Data statistic method and system
CN106033474A (en) Data synchronization updating method and device, and electronic device
CN105117441A (en) Data work order processing method and system
CN109033188A (en) A kind of metadata acquisition method, apparatus, server and computer-readable medium
CN106407233A (en) A data processing method and apparatus
CN108959356A (en) A kind of intelligence adapted TV university Data application system Data Mart method for building up
CN105338107A (en) Stronghold operation synchronous management system and stronghold operation synchronous management method
CN112596851A (en) Multi-source heterogeneous data batch extraction method and analysis method of simulation platform
JP6841228B2 (en) File information collection system, method and program
CN114201663B (en) Group customer mining method and device based on label propagation and electronic equipment
CN111651531A (en) Data import method, device, equipment and computer storage medium
CN116954587B (en) Front-end intelligent drag engine and method for establishing data processing flow
CN115639997B (en) Method and system for describing OPC UA information model in JSON format
CN113055243B (en) DPI interface data processing method and device
CN110191026B (en) Distributed service link monitoring method and device

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