CN112784133B - Link visualization method, device, equipment and storage medium - Google Patents

Link visualization method, device, equipment and storage medium Download PDF

Info

Publication number
CN112784133B
CN112784133B CN202110085492.9A CN202110085492A CN112784133B CN 112784133 B CN112784133 B CN 112784133B CN 202110085492 A CN202110085492 A CN 202110085492A CN 112784133 B CN112784133 B CN 112784133B
Authority
CN
China
Prior art keywords
component
processed
file path
information
call
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
CN202110085492.9A
Other languages
Chinese (zh)
Other versions
CN112784133A (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.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp 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 China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202110085492.9A priority Critical patent/CN112784133B/en
Publication of CN112784133A publication Critical patent/CN112784133A/en
Application granted granted Critical
Publication of CN112784133B publication Critical patent/CN112784133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

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

Abstract

The invention discloses a link visualization method, a device, equipment and a storage medium, wherein the method comprises the following steps: scanning the component to be processed to obtain scanning information; judging whether the component to be processed has component call or not according to the scanning information; when the component call exists in the component to be processed, judging whether the component to be processed is a call end point or not; when the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into the preset flow container; when the component to be processed is not a call end point, adding a node corresponding to the component to be processed into a preset flow container; traversing the data in the preset flow container, and generating a link directed acyclic graph according to the traversing result, so that the link is simply and intuitively called to be displayed in a graphical mode, and a large amount of manpower is saved.

Description

Link visualization method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for link visualization.
Background
The existing call link tracking of the method is mostly based on a crawler technology, namely, a network request is sent through a simulation browser, and then received request response is analyzed according to a certain rule, so that a program of internet information is automatically captured, and if a network environment does not exist, the crawler cannot execute the program. Moreover, crawling information mainly depends on a certain method or a message returned by the method to run completely, and crawling information is continued, if the currently crawled method cannot run, the function of a crawler cannot be executed. And the collection of information depends on a database, so that the resource investment is increased, and the calling condition of the method cannot be intuitively seen. For financial systems such as banks, the calling links of all transactions in the system cannot be displayed, and the calling links are troublesome to check, so that manpower and material resources are wasted.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a link visualization method, a device, equipment and a storage medium, which aim to solve the technical problem that a calling link cannot be displayed simply and intuitively in the prior art.
In order to achieve the above object, the present invention provides a link visualization method, which includes the steps of:
Scanning the component to be processed to obtain scanning information;
judging whether the component to be processed has component call or not according to the scanning information;
when the component call exists in the component to be processed, judging whether the component to be processed is a call end point or not;
When the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into the preset flow container;
when the component to be processed is not a call end point, adding a node corresponding to the component to be processed into a preset flow container;
traversing the data in the preset flow container, and generating a link directed acyclic graph according to the traversing result.
When the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into the preset flow container, wherein the method comprises the following steps:
when the component to be processed is a call end point, acquiring the component name of the component to be processed;
Judging whether the component to be processed is scanned or not according to the component name;
and searching the component information corresponding to the component to be processed from a preset component container when the component to be processed is scanned, and adding the component information into a preset flow container.
Optionally, after the determining whether the component to be processed has been scanned according to the component name, the method further includes:
searching a target file path according to the component name when the component to be processed is not scanned;
and determining a new component to be processed based on the target file path and a preset depth-first search algorithm, and executing the step of scanning the component to be processed to obtain scanning information.
Optionally, before the searching the target file path according to the component name when the component to be processed is not scanned, the method further includes:
traversing the components, and taking the traversed components as components to be selected;
Scanning a file path corresponding to the component to be selected, and generating a file path container according to the file path;
Accordingly, the searching the target file path according to the component name comprises the following steps:
and searching a target file path from the file path container according to the component name.
Optionally, the searching the target file path from the file path container according to the component name includes:
Matching the component name with the component name to be selected in the mapping list;
and determining a target file path corresponding to the component name according to the matching result, and searching the target file path from the file path container.
Optionally, before the searching the target file path from the file path container according to the component name, the method further includes:
Acquiring a name of a component to be selected of the component to be selected;
Determining the corresponding relation between the names of the components to be selected and the file path according to the corresponding relation between the components to be selected and the file path;
And establishing a mapping list based on the corresponding relation between the names of the components to be selected and the file path.
Optionally, when the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information to the preset flow container, including:
when the component to be processed is a call end point, acquiring the component name of the component to be processed;
Judging whether the component to be processed is scanned or not according to the component name;
and searching the component information corresponding to the component to be processed from a preset component container when the component to be processed is scanned, and adding the component information into a preset flow container.
Optionally, the determining whether the component to be processed has a component call according to the scan information includes:
extracting static text corresponding to the component to be processed from the scanning information;
carrying out security verification on the static text, and extracting code information from the static text when the security verification passes;
scanning the code information line by line to obtain a code scanning result;
Judging whether the component to be processed has component call or not according to the code scanning result.
In addition, in order to achieve the above object, the present invention also proposes a link visualization apparatus including:
the component scanning module is used for scanning the component to be processed to obtain scanning information;
The call judging module is used for judging whether the component to be processed has component call or not according to the scanning information;
the call terminal module is used for judging whether the component to be processed is a call terminal or not when the component to be processed is called;
The information adding module is used for searching the component information corresponding to the component to be processed from a preset component container when the component to be processed is a call end point, and adding the component information into the preset flow container;
the node adding module is used for adding the node corresponding to the component to be processed into a preset flow container when the component to be processed is not a call end point;
and the image generation module is used for traversing the data in the preset flow container and generating a link directed acyclic graph according to the traversing result.
In addition, to achieve the above object, the present invention also proposes a link visualization apparatus including: a memory, a processor and a link visualization program stored on the memory and executable on the processor, the link visualization program being configured with steps to implement the link visualization method as described above.
In addition, to achieve the above object, the present invention also proposes a storage medium having stored thereon a link visualization program which, when executed by a processor, implements the steps of the link visualization method as described above.
The link visualization method provided by the invention is used for scanning the component to be processed to obtain scanning information; judging whether the component to be processed has component call or not according to the scanning information; when the component call exists in the component to be processed, judging whether the component to be processed is a call end point or not; when the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into the preset flow container; when the component to be processed is not a call end point, adding a node corresponding to the component to be processed into a preset flow container; traversing the data in the preset flow container, and generating a link directed acyclic graph according to the traversing result, so that the calling link is displayed simply and intuitively in a graphical mode, and a large amount of manpower is saved.
Drawings
FIG. 1 is a schematic diagram of a link visualization device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of a first embodiment of the link visualization method of the present invention;
FIG. 3 is a flow chart of a second embodiment of the link visualization method of the present invention;
FIG. 4 is a schematic diagram illustrating an implementation flow of an embodiment of a link visualization method according to the present invention;
FIG. 5 is a schematic diagram of a transaction system scenario according to an embodiment of the present invention;
fig. 6 is a schematic functional block diagram of a first embodiment of the link visualization device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a link visualization device structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the link visualization device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as keys, and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed random access memory (RandomAccess Memory, RAM) memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the device architecture shown in fig. 1 does not constitute a limitation of the link visualization device, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a link visualization program may be included in the memory 1005 as one type of storage medium.
In the link visualization device shown in fig. 1, the network interface 1004 is mainly used for connecting to an external network and performing data communication with other network devices; the user interface 1003 is mainly used for connecting user equipment and communicating data with the user equipment; the apparatus of the present invention calls the link visualization program stored in the memory 1005 through the processor 1001 and performs the link visualization method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the link visualization method is provided.
Referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the link visualization method according to the present invention.
In a first embodiment, the link visualization method comprises the steps of:
Step S10, scanning the component to be processed to obtain scanning information.
It should be noted that, the execution body of the present embodiment may be a link visualization device, for example, a computer device, or may be another device that can implement the same or similar functions, which is not limited in this embodiment, and in this embodiment, a computer device is taken as an example for description.
It should be noted that, the link visualization method in this embodiment may be used in a financial system, and may also be used in other systems, and this embodiment is not limited thereto.
It should be noted that the depth-first search algorithm is a traversal algorithm for graphs and trees, and can generate a topology ordering table of the secret graph, which is briefly described as going deep enough for each possible branch path, and each node can only access once. Regular expressions are typically used to retrieve, replace, text that meets a certain pattern (rule).
The technical scheme of the embodiment is suitable for banking and other financial systems as targets, simulates the mode of a web crawler, provides a static code level scanning function through a depth-first search algorithm, sets a search entry point for a specific regular matching mode, and forms a directed acyclic graph.
It should be appreciated that this embodiment requires defining a flow container, a component container, a text path container, and invoking a downstream component regular expression, and therefore requires defining an invocation endpoint because the overall idea is a depth-first search algorithm. All the components can be scanned according to the line, the currently scanned components are called as components to be processed, the components to be processed are scanned, and scanning information corresponding to the components to be processed can be obtained.
And step S20, judging whether the component to be processed has component call or not according to the scanning information.
It can be understood that whether the component to be processed has component call can be judged according to the scanning information corresponding to the component to be processed.
Further, the step S20 includes:
Extracting static text corresponding to the component to be processed from the scanning information; carrying out security verification on the static text, and extracting code information from the static text when the security verification passes; scanning the code information line by line to obtain a code scanning result; judging whether the component to be processed has component call or not according to the code scanning result.
It should be understood that the scan information may include static text, component names, and other information, which is not limited by the present embodiment. The static text corresponding to the component to be processed can be extracted from the scanning information, the static text can be subjected to security verification for ensuring the security of data, and code information is extracted from the static text when the security verification passes. The code information is scanned line by line, a code scanning result can be obtained, and whether the component to be processed has component call or not can be judged according to the code scanning result.
It should be appreciated that it may be further determined whether the scanned call is a call between components and if so, the component container needs to be updated while the flow container is updated.
And step S30, judging whether the component to be processed is a call end point or not when the component to be processed has component call.
It should be appreciated that when there is a component call for a component to be processed, it may be determined whether the component to be processed is a call endpoint based on a predefined call endpoint.
And S40, when the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into the preset flow container.
It should be understood that when the component to be processed is a call end point, the component name of the component to be processed can be obtained, whether the component to be processed has been scanned is determined according to the component name, when the component to be processed has been scanned, component information corresponding to the component to be processed is searched from a preset component container, and the component information is added into the preset flow container.
And searching a target file path according to the name of the component when the component to be processed is not scanned, determining a new component to be processed based on the target file path and a preset depth-first search algorithm, and executing the step of scanning the component to be processed to obtain scanning information.
And S50, when the component to be processed is not a call end point, adding the node corresponding to the component to be processed into a preset flow container.
It should be understood that when the component to be processed is not a call end point, according to the defined data structure of the call node, the node corresponding to the component to be processed is assembled and put into the flow container.
Step S60, traversing the data in the preset flow container, and generating a link directed acyclic graph according to the traversing result.
It should be appreciated that the process container may be traversed, forming a directed acyclic graph from its data structure definition, including the following information: the transaction of the portal is invoked, and the calling relation of the intermediate component is reached to the final invoked downstream transaction.
In this embodiment, scanning is performed on the component to be processed to obtain scanning information; judging whether the component to be processed has component call or not according to the scanning information; when the component call exists in the component to be processed, judging whether the component to be processed is a call end point or not; when the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into the preset flow container; when the component to be processed is not a call end point, adding a node corresponding to the component to be processed into a preset flow container; traversing the data in the preset flow container, and generating a link directed acyclic graph according to the traversing result, so that the link is simply and intuitively called to be displayed in a graphical mode, and a large amount of manpower is saved.
In an embodiment, as shown in fig. 3, a second embodiment of the link visualization method according to the present invention is proposed based on the first embodiment, and the step S40 includes:
and step S01, when the component to be processed is a call end point, acquiring the component name of the component to be processed.
It should be understood that each component has its corresponding component name, and that the component name of the component to be processed may be obtained when there is no component call to the component to be processed.
And step S02, judging whether the component to be processed is scanned or not according to the name of the component.
It will be appreciated that, since there is a corresponding record when scanning is performed, it can be determined whether the component to be processed has been scanned before according to the name of the component.
Step S03, when the component to be processed is scanned, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into a preset flow container.
It should be understood that when the component to be processed has been scanned, the component information corresponding to the component to be processed is searched from the preset component container, and the component information is added to the preset flow container, specifically, the data is assembled and put into the flow container according to the data structure of the defined call node and the component information.
Further, after the step S02, the method further includes:
searching a target file path according to the component name when the component to be processed is not scanned; and determining a new component to be processed based on the target file path and a preset depth-first search algorithm, and executing the step of scanning the component to be processed to obtain scanning information.
It should be understood that in the process that the component to be processed is not scanned, the target file path can be searched according to the name of the component, the next file is continuously read according to the principle of the depth-first search algorithm, a new component to be processed is determined, and the new component to be processed is scanned.
Further, before searching the target file path according to the component name when the component to be processed is not scanned, the method further includes:
Traversing the components, and taking the traversed components as components to be selected; scanning a file path corresponding to the component to be selected, and generating a file path container according to the file path; acquiring a name of a component to be selected of the component to be selected; determining the corresponding relation between the names of the components to be selected and the file path according to the corresponding relation between the components to be selected and the file path; establishing a mapping list based on the corresponding relation between the names of the components to be selected and the file path; matching the component name with the component name to be selected in the mapping list; and determining a target file path corresponding to the component name according to the matching result, and searching the target file path from the file path container.
It should be understood that the components may be traversed, the traversed components are used as the components to be selected, the file paths corresponding to the components to be selected are scanned, and the file path container is generated according to the file paths, that is, the file path container stores the file path information corresponding to the components.
And the name of the component to be selected can be obtained, and the corresponding relation between the name of the component to be selected and the file path is determined according to the corresponding relation between the component to be selected and the file path. For example, the component a to be selected corresponds to the file path a, and the component name to be selected of the component a to be selected is referred to as the component name a to be selected, so that the correspondence between the component name a to be selected and the file path a may be determined, and a mapping list may be established based on the correspondence between the component name to be selected and the file path.
And matching the component name with the component name to be selected in the mapping list, determining a target file path corresponding to the component name according to a matching result, and searching the target file path from the file path container. For example, the mapping list stores a component name a to be selected, a component name B to be selected, a file path a, and a component name B to be selected, where the component name a to be selected corresponds to the file path a, the component name B to be selected corresponds to the file path B, and file path information such as the file path a, the file path B, and the like is stored in the file path container. And matching the component name with the component name to be selected in the mapping list, wherein when the successfully matched component name to be selected is the component name A to be selected, the file path A can be used as a target file path, and after the target file path is determined, the target file path can be searched from the file path container, namely the file path A is searched.
In a specific implementation, as shown in fig. 4, fig. 4 is a schematic diagram of an execution flow.
1. The file path is scanned.
S101, scanning all component paths to form a file path container, wherein the name of each component is key.
2. The scan flow file forms a flow container.
S201, scanning all components according to rows;
S202, matching each row of codes in the file, and if no component call occurs, scanning the file; if component call occurs, turning to S203;
s203, whether the final call of the component (namely, the end point of the recursion call in the depth-first search algorithm) is matched, and if the final call of the component is matched, executing S204; otherwise, executing S205;
s204, judging whether the component is scanned according to the name of the component, and executing S207 if the component is scanned; otherwise, executing S206;
s205, according to the defined data structure of the calling node, the assembly node is placed into a flow container.
S206, acquiring a file path according to the component name, and executing S208;
S207, acquiring scanned component information from a component container, and executing S209;
S208, continuing to read the next file according to the principle of the depth-first search algorithm;
s209, assembling data according to the defined data structure of the calling node and putting the data into a flow container.
S210, traversing the flow container, and forming a directed acyclic graph according to the definition of the data structure, wherein the directed acyclic graph comprises the following information: the transaction of the portal is invoked, and the calling relation of the intermediate component is reached to the final invoked downstream transaction.
S211, judging whether the scanned call is a call between components, and if so, updating the component container while updating the flow container.
In a specific implementation, as shown in fig. 5, fig. 5 is a schematic view of a transaction system scenario. Taking a private business transaction scene as an example, the portal transaction code and the transaction code of each downstream calling other platform need to be combed, and finally, the calling condition between the transactions can be simply and directly presented.
Under the condition that the method does not pass through the method, global searching transaction codes are needed to serve as searching starting points, codes are manually tracked, next layer of component codes are searched for aiming at component calls until all transaction codes are combed; or comb up the entry transaction code for the downstream transaction code to be found. At present, the number of interfaces of the my transaction system is more than or equal to 2500, the number of interfaces of the downstream system is more than or equal to 35, so that the huge and repeated carding work is not easy, and manual re-carding is needed for each large system change. In the other way, the system is required to be ensured to run, each analyzed request is called by adopting a web crawler way, the normal availability of the test environment is required to be ensured in the process, the method has relatively high accuracy, a large number of interfaces exist in the running system if the transaction code is less, each request is executed, and the first time is not ensured; secondly, in order to ensure the correctness of the test data, a great deal of preliminary preparation work is required, and the method is obviously slightly insufficient.
The method takes a depth-first search algorithm as a model, sets an entry regular expression as a search starting point, sets an end point regular expression as a search end point, scans static codes as texts, goes deep into each layer of call, analyzes codes matched with the end point regular expression, obtains transaction codes in the codes, assembles the codes according to a data structure of link nodes, stores the codes in a node set, returns the current component directly when the call of the current component occurs again, processes the node set after all the components are scanned, and intuitively displays a call link. The system not only saves a great deal of manpower, but also controls the search time within 30 seconds, and the system is modified to a great extent each time, and only the program is required to be restarted, so that the carding process of the system is greatly accelerated, and the subsequent regression of the system is facilitated.
In this embodiment, when there is no component call in the component to be processed, the component name of the component to be processed is obtained; judging whether the component to be processed is scanned or not according to the component name; when the component to be processed is scanned, component information corresponding to the component to be processed is searched from a preset component container, the component information is added into a preset flow container, data in the preset flow container are traversed, and a link directed acyclic graph is generated according to the traversing result, so that the link is simply and intuitively called to display in a graphical mode, and a large amount of manpower is saved.
In addition, the embodiment of the invention also provides a storage medium, wherein a link visualization program is stored on the storage medium, and the link visualization program realizes the steps of the link visualization method when being executed by a processor.
Because the storage medium adopts all the technical schemes of all the embodiments, the storage medium has at least all the beneficial effects brought by the technical schemes of the embodiments, and the description is omitted here.
In addition, referring to fig. 6, an embodiment of the present invention further proposes a link visualization apparatus, including:
The component scanning module 10 is configured to scan the component to be processed to obtain scanning information.
It should be noted that, the link visualization method in this embodiment may be used in a financial system, and may also be used in other systems, and this embodiment is not limited thereto.
It should be noted that the depth-first search algorithm is a traversal algorithm for graphs and trees, and can generate a topology ordering table of the secret graph, which is briefly described as going deep enough for each possible branch path, and each node can only access once. Regular expressions are typically used to retrieve, replace, text that meets a certain pattern (rule).
The technical scheme of the embodiment is suitable for banking and other financial systems as targets, simulates the mode of a web crawler, provides a static code level scanning function through a depth-first search algorithm, sets a search entry point for a specific regular matching mode, and forms a directed acyclic graph.
It should be appreciated that this embodiment requires defining a flow container, a component container, a text path container, and invoking a downstream component regular expression, and therefore requires defining an invocation endpoint because the overall idea is a depth-first search algorithm. All the components can be scanned according to the line, the currently scanned components are called as components to be processed, the components to be processed are scanned, and scanning information corresponding to the components to be processed can be obtained.
And the call judging module 20 is used for judging whether the component call exists in the component to be processed according to the scanning information.
It can be understood that whether the component to be processed has component call can be judged according to the scanning information corresponding to the component to be processed.
Extracting static text corresponding to the component to be processed from the scanning information; carrying out security verification on the static text, and extracting code information from the static text when the security verification passes; scanning the code information line by line to obtain a code scanning result; judging whether the component to be processed has component call or not according to the code scanning result.
It should be understood that the scan information may include static text, component names, and other information, which is not limited by the present embodiment. The static text corresponding to the component to be processed can be extracted from the scanning information, the static text can be subjected to security verification for ensuring the security of data, and code information is extracted from the static text when the security verification passes. The code information is scanned line by line, a code scanning result can be obtained, and whether the component to be processed has component call or not can be judged according to the code scanning result.
It should be appreciated that it may be further determined whether the scanned call is a call between components and if so, the component container needs to be updated while the flow container is updated.
And the call end point module 30 is used for judging whether the component to be processed is a call end point when the component to be processed is called.
It should be appreciated that when there is a component call for a component to be processed, it may be determined whether the component to be processed is a call endpoint based on a predefined call endpoint.
And the information adding module 40 is configured to, when the component to be processed is a call end point, search component information corresponding to the component to be processed from a preset component container, and add the component information to the preset flow container.
It should be understood that when the component to be processed is a call end point, the component name of the component to be processed can be obtained, whether the component to be processed has been scanned is determined according to the component name, when the component to be processed has been scanned, component information corresponding to the component to be processed is searched from a preset component container, and the component information is added into the preset flow container.
And searching a target file path according to the name of the component when the component to be processed is not scanned, determining a new component to be processed based on the target file path and a preset depth-first search algorithm, and executing the step of scanning the component to be processed to obtain scanning information.
And the node adding module 50 is configured to add the node corresponding to the component to be processed to a preset flow container when the component to be processed is not a call end point.
It should be understood that when the component to be processed is not a call end point, according to the defined data structure of the call node, the node corresponding to the component to be processed is assembled and put into the flow container.
The image generating module 60 is configured to traverse the data in the preset flow container, and generate a link directed acyclic graph according to the traversing result.
It should be appreciated that the process container may be traversed, forming a directed acyclic graph from its data structure definition, including the following information: the transaction of the portal is invoked, and the calling relation of the intermediate component is reached to the final invoked downstream transaction.
In this embodiment, scanning is performed on the component to be processed to obtain scanning information; judging whether the component to be processed has component call or not according to the scanning information; when the component call exists in the component to be processed, judging whether the component to be processed is a call end point or not; when the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into the preset flow container; when the component to be processed is not a call end point, adding a node corresponding to the component to be processed into a preset flow container; traversing the data in the preset flow container, and generating a link directed acyclic graph according to the traversing result, so that the calling link is displayed simply and intuitively in a graphical mode, and a large amount of manpower is saved.
Other embodiments or specific implementation methods of the link visualization apparatus according to the present invention may refer to the above method embodiments, and are not described herein.
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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in an estimator readable storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a smart device (which may be a cell phone, estimator, link visualization device, air conditioner, or network link visualization device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. A method of link visualization, the method comprising the steps of:
Scanning the component to be processed to obtain scanning information;
judging whether the component to be processed has component call or not according to the scanning information;
when the component call exists in the component to be processed, judging whether the component to be processed is a call end point or not;
When the component to be processed is a call end point, searching component information corresponding to the component to be processed from a preset component container, and adding the component information into a preset flow container;
when the component to be processed is not a call end point, adding a node corresponding to the component to be processed into a preset flow container;
Traversing the data in the preset flow container, and generating a link directed acyclic graph according to the traversing result;
when the component to be processed is a call end point, acquiring the component name of the component to be processed;
Judging whether the component to be processed is scanned or not according to the component name;
searching component information corresponding to the component to be processed from a preset component container when the component to be processed is scanned, and adding the component information into a preset flow container; searching a target file path according to the component name when the component to be processed is not scanned;
and determining a new component to be processed based on the target file path and a preset depth-first search algorithm, and executing the step of scanning the component to be processed to obtain scanning information.
2. The link visualization method according to claim 1, wherein before searching for the target file path according to the component name when the component to be processed is not scanned, further comprising:
traversing the components, and taking the traversed components as components to be selected;
Scanning a file path corresponding to the component to be selected, and generating a file path container according to the file path;
Accordingly, the searching the target file path according to the component name comprises the following steps:
and searching a target file path from the file path container according to the component name.
3. The link visualization method according to claim 2, wherein the searching for the target file path from the file path container according to the component name comprises:
Matching the component name with the component name to be selected in the mapping list;
and determining a target file path corresponding to the component name according to the matching result, and searching the target file path from the file path container.
4. The link visualization method of claim 3, wherein before the searching for the target file path from the file path container according to the component name, further comprising:
Acquiring a name of a component to be selected of the component to be selected;
Determining the corresponding relation between the names of the components to be selected and the file path according to the corresponding relation between the components to be selected and the file path;
And establishing a mapping list based on the corresponding relation between the names of the components to be selected and the file path.
5. A link visualization method as recited in any one of claims 1 to 3, wherein said determining whether there is a component call for the component to be processed based on the scan information comprises:
Extracting static text corresponding to the component to be processed from the scanning information;
carrying out security verification on the static text, and extracting code information from the static text when the security verification passes;
scanning the code information line by line to obtain a code scanning result;
Judging whether the component to be processed has component call or not according to the code scanning result.
6. A link visualization apparatus, the link visualization apparatus comprising:
the component scanning module is used for scanning the component to be processed to obtain scanning information;
The call judging module is used for judging whether the component to be processed has component call or not according to the scanning information;
the call terminal module is used for judging whether the component to be processed is a call terminal or not when the component to be processed is called;
the information adding module is used for searching the component information corresponding to the component to be processed from a preset component container when the component to be processed is a call end point, and adding the component information into a preset flow container;
the node adding module is used for adding the node corresponding to the component to be processed into a preset flow container when the component to be processed is not a call end point;
the image generation module is used for traversing the data in the preset flow container and generating a link directed acyclic graph according to the traversing result;
when the component to be processed is a call end point, acquiring the component name of the component to be processed;
Judging whether the component to be processed is scanned or not according to the component name;
searching component information corresponding to the component to be processed from a preset component container when the component to be processed is scanned, and adding the component information into a preset flow container; searching a target file path according to the component name when the component to be processed is not scanned;
and determining a new component to be processed based on the target file path and a preset depth-first search algorithm, and executing the step of scanning the component to be processed to obtain scanning information.
7. A link visualization device, the link visualization device comprising: a memory, a processor and a link visualization program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the link visualization method of any of claims 1 to 5.
8. A storage medium having stored thereon a link visualization program which, when executed by a processor, implements the steps of the link visualization method according to any of claims 1 to 5.
CN202110085492.9A 2021-01-22 2021-01-22 Link visualization method, device, equipment and storage medium Active CN112784133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110085492.9A CN112784133B (en) 2021-01-22 2021-01-22 Link visualization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110085492.9A CN112784133B (en) 2021-01-22 2021-01-22 Link visualization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112784133A CN112784133A (en) 2021-05-11
CN112784133B true CN112784133B (en) 2024-05-17

Family

ID=75758457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110085492.9A Active CN112784133B (en) 2021-01-22 2021-01-22 Link visualization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112784133B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852107A (en) * 2005-11-09 2006-10-25 华为技术有限公司 Relation information publishing, fetching method and system
CN106020950A (en) * 2016-05-12 2016-10-12 中国科学院软件研究所 Function call graph key node recognition and identification method based on complex network analysis
CN107632924A (en) * 2017-09-08 2018-01-26 携程旅游信息技术(上海)有限公司 Visual presentation method, system, equipment and storage medium are applied in alarm
CN108153664A (en) * 2016-12-06 2018-06-12 北京奇虎科技有限公司 A kind of static code scan method and device
CN109634660A (en) * 2018-10-16 2019-04-16 深圳壹账通智能科技有限公司 Program structure method for visualizing, equipment, storage medium and device
CN110569507A (en) * 2019-09-09 2019-12-13 北京金鑫魔方科技有限责任公司 semantic recognition method, device, equipment and storage medium
CN111259275A (en) * 2018-12-03 2020-06-09 阿里巴巴集团控股有限公司 Data tracking method, equipment and storage medium
CN111324480A (en) * 2020-02-24 2020-06-23 中国工商银行股份有限公司 Large host transaction fault positioning system and method
CN111508562A (en) * 2020-03-17 2020-08-07 北京荣之联科技股份有限公司 Visual display method, device, equipment and medium of flow descriptive language
CN112214289A (en) * 2019-07-11 2021-01-12 腾讯科技(深圳)有限公司 Task scheduling method and device, server and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4796185B2 (en) * 2007-05-25 2011-10-19 富士通株式会社 Business flow diagram generation program, business flow diagram generation device, and business flow diagram generation method
US8516301B2 (en) * 2011-04-08 2013-08-20 Ca, Inc. Visualizing transaction traces as flows through a map of logical subsystems

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852107A (en) * 2005-11-09 2006-10-25 华为技术有限公司 Relation information publishing, fetching method and system
CN106020950A (en) * 2016-05-12 2016-10-12 中国科学院软件研究所 Function call graph key node recognition and identification method based on complex network analysis
CN108153664A (en) * 2016-12-06 2018-06-12 北京奇虎科技有限公司 A kind of static code scan method and device
CN107632924A (en) * 2017-09-08 2018-01-26 携程旅游信息技术(上海)有限公司 Visual presentation method, system, equipment and storage medium are applied in alarm
CN109634660A (en) * 2018-10-16 2019-04-16 深圳壹账通智能科技有限公司 Program structure method for visualizing, equipment, storage medium and device
CN111259275A (en) * 2018-12-03 2020-06-09 阿里巴巴集团控股有限公司 Data tracking method, equipment and storage medium
CN112214289A (en) * 2019-07-11 2021-01-12 腾讯科技(深圳)有限公司 Task scheduling method and device, server and storage medium
CN110569507A (en) * 2019-09-09 2019-12-13 北京金鑫魔方科技有限责任公司 semantic recognition method, device, equipment and storage medium
CN111324480A (en) * 2020-02-24 2020-06-23 中国工商银行股份有限公司 Large host transaction fault positioning system and method
CN111508562A (en) * 2020-03-17 2020-08-07 北京荣之联科技股份有限公司 Visual display method, device, equipment and medium of flow descriptive language

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张俊 ; .基于递归树的递归调用分析.实验室研究与探索.2010,全文. *
陈忠湘 ; 詹瑾瑜 ; 郝宗波 ; .带控制流的静态函数调用分析方法.计算机工程.2011,全文. *

Also Published As

Publication number Publication date
CN112784133A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN111191221A (en) Method and device for configuring authority resources and computer readable storage medium
CN112597052A (en) Interface testing method and device and computer readable storage medium
CN110990008B (en) Page updating method and device, storage medium and electronic equipment
CN111865997B (en) WEB vulnerability detection method, device, equipment and medium based on passive traffic
CN111026765B (en) Dynamic processing method, device, storage medium and apparatus for strictly balanced binary tree
CN111339535A (en) Vulnerability prediction method and system for intelligent contract codes, computer equipment and storage medium
CN113535577A (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN112035676B (en) User operation behavior knowledge graph construction method and device
CN113900907A (en) Mapping construction method and system
CN112784133B (en) Link visualization method, device, equipment and storage medium
CN117474091A (en) Knowledge graph construction method, device, equipment and storage medium
CN111061637B (en) Interface testing method, interface testing device and storage medium
CN110706035B (en) Updating effect evaluation method and device, storage medium and electronic equipment
KR20160032653A (en) Method and apparatus for ranking candiate character and method and device for inputting character
CN109361707B (en) Batch query method, device, server and storage medium
CN110688400A (en) Data processing method, data processing device, computer equipment and storage medium
CN112148724B (en) Equipment identification processing method and system, computer equipment and readable storage medium
CN113674083A (en) Internet financial platform credit risk monitoring method, device and computer system
CN113792189A (en) Crowd-sourcing software development contribution efficiency evaluation method, device, equipment and medium
CN113468446A (en) Method, system and equipment for supporting identification of third-party two-dimensional code data
CN113139182A (en) Data intrusion detection method for online e-commerce platform
CN112130860A (en) JSON object analysis method and device, electronic device and storage medium
CN112015378A (en) Skeleton screen page generation method and device, computer equipment and storage medium
CN112199092A (en) Application development method and device and electronic equipment
CN111241277A (en) Sparse graph-based user identity identification 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