WO2022100032A1 - System analysis visualization method and apparatus, electronic device, and computer readable storage medium - Google Patents

System analysis visualization method and apparatus, electronic device, and computer readable storage medium Download PDF

Info

Publication number
WO2022100032A1
WO2022100032A1 PCT/CN2021/091439 CN2021091439W WO2022100032A1 WO 2022100032 A1 WO2022100032 A1 WO 2022100032A1 CN 2021091439 W CN2021091439 W CN 2021091439W WO 2022100032 A1 WO2022100032 A1 WO 2022100032A1
Authority
WO
WIPO (PCT)
Prior art keywords
data set
analyzed
file
class
data
Prior art date
Application number
PCT/CN2021/091439
Other languages
French (fr)
Chinese (zh)
Inventor
楚亚兵
黑晓群
Original Assignee
平安普惠企业管理有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安普惠企业管理有限公司 filed Critical 平安普惠企业管理有限公司
Publication of WO2022100032A1 publication Critical patent/WO2022100032A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/323Visualisation of programs or trace data

Definitions

  • the present application relates to the field of big data technologies, and in particular, to a system analysis and visualization method, apparatus, electronic device, and computer-readable storage medium.
  • the back of a business system contains large-scale code files, data files, etc., and the business system is not static after it is put into use, and often requires later maintenance, updates, etc. Therefore, it is necessary to analyze and visualize the internal code files of the system, In order to facilitate the maintenance or update of subsequent systems.
  • the current system analysis visualization mainly shows the main modules of the system according to the document records.
  • the inventor realized that this method cannot clearly show the logical calling relationship between the internal codes of the system, and the content of the business system is not comprehensive enough and clearly displayed. , which is not conducive to subsequent maintenance or update of the system.
  • a system analysis and visualization method provided by this application includes:
  • the system content corresponding to the system data set to be analyzed is displayed.
  • the application also provides a system analysis visualization device, the device includes:
  • the data acquisition module is used to acquire the data set of the system to be analyzed
  • an interface relation call graph module configured to construct an interface call relation graph according to the reference relation existing in the data set of the system to be analyzed
  • a data model diagram module used for finding entity class files in the system data set to be analyzed, and constructing a data model diagram according to the entity class files;
  • a file difference table module used to obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table
  • the display output module is configured to display the system content corresponding to the to-be-analyzed system data set according to the interface call relationship diagram, the data model diagram and the system file difference table.
  • the present application also provides an electronic device, the electronic device comprising:
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of:
  • the system content corresponding to the system data set to be analyzed is displayed.
  • the present application also provides a computer-readable storage medium, comprising a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein the computer program is
  • the processor implements the following steps when executing:
  • the system content corresponding to the system data set to be analyzed is displayed.
  • FIG. 1 is a schematic flowchart of a system analysis visualization method provided by an embodiment of the present application.
  • FIG. 2 is a schematic block diagram of a system analysis visualization device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the internal structure of an electronic device for implementing a system analysis visualization method provided by an embodiment of the present application
  • the execution subject of the system analysis visualization method provided by the embodiment of the present application includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application.
  • the system analysis and visualization method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform.
  • the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
  • the present application provides a system analysis visualization method.
  • FIG. 1 a schematic flowchart of a system analysis and visualization method provided by an embodiment of the present application is shown. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
  • the system analysis visualization method includes:
  • the data set of the system to be analyzed is a complete set of source codes of a business system, including multiple class files, toolkits, configuration files, and the like.
  • various programming languages are used during system development, and commonly used programming languages include java, C/C++, php, python, and the like.
  • object-oriented programming languages based on classes and objects, all operations in the language are carried out through objects.
  • Many functions can be defined in a class code file, and the functions can be implemented by instantiating the aforementioned class objects.
  • the system data set to be analyzed in the embodiments of the present application is data in a business system based on class objects.
  • the system data set to be analyzed may be obtained from a preset server.
  • the system data set to be analyzed can also be obtained from a node of a blockchain, and the security of the system data set to be analyzed is improved by storing the system data set to be analyzed in the blockchain.
  • a business system contains a large number of class files, and there is a mutual calling relationship between various class files, and a system function is jointly implemented by a plurality of class files.
  • the interface calling relationship diagram is a tree diagram, and objects are organized in a parent-child hierarchical structure.
  • the interface call relationship diagram includes a plurality of root nodes and sub-nodes.
  • the interface call relationship diagram can display the distribution of modules in the data set of the system to be analyzed and the calling relationship between each class file, and can also display the corresponding Detailed functions of the business system.
  • the root class file refers to class files that are not referenced by other class files, such as interfaces, timed tasks, message entries, and abandoned orphan classes. Further, using the root class finding method to find the root class files in the system data set to be analyzed, including:
  • the currently traversed class file is determined as the root class file.
  • the header data refers to data information such as a package name at the beginning of a class file, reference to other class files, and other data information, and the identification character "import" is used when referencing other class files.
  • the interface calling relationship diagram may also be improved, including: counting the number of times each class file is cited; obtaining annotations and annotations of the class files in the system data set to be analyzed. ; Add the above data information to the corresponding class file in the interface call graph.
  • the user can quickly learn about the business system corresponding to the system data set to be analyzed through the interface calling relationship diagram, so as to perform further analysis. For example, it can quickly locate the external interface and the calling relationship of the internal interface, and can also analyze which classes are closely related and which are sparse.
  • the rationality of module division in the business system provides a quantitative basis for module division; it can also analyze which classes in the business system are isolated and which call chains have been abandoned, so as to simplify and optimize the business system.
  • the types of class files in the system data set to be analyzed in the embodiments of the present application include various types, such as entity classes, service classes, tool classes, and configuration classes.
  • entity class is data describing objective things in the real world, which can refer to people, such as teachers, students, etc., or objects, such as books, warehouses, and the like.
  • the searching for entity class files in the system data set to be analyzed includes:
  • the preset mark is a method mark used by the system developer to distinguish various class files when constructing the class file. For example, if a class file is an entity class, add "Entity" at the end of the name when naming, If the class file is a service class, add "Service” at the end of the name when naming.
  • the data model diagram described in the embodiment of the present application may be an E-R diagram (Entity Relationship Diagram).
  • Diagram, entity-relationship diagram used to describe information requirements or types of information to be stored in the database
  • the data model diagram includes entities, attributes of entities and associations between entities.
  • the building a data model diagram according to the entity class file includes:
  • An association relationship is added to each entity in the data model diagram according to the annotation in the entity class file.
  • the member variable is an attribute of the class file, which is defined in the class file and can be accessed in the whole class file.
  • the annotation is a code-level description, which is declared in a class file and used to describe or annotate the class file, and the association between the class file and other class files can be obtained according to the annotation.
  • various data are generally stored in the database in the form of data tables, and each data table and its attributes and the relationship between the data tables represent the data structure in the actual business system.
  • the data table in the database and the entity class in the system have a one-to-one correspondence. Therefore, the data model diagram in the embodiment of the application can completely reflect the data structure relationship, and can also reflect the relationship between each entity class. relationship between them.
  • the update system data set described in the embodiment of the present application is a complete set of source codes after the business system is updated.
  • the S4 includes:
  • the modified part is identified in the subsystem data set, and the modified part is saved in a file difference table.
  • the types are classified according to the functions of each file, such as entity classes, service classes, tool classes, and configuration classes.
  • the file types are different, and the data forms of the files are also different, so different comparison algorithms need to be used to compare the files in the update system data set.
  • the preset comparison algorithms include feature vector comparison method, semantic analysis comparison method and similarity comparison method algorithm etc.
  • comparing each file in each of the subsystem data sets with a file whose name is consistent with the file in the system data set to be analyzed includes:
  • a similarity comparison algorithm is used to calculate the similarity between the comparison data and the original data, and when the similarity is lower than a preset threshold, the comparison data is marked.
  • the similarity comparison algorithm uses continuous strings as unit blocks, the larger the same unit blocks, the more similar they are, and the smaller and less similar unit blocks of different parts are, and the similarity value is calculated based on this algorithm. .
  • the file difference table can clearly display the content of each change, which is convenient for users to accurately assess the impact of each change on the business logic of the system, reduce the risks brought by unknown changes, ensure the stability of the system, and improve the security quality of the system.
  • the obtained interface call relationship diagram, data model diagram and file difference table are combined, and the obtained multiple diagrams are used as visualization schemes to display the system content corresponding to the system data set to be analyzed.
  • the interface calling relationship diagram, the data model diagram and the file difference table in the visualization scheme are constructed according to the data set of the system to be analyzed, and can display the corresponding data sets of the system to be analyzed in a clear and intuitive way. System content, so that users do not need to face complex and large-scale code data.
  • the visualization scheme is concise and easy to understand, which is convenient for further processing of the system in the follow-up, and improves the work efficiency.
  • the user can view the modified file in the system through the file difference table, and can view the position and function of the modified file in the entire system in the interface call relationship diagram according to the modified file name, and can view the modified file through the data model diagram.
  • the visualization solution described in the embodiment of the present application shows, in the form of a chart, each module included in the complex system code package and the internal calling relationship, and also shows the overall data structure of the system and the changes of the system. Users, such as developers or maintainers, can quickly understand the basic situation of the business system by browsing the visualization solution, which is convenient for the user to maintain or optimize the business system in the future.
  • the embodiment of the present application presents the module division of the system and the logical calling relationship of internal codes by constructing an interface call relationship diagram; by constructing a data model diagram, it reflects the data structure relationship in the system and the association relationship between various entity classes in the system;
  • the system file difference table clearly shows the content of each change in the system; it is displayed in the form of an interface call relationship diagram, a data model diagram and a system file difference table, which can comprehensively and intuitively display the system content, which is convenient for subsequent system changes. for maintenance or updates. Therefore, the system analysis visualization method, device and computer-readable storage medium proposed in this application can achieve the purpose of realizing more comprehensive and clear system analysis visualization.
  • FIG. 2 it is a schematic diagram of a module of the system analysis and visualization device of the present application.
  • the system analysis and visualization apparatus 100 described in this application can be installed in an electronic device.
  • the system analysis and visualization apparatus may include a data acquisition module 101 , an interface relationship call graph module 102 , a data model graph module 103 , a file difference table module 104 and a presentation output module 105 .
  • the modules described in the present invention can also be called units, which refer to a series of computer program segments that can be executed by the electronic device processor and can perform fixed functions, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the data acquisition module 101 is used to acquire the system data set to be analyzed.
  • the data set of the system to be analyzed is a complete set of source codes of a business system, including multiple class files, toolkits, configuration files, and the like.
  • various programming languages are used during system development, and commonly used programming languages include java, C/C++, php, python, and the like.
  • object-oriented programming languages based on classes and objects, all operations in the language are carried out through objects.
  • Many functions can be defined in a class code file, and the functions can be implemented by instantiating the aforementioned class objects.
  • the system data set to be analyzed in the embodiments of the present application is data in a business system based on class objects.
  • the system data set to be analyzed may be obtained from a preset server.
  • the system data set to be analyzed can also be obtained from a node of a blockchain, and the security of the system data set to be analyzed is improved by storing the system data set to be analyzed in the blockchain.
  • the interface relation call graph module 102 is configured to construct an interface call relation graph according to the reference relation existing in the to-be-analyzed system data set.
  • a business system contains a large number of class files, and there is a mutual calling relationship between various class files, and a system function is jointly implemented by a plurality of class files.
  • the interface calling relationship diagram is a tree diagram, and objects are organized in a parent-child hierarchical structure.
  • the interface call relationship diagram includes a plurality of root nodes and sub-nodes.
  • the interface call relationship diagram can display the distribution of modules in the system data set to be analyzed and the call relationship between each class file, and can also display the corresponding Detailed functions of the business system.
  • interface relationship call graph module 102 is specifically used for:
  • the root class file refers to class files that are not referenced by other class files, such as interfaces, timed tasks, message entries, and abandoned orphan classes. Further, using the root class finding method to find the root class files in the system data set to be analyzed, including:
  • the currently traversed class file is determined as the root class file.
  • the header data refers to data information such as a package name at the beginning of a class file, reference to other class files, and other data information, and the identification character "import" is used when referencing other class files.
  • the interface calling relationship diagram may also be improved, including: counting the number of times each class file is cited; obtaining annotations and annotations of the class files in the system data set to be analyzed. ; Add the above data information to the corresponding class file in the interface call graph.
  • the user can quickly learn about the business system corresponding to the system data set to be analyzed through the interface calling relationship diagram, so as to perform further analysis. For example, it can quickly locate the external interface and the calling relationship of the internal interface, and can also analyze which classes are closely related and which are sparse.
  • the rationality of module division in the business system provides a quantitative basis for module division; it can also analyze which classes in the business system are isolated and which call chains have been abandoned, so as to simplify and optimize the business system.
  • the data model diagram module 103 is configured to search for entity class files in the data set of the system to be analyzed, and construct a data model diagram according to the entity class files.
  • the types of class files in the system data set to be analyzed described in the embodiments of the present application include various types, such as entity classes, service classes, tool classes, and configuration classes.
  • entity class is data describing objective things in the real world, which can refer to people, such as teachers, students, etc., or objects, such as books, warehouses, and the like.
  • the data model diagram module 103 specifically performs the following operations:
  • the preset mark is a method mark used by system developers to distinguish various class files when building a class file. For example, if a class file is an entity class, add "Entity" at the end of the name when naming, If the class file is a service class, add "Service” at the end of the name when naming.
  • the data model diagram described in the embodiment of the present application may be an E-R diagram (Entity Relationship Diagram, entity-relationship diagram), used to describe the information requirements or the type of information to be stored in the database, the data model diagram includes entities, attributes of entities and associations between entities.
  • E-R diagram Entity Relationship Diagram, entity-relationship diagram
  • the data model diagram module 103 specifically performs the following operations:
  • An association relationship is added to each entity in the data model diagram according to the annotation in the entity class file.
  • the member variable is an attribute of the class file, which is defined in the class file and can be accessed in the whole class file.
  • the annotation is a code-level description, which is declared in a class file and used to describe or annotate the class file, and the association between the class file and other class files can be obtained according to the annotation.
  • various data are generally stored in the database in the form of data tables, and each data table and its attributes and the relationship between the data tables represent the data structure in the actual business system.
  • the data table in the database and the entity class in the system have a one-to-one correspondence. Therefore, the data model diagram in the embodiment of the application can completely reflect the data structure relationship, and can also reflect the relationship between each entity class. relationship between them.
  • the file difference table module 104 is configured to acquire and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table.
  • the update system data set described in the embodiment of the present application is a complete set of source codes after the business system is updated.
  • file difference table module 104 is specifically used for:
  • the modified part is identified in the subsystem data set, and the modified part is saved in a file difference table.
  • the types are classified according to the functions of each file, such as entity classes, service classes, tool classes, and configuration classes.
  • the file types are different, and the data forms of the files are also different. Therefore, different comparison algorithms need to be used to compare the files in the update system data set.
  • the preset comparison algorithms include feature vector comparison methods, semantic analysis comparison methods, and similarity comparison methods. algorithm etc.
  • comparing each file in each of the subsystem data sets with a file whose name is consistent with the file in the system data set to be analyzed includes:
  • a similarity comparison algorithm is used to calculate the similarity between the comparison data and the original data, and when the similarity is lower than a preset threshold, the comparison data is marked.
  • the similarity comparison algorithm uses continuous strings as unit blocks, the larger the same unit blocks, the more similar they are, and the smaller and less similar unit blocks of different parts are, and the similarity value is calculated based on this algorithm. .
  • the file difference table can clearly display the content of each change, which is convenient for users to accurately assess the impact of each change on the business logic of the system, reduce the risks brought by unknown changes, ensure the stability of the system, and improve the security quality of the system.
  • the display output module 105 is configured to display the system content corresponding to the system data set to be analyzed according to the interface call relationship diagram, the data model diagram and the system file difference table.
  • the obtained interface calling relationship diagram, data model diagram and file difference table are combined, and the obtained multiple diagrams are used as visualization schemes to display the system content corresponding to the system data set to be analyzed.
  • the interface calling relationship diagram, the data model diagram and the file difference table in the visualization scheme are constructed according to the data set of the system to be analyzed, and can display the corresponding data sets of the system to be analyzed in a clear and intuitive way. System content, so that users do not need to face complex and large-scale code data.
  • the visualization scheme is concise and easy to understand, which is convenient for further processing of the system in the follow-up, and improves the work efficiency.
  • the user can view the modified file in the system through the file difference table, and can view the position and function of the modified file in the entire system in the interface call relationship diagram according to the modified file name, and can view the modified file through the data model diagram.
  • the visualization solution described in the embodiment of the present application shows, in the form of a chart, each module included in the complex system code package and the internal calling relationship, and also shows the overall data structure of the system and the changes of the system. Users, such as developers or maintainers, can quickly understand the basic situation of the business system by browsing the visualization solution, which is convenient for the user to maintain or optimize the business system in the future.
  • FIG. 3 it is a schematic structural diagram of an electronic device implementing the system analysis and visualization method of the present application.
  • the electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a system analysis visualization program 12.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 .
  • the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital Digital, SD) card, flash memory card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as the code of the system analysis visualization program 12, etc., but also can be used to temporarily store data that has been output or will be output.
  • the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits.
  • Central Processing Unit CPU
  • microprocessor digital processing chip
  • graphics processor and combination of various control chips, etc.
  • the processor 10 is the control core (Control Core) of the electronic device. Unit), using various interfaces and lines to connect various components of the entire electronic device, by running or executing programs or modules stored in the memory 11 (for example, executing a system analysis visualization program, etc.), and calling the memory 11 to perform various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard structure (extended). industry standard architecture, referred to as EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the figure. components, or a combination of certain components, or a different arrangement of components.
  • the electronic device 1 may also include a power source (such as a battery) for powering the various components, preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power source can be managed by the power source.
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • a network interface optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) Touch, etc.
  • the display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
  • the system analysis visualization program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, can realize:
  • the system content corresponding to the system data set to be analyzed is displayed according to the interface calling relationship diagram, the data model diagram and the system file difference table.
  • the modules/units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium, and the computer-readable storage medium can be stored in a computer-readable storage medium. It is volatile and can also be non-volatile.
  • the computer-readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) ).
  • the computer-readable storage medium includes a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein, the computer program is processed The following steps are implemented when the device is executed:
  • the system content corresponding to the system data set to be analyzed is displayed.
  • modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
  • the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The present application relates to big data technology. Disclosed is a system analysis visualization method, comprising: acquiring a system data set to be analyzed; constructing an interface call graph according to a reference relationship present in the system data set to be analyzed; searching for entity class files in the system data set to be analyzed, and constructing a data model diagram according to the entity class files; acquiring an updated system data set, and comparing same with the system data set to be analyzed to obtain a system file difference table; and displaying, according to the interface call graph, the data model diagram, and the system file difference table, system content corresponding to the system data set to be analyzed. Furthermore, the present application also provides a system analysis visualization apparatus, and a computer readable storage medium. In addition, the present application further relates to blockchain technology. The system data set to be analyzed can be stored in a blockchain node. The present application can implement more comprehensive and clear system analysis visualization.

Description

系统分析可视化方法、装置、电子设备及计算机可读存储介质System analysis visualization method, apparatus, electronic device, and computer-readable storage medium
本申请要求于2020年11月10日提交中国专利局、申请号为CN202011246852.0、名称为“系统分析可视化方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number CN202011246852.0 and the title of "System Analysis Visualization Method, Device, Electronic Device and Computer-readable Storage Medium" filed with the China Patent Office on November 10, 2020, which The entire contents of this application are incorporated by reference.
技术领域technical field
本申请涉及大数据技术领域,尤其涉及一种系统分析可视化方法、装置、电子设备及计算机可读存储介质。The present application relates to the field of big data technologies, and in particular, to a system analysis and visualization method, apparatus, electronic device, and computer-readable storage medium.
背景技术Background technique
一个业务系统的背后包含大规模的代码文件、数据文件等,而且业务系统在完成进入使用后也不是一成不变的,往往还需要后期的维护,更新等,因此需要对系统内部代码文件进行分析可视化,以便于对后续系统进行维护或更新。The back of a business system contains large-scale code files, data files, etc., and the business system is not static after it is put into use, and often requires later maintenance, updates, etc. Therefore, it is necessary to analyze and visualize the internal code files of the system, In order to facilitate the maintenance or update of subsequent systems.
技术问题technical problem
目前的系统分析可视化主要是根据文档记录,展示出系统的主要模块,发明人意识到这种方式无法清晰的展示出系统内部代码之间逻辑调用关系,对业务系统的内容展示的不够全面,清晰,不利于后续对系统进行维护或更新。The current system analysis visualization mainly shows the main modules of the system according to the document records. The inventor realized that this method cannot clearly show the logical calling relationship between the internal codes of the system, and the content of the business system is not comprehensive enough and clearly displayed. , which is not conducive to subsequent maintenance or update of the system.
技术解决方案technical solutions
本申请提供的一种系统分析可视化方法,包括:A system analysis and visualization method provided by this application includes:
获取待分析系统数据集;Obtain the data set of the system to be analyzed;
根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。According to the interface calling relationship diagram, the data model diagram and the system file difference table, the system content corresponding to the system data set to be analyzed is displayed.
本申请还提供一种系统分析可视化装置,所述装置包括:The application also provides a system analysis visualization device, the device includes:
数据获取模块,用于获取待分析系统数据集;The data acquisition module is used to acquire the data set of the system to be analyzed;
接口关系调用图模块,用于根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;an interface relation call graph module, configured to construct an interface call relation graph according to the reference relation existing in the data set of the system to be analyzed;
数据模型图模块,用于查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;a data model diagram module, used for finding entity class files in the system data set to be analyzed, and constructing a data model diagram according to the entity class files;
文件差异表模块,用于获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;A file difference table module, used to obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
展示输出模块,用于根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。The display output module is configured to display the system content corresponding to the to-be-analyzed system data set according to the interface call relationship diagram, the data model diagram and the system file difference table.
本申请还提供一种电子设备,所述电子设备包括:The present application also provides an electronic device, the electronic device comprising:
至少一个处理器;以及,at least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of:
获取待分析系统数据集;Obtain the data set of the system to be analyzed;
根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。According to the interface calling relationship diagram, the data model diagram and the system file difference table, the system content corresponding to the system data set to be analyzed is displayed.
本申请还提供一种计算机可读存储介质,包括存储数据区和存储程序区,其中,所述存储数据区存储创建的数据,所述存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:The present application also provides a computer-readable storage medium, comprising a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein the computer program is The processor implements the following steps when executing:
获取待分析系统数据集;Obtain the data set of the system to be analyzed;
根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。According to the interface calling relationship diagram, the data model diagram and the system file difference table, the system content corresponding to the system data set to be analyzed is displayed.
附图说明Description of drawings
图1为本申请一实施例提供的系统分析可视化方法的流程示意图;1 is a schematic flowchart of a system analysis visualization method provided by an embodiment of the present application;
图2为本申请一实施例提供的系统分析可视化装置的模块示意图;FIG. 2 is a schematic block diagram of a system analysis visualization device provided by an embodiment of the present application;
图3为本申请一实施例提供的实现系统分析可视化方法的电子设备的内部结构示意图;3 is a schematic diagram of the internal structure of an electronic device for implementing a system analysis visualization method provided by an embodiment of the present application;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the purpose of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
本发明的实施方式Embodiments of the present invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请实施例提供的系统分析可视化方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述系统分析可视化方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。The execution subject of the system analysis visualization method provided by the embodiment of the present application includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the system analysis and visualization method can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
本申请提供一种系统分析可视化方法。参照图1所示,为本申请一实施例提供的系统分析可视化方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。The present application provides a system analysis visualization method. Referring to FIG. 1 , a schematic flowchart of a system analysis and visualization method provided by an embodiment of the present application is shown. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
在本实施例中,系统分析可视化方法包括:In this embodiment, the system analysis visualization method includes:
S1、获取待分析系统数据集。S1. Obtain a system data set to be analyzed.
本申请实施例中,所述待分析系统数据集是一个业务系统的全套源代码,包括多个类文件、工具包、配置文件等。In the embodiment of the present application, the data set of the system to be analyzed is a complete set of source codes of a business system, including multiple class files, toolkits, configuration files, and the like.
优选地,系统开发时使用的编程语言多种多样,常用的包括java、C/C++、php、python等。而在面向对象的编程语言中,以类和对象为基础,语言中的所有操作都是通过对象进行的,一个类代码文件中可以定义很多功能,并通过实例化前述类对象来实现功能。本申请实施例中所述待分析系统数据集是以类对象为基础的业务系统中的数据。Preferably, various programming languages are used during system development, and commonly used programming languages include java, C/C++, php, python, and the like. In object-oriented programming languages, based on classes and objects, all operations in the language are carried out through objects. Many functions can be defined in a class code file, and the functions can be implemented by instantiating the aforementioned class objects. The system data set to be analyzed in the embodiments of the present application is data in a business system based on class objects.
详细地,所述待分析系统数据集可以从预设的服务器中获取。Specifically, the system data set to be analyzed may be obtained from a preset server.
优选地,所述待分析系统数据集还可以从一区块链的节点获取,通过将所述待分析系统数据集存储于区块链中,提高所述待分析系统数据集的安全性。Preferably, the system data set to be analyzed can also be obtained from a node of a blockchain, and the security of the system data set to be analyzed is improved by storing the system data set to be analyzed in the blockchain.
S2、根据所述待分析系统数据集中存在的引用关系构建接口调用关系图。S2. Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed.
较佳地,一个业务系统中会包含大量类文件,各种类文件之间存在相互调用关系,由多个类文件共同实现一个系统功能。Preferably, a business system contains a large number of class files, and there is a mutual calling relationship between various class files, and a system function is jointly implemented by a plurality of class files.
本申请实施例中,所述接口调用关系图是一种树形图,以父子层次结构来组织对象。所述接口调用关系图中包括多个根节点和子节点,通过所述接口调用关系图可以展示所述待分析系统数据集中的模块分布情况和各个类文件之间的调用关系,还可以展示出对应业务系统的详细功能。In this embodiment of the present application, the interface calling relationship diagram is a tree diagram, and objects are organized in a parent-child hierarchical structure. The interface call relationship diagram includes a plurality of root nodes and sub-nodes. The interface call relationship diagram can display the distribution of modules in the data set of the system to be analyzed and the calling relationship between each class file, and can also display the corresponding Detailed functions of the business system.
详细地,所述根据所述待分析系统数据集中各个类之间的引用关系构建接口调用关系图,包括:In detail, the construction of the interface calling relationship diagram according to the reference relationship between the various classes in the system data set to be analyzed includes:
利用根类寻找法查找所述待分析系统数据集中的根类文件,并将所述根类文件作为根节点;Utilize the root class search method to find the root class file in the data set of the system to be analyzed, and use the root class file as the root node;
在所述待分析系统数据集中查找引用了所述根类文件的类文件,并将所述根类文件的类文件作为所述根节点的子节点;Find a class file that references the root class file in the system data set to be analyzed, and use the class file of the root class file as a child node of the root node;
在所述待分析系统数据集中查找引用了与所述子节点对应的类文件类文件,并将与所述子节点对应的类文件的类文件作为所述子节点的下一子节点;Search and reference the class file class file corresponding to the child node in the system data set to be analyzed, and use the class file of the class file corresponding to the child node as the next child node of the child node;
重复上述步骤,直到查找的类文件没有被其他类文件引用为止,得到所述待分析系统数据集对应的所述接口调用关系图。The above steps are repeated until the searched class file is not referenced by other class files, and the interface calling relationship diagram corresponding to the system data set to be analyzed is obtained.
较佳地,所述根类文件是指没有被其他类文件引用的类文件,如接口、定时任务、消息的入口和废弃的孤立类等。进一步地,所述利用根类寻找法查找所述待分析系统数据集中的根类文件,包括:Preferably, the root class file refers to class files that are not referenced by other class files, such as interfaces, timed tasks, message entries, and abandoned orphan classes. Further, using the root class finding method to find the root class files in the system data set to be analyzed, including:
遍历所述待分析系统数据集中的类文件;Traverse the class files in the system data set to be analyzed;
提取当前遍历的类文件的头部数据;Extract the header data of the currently traversed class file;
若所述头部数据中没有引用其他的类文件,则将所述当前遍历的类文件判定为根类文件。If no other class file is referenced in the header data, the currently traversed class file is determined as the root class file.
其中,所述头部数据是指一个类文件在开头的包名、引用其他类文件等数据信息,在引用其他类文件时,会使用标识字符“import”。The header data refers to data information such as a package name at the beginning of a class file, reference to other class files, and other data information, and the identification character "import" is used when referencing other class files.
可选地,本申请一可选实施例中,还可以对所述接口调用关系图进行完善,包括:统计出各个类文件被引用次数;获取所述待分析系统数据集中类文件的注解和注释;将上述数据信息添加至所述接口调用图中对应类文件处。Optionally, in an optional embodiment of the present application, the interface calling relationship diagram may also be improved, including: counting the number of times each class file is cited; obtaining annotations and annotations of the class files in the system data set to be analyzed. ; Add the above data information to the corresponding class file in the interface call graph.
优选地,用户通过所述接口调用关系图快速了解所述待分析系统数据集对应的业务系统,以便进行下一步地分析。如,可以快速定位到对外的接口,以及内部接口调用关系,同时也可以分析出哪些类之间的关系紧密,哪些类之间的关系稀疏;可以根据模块划分高内聚低耦合的原则,分析业务系统中模块划分的合理性,对模块划分提供一个量化的依据;还可以分析业务系统中哪些类是孤立的,哪些调用链已经废弃,从而进行精简,有利于业务系统的优化。Preferably, the user can quickly learn about the business system corresponding to the system data set to be analyzed through the interface calling relationship diagram, so as to perform further analysis. For example, it can quickly locate the external interface and the calling relationship of the internal interface, and can also analyze which classes are closely related and which are sparse. The rationality of module division in the business system provides a quantitative basis for module division; it can also analyze which classes in the business system are isolated and which call chains have been abandoned, so as to simplify and optimize the business system.
S3、查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图。S3. Find the entity class file in the data set of the system to be analyzed, and construct a data model diagram according to the entity class file.
本申请实施例中所述待分析系统数据集中类文件的类型包括多种,如实体类、服务类、工具类和配置类等。其中,所述实体类是描述现实世界中的客观事物的数据,可以指人,如教师、学生等,也可以指物,如书、仓库等。The types of class files in the system data set to be analyzed in the embodiments of the present application include various types, such as entity classes, service classes, tool classes, and configuration classes. The entity class is data describing objective things in the real world, which can refer to people, such as teachers, students, etc., or objects, such as books, warehouses, and the like.
详细地,所述查找所述待分析系统数据集中的实体类文件,包括:Specifically, the searching for entity class files in the system data set to be analyzed includes:
根据所述待分析系统数据集中类文件中预设的标记获取类型为实体类的类文件;Obtain a class file whose type is an entity class according to a preset mark in the class file in the data set of the system to be analyzed;
将所述类型为实体类的类文件汇集,得到多个实体类文件。Collecting the class files whose type is entity class to obtain a plurality of entity class files.
其中,所述预设的标记是系统开发人员在构建类文件时对各种类文件进行区分的方法标记,例如,若一个类文件为实体类,则在命名时在名称末尾加“Entity”,若所述类文件为服务类,则在命名时在名称末尾加“Service”。The preset mark is a method mark used by the system developer to distinguish various class files when constructing the class file. For example, if a class file is an entity class, add "Entity" at the end of the name when naming, If the class file is a service class, add "Service" at the end of the name when naming.
较佳地,本申请实施例中所述数据模型图可以是E-R图(Entity Relationship Diagram,实体-联系图),用来描述信息需求或要存储在数据库中的信息的类型,所述数据模型图包括实体、实体的属性和实体间的关联关系。Preferably, the data model diagram described in the embodiment of the present application may be an E-R diagram (Entity Relationship Diagram). Diagram, entity-relationship diagram), used to describe information requirements or types of information to be stored in the database, the data model diagram includes entities, attributes of entities and associations between entities.
详细地,所述根据所述实体类文件构建数据模型图,包括:In detail, the building a data model diagram according to the entity class file includes:
根据所述实体类文件的类名确定数据模型图中的实体;Determine the entity in the data model diagram according to the class name of the entity class file;
根据所述实体类文件内包含的成员变量确定所述数据模型图中对应实体的属性;Determine the attribute of the corresponding entity in the data model diagram according to the member variable contained in the entity class file;
根据所述实体类文件中的注解为所述数据模型图中各实体添加关联关系。An association relationship is added to each entity in the data model diagram according to the annotation in the entity class file.
其中,所述成员变量是类文件的属性,定义在类文件中,在整个类文件中都可以被访问。所述注解是一种代码级别的说明,在类文件中进行声明,用来所述类文件进行说明或注释,根据所述注解可以得到所述类文件与其他类文件之间的关联。Wherein, the member variable is an attribute of the class file, which is defined in the class file and can be accessed in the whole class file. The annotation is a code-level description, which is declared in a class file and used to describe or annotate the class file, and the association between the class file and other class files can be obtained according to the annotation.
优选地,在实际的业务系统开发中,各种数据一般以数据表的形式保存在数据库中,各个数据表及其属性以及各数据表之间的关系代表了实际业务系统中的数据结构,本申请实施例中数据库中的数据表与系统中的实体类为一一对应关系,因此,本申请实施例通过所述数据模型图可以完整的反映出数据结构关系,还可以反映出各个实体类之间具有的关联关系。Preferably, in the actual business system development, various data are generally stored in the database in the form of data tables, and each data table and its attributes and the relationship between the data tables represent the data structure in the actual business system. In the application embodiment, the data table in the database and the entity class in the system have a one-to-one correspondence. Therefore, the data model diagram in the embodiment of the application can completely reflect the data structure relationship, and can also reflect the relationship between each entity class. relationship between them.
S4、获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表。S4. Obtain the updated system data set, and compare it with the to-be-analyzed system data set to obtain a system file difference table.
详细地,一个业务系统在开发完成后还需要进行后期的维护或者功能优化,因此,还需要对业务系统进行更新。本申请实施例中所述更新系统数据集是对业务系统更新后的全套源代码。In detail, after the development of a business system is completed, post-maintenance or function optimization needs to be performed. Therefore, the business system also needs to be updated. The update system data set described in the embodiment of the present application is a complete set of source codes after the business system is updated.
详细地,所述S4包括:In detail, the S4 includes:
获取更新系统数据集;Get the update system dataset;
将所述更新系统数据集按照类型进行划分,得到多个子系统数据集;Dividing the update system data set according to type to obtain multiple subsystem data sets;
遍历每个所述子系统数据集,根据所述子系统数据集的类型采用与所述类型对应的预设对比算法,对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,识别每个所述子系统数据集中文件的修改部分;Traverse each of the subsystem data sets, adopt a preset comparison algorithm corresponding to the type according to the type of the subsystem data set, and compare each file in each of the subsystem data sets with those in the to-be-analyzed data set. Compare the files in the system data set with the same file name, and identify the modified part of the file in each of the subsystem data sets;
在所述子系统数据集中将所述修改部分进行标识,并将所述修改部分保存至文件差异表中。The modified part is identified in the subsystem data set, and the modified part is saved in a file difference table.
其中,所述类型是根据各文件的作用进行划分的,如实体类、服务类、工具类和配置类等。文件类型不同,文件的数据形式也不同,因此需要采取不同对比算法对所述更新系统数据集中的文件进行对比,所述预设对比算法包括特征向量比较法、语义分析对比法和相似度比对算法等。The types are classified according to the functions of each file, such as entity classes, service classes, tool classes, and configuration classes. The file types are different, and the data forms of the files are also different, so different comparison algorithms need to be used to compare the files in the update system data set. The preset comparison algorithms include feature vector comparison method, semantic analysis comparison method and similarity comparison method algorithm etc.
进一步地,所述对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,包括:Further, comparing each file in each of the subsystem data sets with a file whose name is consistent with the file in the system data set to be analyzed includes:
判断所述子系统数据集的类型;Determine the type of the subsystem data set;
当所述子系统数据集的类型为实体类时,逐行获取所述子系统数据集中的每个文件的数据,得到对比数据,并获取在所述待分析系统数据集中与该文件名称一致的文件的数据,得到原始数据;When the type of the subsystem data set is an entity class, obtain data of each file in the subsystem data set line by line, obtain comparison data, and obtain the file name consistent with the file name in the system data set to be analyzed. The data of the file, get the original data;
采用相似度对比算法计算所述对比数据和原始数据的相似度,在相似度低于预设阈值时,将所述对比数据进行标识。其中,所述相似度对比算法是以连续字符串为单元块,相同单元块越大越多越相似,相异部分的单元块越小越少越相似,并以此计算相似度值的一种算法。A similarity comparison algorithm is used to calculate the similarity between the comparison data and the original data, and when the similarity is lower than a preset threshold, the comparison data is marked. Wherein, the similarity comparison algorithm uses continuous strings as unit blocks, the larger the same unit blocks, the more similar they are, and the smaller and less similar unit blocks of different parts are, and the similarity value is calculated based on this algorithm. .
通过所述文件差异表可以清晰的展示每次变更的内容,便于用户准确评估每次变更对系统业务逻辑的影响,降低未知变更带来的风险,保证了系统的稳定性,提升系统安全质量。The file difference table can clearly display the content of each change, which is convenient for users to accurately assess the impact of each change on the business logic of the system, reduce the risks brought by unknown changes, ensure the stability of the system, and improve the security quality of the system.
S5、根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。S5. Display the system content corresponding to the system data set to be analyzed according to the interface calling relationship diagram, the data model diagram, and the system file difference table.
详细地,本申请实施例将上述得到的接口调用关系图、数据模型图和文件差异表进行合并,得到的多个图表作为可视化方案,将所述待分析系统数据集对应的系统内容进行展示。所述可视化方案中的接口调用关系图、数据模型图和文件差异表是根据所述待分析系统数据集构建的,能够以一种清晰、直观的方式展现出所述待分析系统数据集对应的系统内容,使用户不需要面对复杂大规模的代码数据。所述可视化方案简明易懂,便于后续对系统进行进一步处理,提高了工作效率。In detail, in the embodiment of the present application, the obtained interface call relationship diagram, data model diagram and file difference table are combined, and the obtained multiple diagrams are used as visualization schemes to display the system content corresponding to the system data set to be analyzed. The interface calling relationship diagram, the data model diagram and the file difference table in the visualization scheme are constructed according to the data set of the system to be analyzed, and can display the corresponding data sets of the system to be analyzed in a clear and intuitive way. System content, so that users do not need to face complex and large-scale code data. The visualization scheme is concise and easy to understand, which is convenient for further processing of the system in the follow-up, and improves the work efficiency.
进一步地,用户可以通过文件差异表查看系统中的修改文件,根据修改文件名称可以在接口调用关系图中查看所述修改文件在整个系统的位置及功能,并可以通过数据模型图查看所述修改文件的数据结构,以及所述修改文件修改后对其他文件是否具有影响。Further, the user can view the modified file in the system through the file difference table, and can view the position and function of the modified file in the entire system in the interface call relationship diagram according to the modified file name, and can view the modified file through the data model diagram. The data structure of the file, and whether the modified file has an impact on other files after modification.
本申请实施例中所述可视化方案以图表的形式展示了复杂的系统代码包中包含的各个模块以及内部的调用关系,还展示了系统的整体数据结构和系统的变更情况。用户,如开发人员或维护人员,浏览所述可视化方案即可快速了解业务系统的基本情况,便于用户后续对业务系统进行维护或优化。The visualization solution described in the embodiment of the present application shows, in the form of a chart, each module included in the complex system code package and the internal calling relationship, and also shows the overall data structure of the system and the changes of the system. Users, such as developers or maintainers, can quickly understand the basic situation of the business system by browsing the visualization solution, which is convenient for the user to maintain or optimize the business system in the future.
本申请实施例通过构建接口调用关系图呈现出系统的模块划分和内部代码逻辑调用关系;通过构建数据模型图反映出系统内的数据结构关系以及系统中各个实体类之间具有的关联关系;通过系统文件差异表清晰的展示系统中每次变更的内容;以接口调用关系图、数据模型图和系统文件差异表的形式进行展示,可以将系统内容进行全面、直观的展示出来,便于后续对系统进行维护或更新。因此本申请提出的系统分析可视化方法、装置及计算机可读存储介质,可以提实现更全面、清晰的系统分析可视化的目的。The embodiment of the present application presents the module division of the system and the logical calling relationship of internal codes by constructing an interface call relationship diagram; by constructing a data model diagram, it reflects the data structure relationship in the system and the association relationship between various entity classes in the system; The system file difference table clearly shows the content of each change in the system; it is displayed in the form of an interface call relationship diagram, a data model diagram and a system file difference table, which can comprehensively and intuitively display the system content, which is convenient for subsequent system changes. for maintenance or updates. Therefore, the system analysis visualization method, device and computer-readable storage medium proposed in this application can achieve the purpose of realizing more comprehensive and clear system analysis visualization.
如图2所示,是本申请系统分析可视化装置的模块示意图。As shown in FIG. 2 , it is a schematic diagram of a module of the system analysis and visualization device of the present application.
本申请所述系统分析可视化装置100可以安装于电子设备中。根据实现的功能,所述系统分析可视化装置可以包括数据获取模块101、接口关系调用图模块102、数据模型图模块103、文件差异表模块104和展示输出模块105。本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。The system analysis and visualization apparatus 100 described in this application can be installed in an electronic device. According to the realized functions, the system analysis and visualization apparatus may include a data acquisition module 101 , an interface relationship call graph module 102 , a data model graph module 103 , a file difference table module 104 and a presentation output module 105 . The modules described in the present invention can also be called units, which refer to a series of computer program segments that can be executed by the electronic device processor and can perform fixed functions, and are stored in the memory of the electronic device.
在本实施例中,关于各模块/单元的功能如下:In this embodiment, the functions of each module/unit are as follows:
所述数据获取模块101,用于获取待分析系统数据集。The data acquisition module 101 is used to acquire the system data set to be analyzed.
本申请实施例中,所述待分析系统数据集是一个业务系统的全套源代码,包括多个类文件、工具包、配置文件等。In the embodiment of the present application, the data set of the system to be analyzed is a complete set of source codes of a business system, including multiple class files, toolkits, configuration files, and the like.
优选地,系统开发时使用的编程语言多种多样,常用的包括java、C/C++、php、python等。而在面向对象的编程语言中,以类和对象为基础,语言中的所有操作都是通过对象进行的,一个类代码文件中可以定义很多功能,并通过实例化前述类对象来实现功能。本申请实施例中所述待分析系统数据集是以类对象为基础的业务系统中的数据。Preferably, various programming languages are used during system development, and commonly used programming languages include java, C/C++, php, python, and the like. In object-oriented programming languages, based on classes and objects, all operations in the language are carried out through objects. Many functions can be defined in a class code file, and the functions can be implemented by instantiating the aforementioned class objects. The system data set to be analyzed in the embodiments of the present application is data in a business system based on class objects.
详细地,所述待分析系统数据集可以从预设的服务器中获取。Specifically, the system data set to be analyzed may be obtained from a preset server.
优选地,所述待分析系统数据集还可以从一区块链的节点获取,通过将所述待分析系统数据集存储于区块链中,提高所述待分析系统数据集的安全性。Preferably, the system data set to be analyzed can also be obtained from a node of a blockchain, and the security of the system data set to be analyzed is improved by storing the system data set to be analyzed in the blockchain.
所述接口关系调用图模块102,用于根据所述待分析系统数据集中存在的引用关系构建接口调用关系图。The interface relation call graph module 102 is configured to construct an interface call relation graph according to the reference relation existing in the to-be-analyzed system data set.
较佳地,一个业务系统中会包含大量类文件,各种类文件之间存在相互调用关系,由多个类文件共同实现一个系统功能。Preferably, a business system contains a large number of class files, and there is a mutual calling relationship between various class files, and a system function is jointly implemented by a plurality of class files.
本申请实施例中,所述接口调用关系图是一种树形图,以父子层次结构来组织对象。所述接口调用关系图中包括多个根节点和子节点,通过所述接口调用关系图可以展示所述待分析系统数据集中的模块分布情况和各个类文件之间的调用关系,还可以展示出对应业务系统的详细功能。In the embodiment of the present application, the interface calling relationship diagram is a tree diagram, and objects are organized in a parent-child hierarchical structure. The interface call relationship diagram includes a plurality of root nodes and sub-nodes. The interface call relationship diagram can display the distribution of modules in the system data set to be analyzed and the call relationship between each class file, and can also display the corresponding Detailed functions of the business system.
详细地,所述接口关系调用图模块102具体用于:In detail, the interface relationship call graph module 102 is specifically used for:
利用根类寻找法查找所述待分析系统数据集中的根类文件,并将所述根类文件作为根节点;Utilize the root class search method to find the root class file in the data set of the system to be analyzed, and use the root class file as the root node;
在所述待分析系统数据集中查找引用了所述根类文件的类文件,并将所述根类文件的类文件作为所述根节点的子节点;Find a class file that references the root class file in the system data set to be analyzed, and use the class file of the root class file as a child node of the root node;
在所述待分析系统数据集中查找引用了与所述子节点对应的类文件类文件,并将与所述子节点对应的类文件的类文件作为所述子节点的下一子节点;Search and reference the class file class file corresponding to the child node in the system data set to be analyzed, and use the class file of the class file corresponding to the child node as the next child node of the child node;
重复上述步骤,直到查找的类文件没有被其他类文件引用为止,得到所述待分析系统数据集对应的所述接口调用关系图。The above steps are repeated until the searched class file is not referenced by other class files, and the interface calling relationship diagram corresponding to the system data set to be analyzed is obtained.
较佳地,所述根类文件是指没有被其他类文件引用的类文件,如接口、定时任务、消息的入口和废弃的孤立类等。进一步地,所述利用根类寻找法查找所述待分析系统数据集中的根类文件,包括:Preferably, the root class file refers to class files that are not referenced by other class files, such as interfaces, timed tasks, message entries, and abandoned orphan classes. Further, using the root class finding method to find the root class files in the system data set to be analyzed, including:
遍历所述待分析系统数据集中的类文件;Traverse the class files in the system data set to be analyzed;
提取当前遍历的类文件的头部数据;Extract the header data of the currently traversed class file;
若所述头部数据中没有引用其他的类文件,则将所述当前遍历的类文件判定为根类文件。If no other class file is referenced in the header data, the currently traversed class file is determined as the root class file.
其中,所述头部数据是指一个类文件在开头的包名、引用其他类文件等数据信息,在引用其他类文件时,会使用标识字符“import”。The header data refers to data information such as a package name at the beginning of a class file, reference to other class files, and other data information, and the identification character "import" is used when referencing other class files.
可选地,本申请一可选实施例中,还可以对所述接口调用关系图进行完善,包括:统计出各个类文件被引用次数;获取所述待分析系统数据集中类文件的注解和注释;将上述数据信息添加至所述接口调用图中对应类文件处。Optionally, in an optional embodiment of the present application, the interface calling relationship diagram may also be improved, including: counting the number of times each class file is cited; obtaining annotations and annotations of the class files in the system data set to be analyzed. ; Add the above data information to the corresponding class file in the interface call graph.
优选地,用户通过所述接口调用关系图快速了解所述待分析系统数据集对应的业务系统,以便进行下一步地分析。如,可以快速定位到对外的接口,以及内部接口调用关系,同时也可以分析出哪些类之间的关系紧密,哪些类之间的关系稀疏;可以根据模块划分高内聚低耦合的原则,分析业务系统中模块划分的合理性,对模块划分提供一个量化的依据;还可以分析业务系统中哪些类是孤立的,哪些调用链已经废弃,从而进行精简,有利于业务系统的优化。Preferably, the user can quickly learn about the business system corresponding to the system data set to be analyzed through the interface calling relationship diagram, so as to perform further analysis. For example, it can quickly locate the external interface and the calling relationship of the internal interface, and can also analyze which classes are closely related and which are sparse. The rationality of module division in the business system provides a quantitative basis for module division; it can also analyze which classes in the business system are isolated and which call chains have been abandoned, so as to simplify and optimize the business system.
所述数据模型图模块103,用于查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图。The data model diagram module 103 is configured to search for entity class files in the data set of the system to be analyzed, and construct a data model diagram according to the entity class files.
本申请实施例中所述待分析系统数据集中类文件的类型包括多种,如实体类、服务类、工具类和配置类等。其中,所述实体类是描述现实世界中的客观事物的数据,可以指人,如教师、学生等,也可以指物,如书、仓库等。The types of class files in the system data set to be analyzed described in the embodiments of the present application include various types, such as entity classes, service classes, tool classes, and configuration classes. The entity class is data describing objective things in the real world, which can refer to people, such as teachers, students, etc., or objects, such as books, warehouses, and the like.
详细地,在查找所述待分析系统数据集中的实体类文件时,所述数据模型图模块103具体执行下述操作:In detail, when searching for the entity class file in the data set of the system to be analyzed, the data model diagram module 103 specifically performs the following operations:
根据所述待分析系统数据集中类文件中预设的标记获取类型为实体类的类文件;Obtain a class file whose type is an entity class according to a preset mark in the class file in the data set of the system to be analyzed;
将所述类型为实体类的类文件汇集,得到多个实体类文件。Collecting the class files whose type is entity class to obtain a plurality of entity class files.
其中,所述预设的标记是系统开发人员在构建类文件时对各种类文件进行区分的方法标记,例如,若一个类文件为实体类,则在命名时在名称末尾加“Entity”,若所述类文件为服务类,则在命名时在名称末尾加“Service”。Wherein, the preset mark is a method mark used by system developers to distinguish various class files when building a class file. For example, if a class file is an entity class, add "Entity" at the end of the name when naming, If the class file is a service class, add "Service" at the end of the name when naming.
较佳地,本申请实施例中所述数据模型图可以是E-R图(Entity Relationship Diagram,实体-联系图),用来描述信息需求或要存储在数据库中的信息的类型,所述数据模型图包括实体、实体的属性和实体间的关联关系。Preferably, the data model diagram described in the embodiment of the present application may be an E-R diagram (Entity Relationship Diagram, entity-relationship diagram), used to describe the information requirements or the type of information to be stored in the database, the data model diagram includes entities, attributes of entities and associations between entities.
详细地,在根据所述实体类文件构建数据模型图时,所述数据模型图模块103具体执行下述操作:In detail, when constructing a data model diagram according to the entity class file, the data model diagram module 103 specifically performs the following operations:
根据所述实体类文件的类名确定数据模型图中的实体;Determine the entity in the data model diagram according to the class name of the entity class file;
根据所述实体类文件内包含的成员变量确定所述数据模型图中对应实体的属性;Determine the attribute of the corresponding entity in the data model diagram according to the member variable contained in the entity class file;
根据所述实体类文件中的注解为所述数据模型图中各实体添加关联关系。An association relationship is added to each entity in the data model diagram according to the annotation in the entity class file.
其中,所述成员变量是类文件的属性,定义在类文件中,在整个类文件中都可以被访问。所述注解是一种代码级别的说明,在类文件中进行声明,用来所述类文件进行说明或注释,根据所述注解可以得到所述类文件与其他类文件之间的关联。Wherein, the member variable is an attribute of the class file, which is defined in the class file and can be accessed in the whole class file. The annotation is a code-level description, which is declared in a class file and used to describe or annotate the class file, and the association between the class file and other class files can be obtained according to the annotation.
优选地,在实际的业务系统开发中,各种数据一般以数据表的形式保存在数据库中,各个数据表及其属性以及各数据表之间的关系代表了实际业务系统中的数据结构,本申请实施例中数据库中的数据表与系统中的实体类为一一对应关系,因此,本申请实施例通过所述数据模型图可以完整的反映出数据结构关系,还可以反映出各个实体类之间具有的关联关系。Preferably, in the actual business system development, various data are generally stored in the database in the form of data tables, and each data table and its attributes and the relationship between the data tables represent the data structure in the actual business system. In the application embodiment, the data table in the database and the entity class in the system have a one-to-one correspondence. Therefore, the data model diagram in the embodiment of the application can completely reflect the data structure relationship, and can also reflect the relationship between each entity class. relationship between them.
所述文件差异表模块104,用于获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表。The file difference table module 104 is configured to acquire and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table.
详细地,一个业务系统在开发完成后还需要进行后期的维护或者功能优化,因此,还需要对业务系统进行更新。本申请实施例中所述更新系统数据集是对业务系统更新后的全套源代码。In detail, after the development of a business system is completed, post-maintenance or function optimization needs to be performed. Therefore, the business system also needs to be updated. The update system data set described in the embodiment of the present application is a complete set of source codes after the business system is updated.
详细地,所述文件差异表模块104具体用于:In detail, the file difference table module 104 is specifically used for:
获取更新系统数据集;Get the update system dataset;
将所述更新系统数据集按照类型进行划分,得到多个子系统数据集;Dividing the update system data set according to type to obtain multiple subsystem data sets;
遍历每个所述子系统数据集,根据所述子系统数据集的类型采用与所述类型对应的预设对比算法,对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,识别每个所述子系统数据集中文件的修改部分;Traverse each of the subsystem data sets, adopt a preset comparison algorithm corresponding to the type according to the type of the subsystem data set, and compare each file in each of the subsystem data sets with those in the to-be-analyzed data set. Compare the files in the system data set with the same file name, and identify the modified part of the file in each of the subsystem data sets;
在所述子系统数据集中将所述修改部分进行标识,并将所述修改部分保存至文件差异表中。The modified part is identified in the subsystem data set, and the modified part is saved in a file difference table.
其中,所述类型是根据各文件的作用进行划分的,如实体类、服务类、工具类和配置类等。文件类型不同,文件的数据形式也不同,因此需要采取不同对比算法对所述更新系统数据集中的文件进行对比,所述预设对比算法包括特征向量比较法、语义分析对比法和相似度比对算法等。The types are classified according to the functions of each file, such as entity classes, service classes, tool classes, and configuration classes. The file types are different, and the data forms of the files are also different. Therefore, different comparison algorithms need to be used to compare the files in the update system data set. The preset comparison algorithms include feature vector comparison methods, semantic analysis comparison methods, and similarity comparison methods. algorithm etc.
进一步地,所述对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,包括:Further, comparing each file in each of the subsystem data sets with a file whose name is consistent with the file in the system data set to be analyzed includes:
判断所述子系统数据集的类型;Determine the type of the subsystem data set;
当所述子系统数据集的类型为实体类时,逐行获取所述子系统数据集中的每个文件的数据,得到对比数据,并获取在所述待分析系统数据集中与该文件名称一致的文件的数据,得到原始数据;When the type of the subsystem data set is an entity class, obtain data of each file in the subsystem data set line by line, obtain comparison data, and obtain the file name consistent with the file name in the system data set to be analyzed. The data of the file, get the original data;
采用相似度对比算法计算所述对比数据和原始数据的相似度,在相似度低于预设阈值时,将所述对比数据进行标识。其中,所述相似度对比算法是以连续字符串为单元块,相同单元块越大越多越相似,相异部分的单元块越小越少越相似,并以此计算相似度值的一种算法。A similarity comparison algorithm is used to calculate the similarity between the comparison data and the original data, and when the similarity is lower than a preset threshold, the comparison data is marked. Wherein, the similarity comparison algorithm uses continuous strings as unit blocks, the larger the same unit blocks, the more similar they are, and the smaller and less similar unit blocks of different parts are, and the similarity value is calculated based on this algorithm. .
通过所述文件差异表可以清晰的展示每次变更的内容,便于用户准确评估每次变更对系统业务逻辑的影响,降低未知变更带来的风险,保证了系统的稳定性,提升系统安全质量。The file difference table can clearly display the content of each change, which is convenient for users to accurately assess the impact of each change on the business logic of the system, reduce the risks brought by unknown changes, ensure the stability of the system, and improve the security quality of the system.
所述展示输出模块105,用于根据所述接口调用关系图、所述数据模型图和所述系统文件差异表展示所述待分析系统数据集对应的系统内容。The display output module 105 is configured to display the system content corresponding to the system data set to be analyzed according to the interface call relationship diagram, the data model diagram and the system file difference table.
详细地,本申请实施例将上述得到的接口调用关系图、数据模型图和文件差异表进行合并,得到的多个图表作为可视化方案,将所述待分析系统数据集对应的系统内容进行展示。所述可视化方案中的接口调用关系图、数据模型图和文件差异表是根据所述待分析系统数据集构建的,能够以一种清晰、直观的方式展现出所述待分析系统数据集对应的系统内容,使用户不需要面对复杂大规模的代码数据。所述可视化方案简明易懂,便于后续对系统进行进一步处理,提高了工作效率。In detail, in the embodiment of the present application, the obtained interface calling relationship diagram, data model diagram and file difference table are combined, and the obtained multiple diagrams are used as visualization schemes to display the system content corresponding to the system data set to be analyzed. The interface calling relationship diagram, the data model diagram and the file difference table in the visualization scheme are constructed according to the data set of the system to be analyzed, and can display the corresponding data sets of the system to be analyzed in a clear and intuitive way. System content, so that users do not need to face complex and large-scale code data. The visualization scheme is concise and easy to understand, which is convenient for further processing of the system in the follow-up, and improves the work efficiency.
进一步地,用户可以通过文件差异表查看系统中的修改文件,根据修改文件名称可以在接口调用关系图中查看所述修改文件在整个系统的位置及功能,并可以通过数据模型图查看所述修改文件的数据结构,以及所述修改文件修改后对其他文件是否具有影响。Further, the user can view the modified file in the system through the file difference table, and can view the position and function of the modified file in the entire system in the interface call relationship diagram according to the modified file name, and can view the modified file through the data model diagram. The data structure of the file, and whether the modified file has an impact on other files after modification.
本申请实施例中所述可视化方案以图表的形式展示了复杂的系统代码包中包含的各个模块以及内部的调用关系,还展示了系统的整体数据结构和系统的变更情况。用户,如开发人员或维护人员,浏览所述可视化方案即可快速了解业务系统的基本情况,便于用户后续对业务系统进行维护或优化。The visualization solution described in the embodiment of the present application shows, in the form of a chart, each module included in the complex system code package and the internal calling relationship, and also shows the overall data structure of the system and the changes of the system. Users, such as developers or maintainers, can quickly understand the basic situation of the business system by browsing the visualization solution, which is convenient for the user to maintain or optimize the business system in the future.
如图3所示,是本申请实现系统分析可视化方法的电子设备的结构示意图。As shown in FIG. 3 , it is a schematic structural diagram of an electronic device implementing the system analysis and visualization method of the present application.
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如系统分析可视化程序12。The electronic device 1 may include a processor 10, a memory 11 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a system analysis visualization program 12.
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card, SMC)、安全数字(Secure Digital, SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如系统分析可视化程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 . In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as the code of the system analysis visualization program 12, etc., but also can be used to temporarily store data that has been output or will be output.
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行系统分析可视化程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。In some embodiments, the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits. Central Processing Unit (CPU), microprocessor, digital processing chip, graphics processor and combination of various control chips, etc. The processor 10 is the control core (Control Core) of the electronic device. Unit), using various interfaces and lines to connect various components of the entire electronic device, by running or executing programs or modules stored in the memory 11 (for example, executing a system analysis visualization program, etc.), and calling the memory 11 to perform various functions of the electronic device 1 and process data.
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。The bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard structure (extended). industry standard architecture, referred to as EISA) bus, etc. The bus can be divided into address bus, data bus, control bus and so on. The bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the figure. components, or a combination of certain components, or a different arrangement of components.
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for powering the various components, preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power source can be managed by the power source. The device implements functions such as charge management, discharge management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components. The electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。Further, the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) Touch, etc. The display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are only used for illustration, and are not limited by this structure in the scope of the patent application.
所述电子设备1中的所述存储器11存储的系统分析可视化程序12是多个指令的组合,在所述处理器10中运行时,可以实现:The system analysis visualization program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions, and when running in the processor 10, can realize:
获取待分析系统数据集;Obtain the data set of the system to be analyzed;
根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
根据所述接口调用关系图、所述数据模型图和所述系统文件差异表展示所述待分析系统数据集对应的系统内容。The system content corresponding to the system data set to be analyzed is displayed according to the interface calling relationship diagram, the data model diagram and the system file difference table.
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中,所述计算机可读存储介质可以是易失性的,也可以是非易失性的。所述计算机可读存储介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the modules/units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium, and the computer-readable storage medium can be stored in a computer-readable storage medium. It is volatile and can also be non-volatile. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) ).
进一步地,所述计算机可读存储介质,包括存储数据区和存储程序区,其中,所述存储数据区存储创建的数据,所述存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:Further, the computer-readable storage medium includes a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein, the computer program is processed The following steps are implemented when the device is executed:
获取待分析系统数据集;Obtain the data set of the system to be analyzed;
根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。According to the interface calling relationship diagram, the data model diagram and the system file difference table, the system content corresponding to the system data set to be analyzed is displayed.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division manners in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。It will be apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, but that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application.
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图表记视为限制所涉及的权利要求。Accordingly, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the application is to be defined by the appended claims rather than the foregoing description, which is therefore intended to fall within the scope of the claims. All changes within the meaning and scope of the equivalents of , are included in this application. Any accompanying reference signs in the claims should not be construed as limiting the involved claims.
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。The blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block. The blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。Furthermore, it is clear that the word "comprising" does not exclude other units or steps and the singular does not exclude the plural. Several units or means recited in the system claims can also be realized by one unit or means by means of software or hardware. Second-class terms are used to denote names and do not denote any particular order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limitations. Although the present application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present application.

Claims (20)

  1. 一种系统分析可视化方法,其中,所述方法包括:A system analysis and visualization method, wherein the method comprises:
    获取待分析系统数据集;Obtain the data set of the system to be analyzed;
    根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
    查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
    获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
    根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。According to the interface calling relationship diagram, the data model diagram and the system file difference table, the system content corresponding to the system data set to be analyzed is displayed.
  2. 如权利要求1所述的系统分析可视化方法,其中,所述根据所述待分析系统数据集中各个类之间的引用关系构建接口调用关系图,包括:The system analysis and visualization method according to claim 1, wherein the building an interface calling relationship diagram according to the reference relationship between the various classes in the system data set to be analyzed comprises:
    利用根类寻找法查找所述待分析系统数据集中的根类文件,并将所述根类文件作为根节点;Utilize the root class search method to find the root class file in the data set of the system to be analyzed, and use the root class file as the root node;
    在所述待分析系统数据集中查找引用了所述根类文件的类文件,并将所述根类文件的类文件作为所述根节点的子节点;Find a class file that references the root class file in the system data set to be analyzed, and use the class file of the root class file as a child node of the root node;
    在所述待分析系统数据集中查找引用了与所述子节点对应的类文件的类文件,并将与所述子节点对应的类文件的类文件作为所述子节点的下一子节点;Find a class file that references the class file corresponding to the child node in the system data set to be analyzed, and use the class file of the class file corresponding to the child node as the next child node of the child node;
    重复上述步骤,直到查找的类文件没有被其他类文件引用为止,得到所述待分析系统数据集对应的所述接口调用关系图。The above steps are repeated until the searched class file is not referenced by other class files, and the interface calling relationship diagram corresponding to the system data set to be analyzed is obtained.
  3. 如权利要求2所述的系统分析可视化方法,其中,所述利用根类寻找法查找所述待分析系统数据集中的根类文件,包括:The system analysis and visualization method according to claim 2, wherein, using a root class finding method to find root class files in the system data set to be analyzed, comprising:
    遍历所述待分析系统数据集中的类文件;Traverse the class files in the system data set to be analyzed;
    提取当前遍历的类文件的头部数据;Extract the header data of the currently traversed class file;
    若所述头部数据中没有引用其他的类文件,则将所述当前遍历的类文件判定为根类文件。If no other class file is referenced in the header data, the currently traversed class file is determined as the root class file.
  4. 如权利要求1所述的系统分析可视化方法,其中,所述查找所述待分析系统数据集中的实体类文件,包括:The system analysis visualization method according to claim 1, wherein the searching for entity class files in the system data set to be analyzed comprises:
    根据所述待分析系统数据集中类文件中预设的标记获取类型为实体类的类文件;Obtain a class file whose type is an entity class according to a preset mark in the class file in the data set of the system to be analyzed;
    将所述类型为实体类的类文件汇集,得到多个实体类文件。Collecting the class files whose type is entity class to obtain a plurality of entity class files.
  5. 如权利要求1所述的系统分析可视化方法,其中,所述数据模型图包括实体、实体的属性、实体间的关联关系,所述根据所述实体类文件构建数据模型图,包括:The system analysis and visualization method according to claim 1, wherein the data model diagram includes entities, attributes of entities, and associations between entities, and the construction of the data model diagram according to the entity class file includes:
    根据所述实体类文件的类名确定数据模型图中的实体;Determine the entity in the data model diagram according to the class name of the entity class file;
    根据所述实体类文件内包含的成员变量确定所述数据模型图中对应实体的属性;Determine the attribute of the corresponding entity in the data model diagram according to the member variable contained in the entity class file;
    根据所述实体类文件中的注解为所述数据模型图中各实体添加关联关系。An association relationship is added to each entity in the data model diagram according to the annotation in the entity class file.
  6. 如权利要求1所述的系统分析可视化方法,其中,所述获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表,包括:The system analysis and visualization method according to claim 1, wherein the acquiring and updating the system data set and comparing with the system data set to be analyzed to obtain a system file difference table, comprising:
    获取更新系统数据集;Get the update system dataset;
    将所述更新系统数据集按照类型进行划分,得到多个子系统数据集;Dividing the update system data set according to type to obtain multiple subsystem data sets;
    遍历每个所述子系统数据集,根据所述子系统数据集的类型采用与所述类型对应的预设对比算法,对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,识别每个所述子系统数据集中文件的修改部分;Traverse each of the subsystem data sets, adopt a preset comparison algorithm corresponding to the type according to the type of the subsystem data set, and compare each file in each of the subsystem data sets with those in the to-be-analyzed data set. Compare the files in the system data set with the same file name, and identify the modified part of the file in each of the subsystem data sets;
    在所述子系统数据集中将所述修改部分进行标识,并将所述修改部分保存至文件差异表中。The modified part is identified in the subsystem data set, and the modified part is saved in a file difference table.
  7. 如权利要求6所述的系统分析可视化方法,其中,所述预设对比算法包括相似度比对算法,所述对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,包括:The system analysis and visualization method according to claim 6, wherein the preset comparison algorithm includes a similarity comparison algorithm, and the comparison between each file in each of the subsystem data sets and the data in the system to be analyzed Focus on the files with the same name as the file, including:
    判断所述子系统数据集的类型;当所述子系统数据集的类型为实体类时,逐行获取所述子系统数据集中的每个文件的数据,得到对比数据,并逐行获取在所述待分析系统数据集中与该文件名称一致的文件的数据,得到原始数据;Determine the type of the subsystem data set; when the type of the subsystem data set is an entity class, obtain the data of each file in the subsystem data set line by line, obtain the comparison data, and obtain the data line by line in the Describe the data of the file whose name is consistent with the file name in the data set of the system to be analyzed, and obtain the original data;
    采用相似度对比算法计算所述对比数据和原始数据的相似度,在相似度低于预设阈值时,将所述对比数据进行标识。A similarity comparison algorithm is used to calculate the similarity between the comparison data and the original data, and when the similarity is lower than a preset threshold, the comparison data is marked.
  8. 一种系统分析可视化装置,其中,所述装置包括:A system analysis visualization device, wherein the device includes:
    数据获取模块,用于获取待分析系统数据集;The data acquisition module is used to acquire the data set of the system to be analyzed;
    接口关系调用图模块,用于根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;an interface relation call graph module, configured to construct an interface call relation graph according to the reference relation existing in the data set of the system to be analyzed;
    数据模型图模块,用于查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;a data model diagram module, used for finding entity class files in the system data set to be analyzed, and constructing a data model diagram according to the entity class files;
    文件差异表模块,用于获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;A file difference table module, used to obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
    展示输出模块,用于根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。The display output module is configured to display the system content corresponding to the to-be-analyzed system data set according to the interface call relationship diagram, the data model diagram and the system file difference table.
  9. 一种电子设备,其中,所述电子设备包括:An electronic device, wherein the electronic device comprises:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of:
    获取待分析系统数据集;Obtain the data set of the system to be analyzed;
    根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
    查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
    获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
    根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。According to the interface calling relationship diagram, the data model diagram and the system file difference table, the system content corresponding to the system data set to be analyzed is displayed.
  10. 如权利要求9所述的电子设备,其中,所述根据所述待分析系统数据集中各个类之间的引用关系构建接口调用关系图,包括:The electronic device according to claim 9, wherein the building an interface calling relationship graph according to the reference relationship between the various classes in the system data set to be analyzed comprises:
    利用根类寻找法查找所述待分析系统数据集中的根类文件,并将所述根类文件作为根节点;Utilize the root class search method to find the root class file in the system data set to be analyzed, and use the root class file as the root node;
    在所述待分析系统数据集中查找引用了所述根类文件的类文件,并将所述根类文件的类文件作为所述根节点的子节点;Find a class file that references the root class file in the system data set to be analyzed, and use the class file of the root class file as a child node of the root node;
    在所述待分析系统数据集中查找引用了与所述子节点对应的类文件的类文件,并将与所述子节点对应的类文件的类文件作为所述子节点的下一子节点;Find a class file that references the class file corresponding to the child node in the system data set to be analyzed, and use the class file of the class file corresponding to the child node as the next child node of the child node;
    重复上述步骤,直到查找的类文件没有被其他类文件引用为止,得到所述待分析系统数据集对应的所述接口调用关系图。The above steps are repeated until the searched class file is not referenced by other class files, and the interface calling relationship diagram corresponding to the system data set to be analyzed is obtained.
  11. 如权利要求10所述的电子设备,其中,所述利用根类寻找法查找所述待分析系统数据集中的根类文件,包括:The electronic device according to claim 10, wherein the searching for root class files in the data set of the system to be analyzed by using a root class finding method comprises:
    遍历所述待分析系统数据集中的类文件;Traverse the class files in the system data set to be analyzed;
    提取当前遍历的类文件的头部数据;Extract the header data of the currently traversed class file;
    若所述头部数据中没有引用其他的类文件,则将所述当前遍历的类文件判定为根类文件。If no other class file is referenced in the header data, the currently traversed class file is determined as the root class file.
  12. 如权利要求9所述的电子设备,其中,所述查找所述待分析系统数据集中的实体类文件,包括:The electronic device according to claim 9, wherein the searching for entity class files in the system data set to be analyzed comprises:
    根据所述待分析系统数据集中类文件中预设的标记获取类型为实体类的类文件;Obtain a class file whose type is an entity class according to a preset mark in the class file in the data set of the system to be analyzed;
    将所述类型为实体类的类文件汇集,得到多个实体类文件。Collecting the class files whose type is entity class to obtain a plurality of entity class files.
  13. 如权利要求9所述的电子设备,其中,所述数据模型图包括实体、实体的属性、实体间的关联关系,所述根据所述实体类文件构建数据模型图,包括:The electronic device according to claim 9, wherein the data model diagram includes entities, attributes of entities, and associations between entities, and the construction of the data model diagram according to the entity class file includes:
    根据所述实体类文件的类名确定数据模型图中的实体;Determine the entity in the data model diagram according to the class name of the entity class file;
    根据所述实体类文件内包含的成员变量确定所述数据模型图中对应实体的属性;Determine the attribute of the corresponding entity in the data model diagram according to the member variable contained in the entity class file;
    根据所述实体类文件中的注解为所述数据模型图中各实体添加关联关系。An association relationship is added to each entity in the data model diagram according to the annotation in the entity class file.
  14. 如权利要求9所述的电子设备,其中,所述获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表,包括:The electronic device according to claim 9, wherein the acquiring and updating the system data set is compared with the system data set to be analyzed to obtain a system file difference table, comprising:
    获取更新系统数据集;Get the update system dataset;
    将所述更新系统数据集按照类型进行划分,得到多个子系统数据集;Dividing the update system data set according to type to obtain multiple subsystem data sets;
    遍历每个所述子系统数据集,根据所述子系统数据集的类型采用与所述类型对应的预设对比算法,对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,识别每个所述子系统数据集中文件的修改部分;Traverse each of the subsystem data sets, adopt a preset comparison algorithm corresponding to the type according to the type of the subsystem data set, and compare each file in each of the subsystem data sets with those in the to-be-analyzed data set. Compare the files in the system data set with the same file name, and identify the modified part of the file in each of the subsystem data sets;
    在所述子系统数据集中将所述修改部分进行标识,并将所述修改部分保存至文件差异表中。The modified part is identified in the subsystem data set, and the modified part is saved in a file difference table.
  15. 如权利要求14所述的电子设备,其中,所述预设对比算法包括相似度比对算法,所述对每个所述子系统数据集中的每个文件与在所述待分析系统数据集中与该文件名称一致的文件进行对比,包括:The electronic device according to claim 14, wherein the preset comparison algorithm includes a similarity comparison algorithm, and the comparison between each file in each of the subsystem data sets and the data set of the system to be analyzed with the The files with the same file name are compared, including:
    判断所述子系统数据集的类型;当所述子系统数据集的类型为实体类时,逐行获取所述子系统数据集中的每个文件的数据,得到对比数据,并逐行获取在所述待分析系统数据集中与该文件名称一致的文件的数据,得到原始数据;Determine the type of the subsystem data set; when the type of the subsystem data set is an entity class, obtain the data of each file in the subsystem data set line by line, obtain the comparison data, and obtain the data line by line in the Describe the data of the file whose name is consistent with the file name in the data set of the system to be analyzed, and obtain the original data;
    采用相似度对比算法计算所述对比数据和原始数据的相似度,在相似度低于预设阈值时,将所述对比数据进行标识。A similarity comparison algorithm is used to calculate the similarity between the comparison data and the original data, and when the similarity is lower than a preset threshold, the comparison data is marked.
  16. 一种计算机可读存储介质,包括存储数据区和存储程序区,其中,所述存储数据区存储创建的数据,所述存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium, comprising a storage data area and a storage program area, wherein the storage data area stores created data, and the storage program area stores a computer program; wherein, when the computer program is executed by a processor Implement the following steps:
    获取待分析系统数据集;Obtain the data set of the system to be analyzed;
    根据所述待分析系统数据集中存在的引用关系构建接口调用关系图;Build an interface calling relationship diagram according to the reference relationship existing in the data set of the system to be analyzed;
    查找所述待分析系统数据集中的实体类文件,并根据所述实体类文件构建数据模型图;Find the entity class file in the data set of the system to be analyzed, and build a data model diagram according to the entity class file;
    获取更新系统数据集,并与所述待分析系统数据集进行比较,得到系统文件差异表;Obtain and update the system data set, and compare it with the system data set to be analyzed to obtain a system file difference table;
    根据所述接口调用关系图、所述数据模型图和所述系统文件差异表,展示所述待分析系统数据集对应的系统内容。The system content corresponding to the system data set to be analyzed is displayed according to the interface calling relationship diagram, the data model diagram, and the system file difference table.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述根据所述待分析系统数据集中各个类之间的引用关系构建接口调用关系图,包括:The computer-readable storage medium according to claim 16, wherein the building an interface calling relationship graph according to the reference relationship between the various classes in the system data set to be analyzed comprises:
    利用根类寻找法查找所述待分析系统数据集中的根类文件,并将所述根类文件作为根节点;Utilize the root class search method to find the root class file in the system data set to be analyzed, and use the root class file as the root node;
    在所述待分析系统数据集中查找引用了所述根类文件的类文件,并将所述根类文件的类文件作为所述根节点的子节点;Find a class file that references the root class file in the system data set to be analyzed, and use the class file of the root class file as a child node of the root node;
    在所述待分析系统数据集中查找引用了与所述子节点对应的类文件的类文件,并将与所述子节点对应的类文件的类文件作为所述子节点的下一子节点;Find a class file that references the class file corresponding to the child node in the system data set to be analyzed, and use the class file of the class file corresponding to the child node as the next child node of the child node;
    重复上述步骤,直到查找的类文件没有被其他类文件引用为止,得到所述待分析系统数据集对应的所述接口调用关系图。The above steps are repeated until the searched class file is not referenced by other class files, and the interface calling relationship diagram corresponding to the system data set to be analyzed is obtained.
  18. 如权利要求17所述的计算机可读存储介质,其中,所述利用根类寻找法查找所述待分析系统数据集中的根类文件,包括:The computer-readable storage medium of claim 17, wherein the searching for root class files in the system data set to be analyzed by using a root class finding method comprises:
    遍历所述待分析系统数据集中的类文件;Traverse the class files in the system data set to be analyzed;
    提取当前遍历的类文件的头部数据;Extract the header data of the currently traversed class file;
    若所述头部数据中没有引用其他的类文件,则将所述当前遍历的类文件判定为根类文件。If no other class file is referenced in the header data, the currently traversed class file is determined as the root class file.
  19. 如权利要求16所述的计算机可读存储介质,其中,所述查找所述待分析系统数据集中的实体类文件,包括:The computer-readable storage medium of claim 16, wherein the searching for entity class files in the system data set to be analyzed comprises:
    根据所述待分析系统数据集中类文件中预设的标记获取类型为实体类的类文件;Obtain a class file whose type is an entity class according to a preset mark in the class file in the data set of the system to be analyzed;
    将所述类型为实体类的类文件汇集,得到多个实体类文件。Collecting the class files whose type is entity class to obtain a plurality of entity class files.
  20. 如权利要求16所述的计算机可读存储介质,其中,所述数据模型图包括实体、实体的属性、实体间的关联关系,所述根据所述实体类文件构建数据模型图,包括:The computer-readable storage medium of claim 16, wherein the data model diagram includes entities, attributes of entities, and associations between entities, and the constructing the data model diagram according to the entity class file includes:
    根据所述实体类文件的类名确定数据模型图中的实体;Determine the entity in the data model diagram according to the class name of the entity class file;
    根据所述实体类文件内包含的成员变量确定所述数据模型图中对应实体的属性;Determine the attribute of the corresponding entity in the data model diagram according to the member variable contained in the entity class file;
    根据所述实体类文件中的注解为所述数据模型图中各实体添加关联关系。An association relationship is added to each entity in the data model diagram according to the annotation in the entity class file.
PCT/CN2021/091439 2020-11-10 2021-04-30 System analysis visualization method and apparatus, electronic device, and computer readable storage medium WO2022100032A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011246852.0 2020-11-10
CN202011246852.0A CN112364107A (en) 2020-11-10 2020-11-10 System analysis visualization method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2022100032A1 true WO2022100032A1 (en) 2022-05-19

Family

ID=74508566

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/091439 WO2022100032A1 (en) 2020-11-10 2021-04-30 System analysis visualization method and apparatus, electronic device, and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN112364107A (en)
WO (1) WO2022100032A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721970A (en) * 2022-06-08 2022-07-08 广州易方信息科技股份有限公司 Method and device for automatic testing and accurate testing of construction interface

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112364107A (en) * 2020-11-10 2021-02-12 平安普惠企业管理有限公司 System analysis visualization method and device, electronic equipment and computer readable storage medium
CN113419795B (en) * 2021-07-21 2022-05-03 网易(杭州)网络有限公司 Call relation display method and device, computer equipment and storage medium
CN113590088B (en) * 2021-07-21 2023-07-21 上海淇玥信息技术有限公司 Method and device for automatically analyzing use condition of component and electronic equipment
CN113721976B (en) * 2021-07-31 2024-02-06 远光软件股份有限公司 Data migration method and device based on BI analysis software, storage medium and electronic equipment
CN115292205B (en) * 2022-10-08 2022-12-09 四川无限智达科技有限公司 Method and device for generating relational topological graph of interface, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681835A (en) * 2010-12-20 2012-09-19 微软公司 Code clone notification and architectural change visualization
US8336023B2 (en) * 2007-10-22 2012-12-18 Oracle International Corporation Extensible code visualization
US20170046132A1 (en) * 2014-09-15 2017-02-16 The Mathworks, Inc. Data type visualization
CN106873974A (en) * 2016-12-30 2017-06-20 武汉默联股份有限公司 Smart code generates automotive engine system and method
CN109032586A (en) * 2018-07-09 2018-12-18 中国银行股份有限公司 A kind of data visualization method and device
CN109976747A (en) * 2019-02-01 2019-07-05 杭州电子科技大学 A kind of visual development realization system of module level code structure
CN110333898A (en) * 2019-05-27 2019-10-15 北京达佳互联信息技术有限公司 A kind of code relation generation method, device, electronic equipment and storage medium
CN112364107A (en) * 2020-11-10 2021-02-12 平安普惠企业管理有限公司 System analysis visualization method and device, electronic equipment and computer readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10353701B2 (en) * 2014-09-29 2019-07-16 Sap Se Code analysis for cloud-based integrated development environments
US10824637B2 (en) * 2017-03-09 2020-11-03 Data.World, Inc. Matching subsets of tabular data arrangements to subsets of graphical data arrangements at ingestion into data driven collaborative datasets
WO2019110654A1 (en) * 2017-12-06 2019-06-13 Datawalk Spolka Akcyjna Systems and methods for querying databases using interactive search paths
CN110134800A (en) * 2019-04-17 2019-08-16 深圳壹账通智能科技有限公司 A kind of document relationships visible processing method and device
CN111639143B (en) * 2020-06-05 2020-12-22 广州市玄武无线科技股份有限公司 Data blood relationship display method and device of data warehouse and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8336023B2 (en) * 2007-10-22 2012-12-18 Oracle International Corporation Extensible code visualization
CN102681835A (en) * 2010-12-20 2012-09-19 微软公司 Code clone notification and architectural change visualization
US20170046132A1 (en) * 2014-09-15 2017-02-16 The Mathworks, Inc. Data type visualization
CN106873974A (en) * 2016-12-30 2017-06-20 武汉默联股份有限公司 Smart code generates automotive engine system and method
CN109032586A (en) * 2018-07-09 2018-12-18 中国银行股份有限公司 A kind of data visualization method and device
CN109976747A (en) * 2019-02-01 2019-07-05 杭州电子科技大学 A kind of visual development realization system of module level code structure
CN110333898A (en) * 2019-05-27 2019-10-15 北京达佳互联信息技术有限公司 A kind of code relation generation method, device, electronic equipment and storage medium
CN112364107A (en) * 2020-11-10 2021-02-12 平安普惠企业管理有限公司 System analysis visualization method and device, electronic equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Sourcetrail -Documentation ", 22 November 2019 (2019-11-22), XP055929594, Retrieved from the Internet <URL:http://itindex.net/detail/60163-sourcetrail-documentation> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721970A (en) * 2022-06-08 2022-07-08 广州易方信息科技股份有限公司 Method and device for automatic testing and accurate testing of construction interface

Also Published As

Publication number Publication date
CN112364107A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
WO2022100032A1 (en) System analysis visualization method and apparatus, electronic device, and computer readable storage medium
US11966395B2 (en) Query generation based on merger of subqueries
CN111813963B (en) Knowledge graph construction method and device, electronic equipment and storage medium
EP3550444B1 (en) Query generation based on a logical data model
US20150269494A1 (en) Graph-based organization entity resolution
US20200341978A1 (en) Query Generation Based On A Logical Data Model With One-to-One Joins
US8713041B2 (en) Peer to peer (P2P) missing fields and field valuation feedback
WO2022179123A1 (en) Data update and presentation method and apparatus, and electronic device and storage medium
WO2022048210A1 (en) Named entity recognition method and apparatus, and electronic device and readable storage medium
WO2022222943A1 (en) Department recommendation method and apparatus, electronic device and storage medium
JP7432801B2 (en) Medical data element automated classification method and system based on depth map matching
US7840603B2 (en) Method and apparatus for database change management
WO2023160137A1 (en) Graph data storage method and system, and computer device
CN113032393B (en) Method and device for binding associated objects
CN109376153A (en) System and method for writing data into graph database based on NiFi
CN113190687A (en) Knowledge graph determining method and device, computer equipment and storage medium
WO2022048362A1 (en) Data storage method and apparatus, electronic device, and storage medium
CN112486532B (en) Configuration file management method and device, electronic equipment and storage medium
CN105573763A (en) Embedded system modeling method supporting RTOS
CN111984745A (en) Dynamic expansion method, device, equipment and storage medium for database field
CN115114297A (en) Data lightweight storage and search method and device, electronic equipment and storage medium
CN113687827B (en) Data list generation method, device and equipment based on widget and storage medium
US20240211479A1 (en) Query Generation Based On A Logical Data Model With One-to-One Joins
CN111625538B (en) Data processing method and device based on virtual data table technology and electronic equipment
CN114840560B (en) Unstructured data conversion and storage method and device

Legal Events

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

Ref document number: 21890566

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.08.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21890566

Country of ref document: EP

Kind code of ref document: A1