CN116756052B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN116756052B
CN116756052B CN202311043099.9A CN202311043099A CN116756052B CN 116756052 B CN116756052 B CN 116756052B CN 202311043099 A CN202311043099 A CN 202311043099A CN 116756052 B CN116756052 B CN 116756052B
Authority
CN
China
Prior art keywords
node
nodes
target
marking
class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311043099.9A
Other languages
Chinese (zh)
Other versions
CN116756052A (en
Inventor
王东伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202311043099.9A priority Critical patent/CN116756052B/en
Publication of CN116756052A publication Critical patent/CN116756052A/en
Application granted granted Critical
Publication of CN116756052B publication Critical patent/CN116756052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3628Software debugging of optimised code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology

Abstract

The invention discloses a data processing method and device, and relates to the technical field of data processing. One embodiment of the method comprises the following steps: receiving selection operation of the first knowledge graph and the second knowledge graph to display the two knowledge graphs respectively; receiving a selection operation of a first target node in a first knowledge graph to obtain a first node set and a first logic relation set between nodes; receiving a selection operation of a second target node in a second knowledge graph to obtain a second node set and a second logic relation set among nodes; comparing the first node set with the second node set, the first logic relation set and the second logic relation set to obtain a comparison result and marking the comparison result so as to update display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result. According to the embodiment, the comparison content can be flexibly selected, the method is not limited to integral comparison, and the map difference content is marked and visually displayed so as to improve the analysis efficiency of change influence.

Description

Data processing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method and apparatus.
Background
With the development of computer technology, software functions, system block diagrams, and the like all depend on code implementation implemented in a computer language. Code changes are required for a number of reasons, either to repair previous defects, to optimize functions, or to simply introduce new functions or business logic. But inevitably, the original service or logic is affected to some extent.
In order to identify the influence of the code changes, the current practice is to scan and acquire the association factors among the methods in the software, construct an association matrix through the association factors, and finally determine the change influence range by comparing the association matrices before and after the software changes.
In the process of implementing the present invention, the inventor finds that at least the following problems exist in the prior art: the association factor only represents the relation (such as calling, returning and the like) between the front association item and the back association item, the change of the internal logic of the association item cannot be presented, and in addition, the existing method only can analyze the whole software as a whole and cannot compare the front and back changes of certain contents. Furthermore, the change influence range cannot be visually and visually displayed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data processing method and apparatus, which at least can solve the problems in the prior art that whether the logic of the associated item itself is changed, the comparison content cannot be flexibly selected, and the difference content cannot be displayed.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a data processing method including:
receiving selection operation of the first knowledge graph and the second knowledge graph to display the first knowledge graph and the second knowledge graph respectively;
receiving a selection operation of a first target node in a first knowledge graph, and determining a first node set associated with the first target node and a first logic relation set among nodes in the first knowledge graph by taking the first target node as a starting point; and
receiving a selection operation of a second target node in the second knowledge graph, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relationship set between the nodes by taking the second target node as a starting point;
comparing the first node set with the second node set, the first logic relation set and the second logic relation set to obtain a comparison result and marking the comparison result so as to update display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result.
Optionally, before the receiving the selection operation of the first knowledge-graph and the second knowledge-graph, the method further includes:
receiving an imported software package and an engineering name set for the software package, and scanning objects in the software package and logical relations among the objects;
taking the engineering name as a root node, the object as a child node, and taking the logic relationship between the objects as edges, and generating a knowledge graph corresponding to the software package; the software package is a first software package or a second software package, the first software package corresponds to the first knowledge graph, and the second software package corresponds to the second knowledge graph.
Optionally, the object includes a package name, a class name, and a function name, and comparing the first node set with the second node set, the first logical relationship set and the second logical relationship set to obtain a comparison result and mark the comparison result, where the comparison result includes one or more of the following:
traversing the packet nodes in the first node set and the packet nodes in the second node set to determine different target packet nodes as comparison results, and performing marking processing on the target packet nodes, class nodes under the target packet nodes, function nodes and logic relations;
traversing class nodes under the packet nodes in the first node set and class nodes under the packet nodes in the second node set to determine different target class nodes as comparison results, and marking the target class nodes, function nodes under the target class nodes and logic relations;
Traversing function nodes under class nodes in the first node set and function nodes under class nodes in the second node set to determine that the comparison results are different objective function nodes, and performing marking processing on the objective function nodes and logic relations between the objective function nodes and other nodes;
traversing the logic relations between the function nodes and other nodes in the first logic relation set and the logic relations between the function nodes and other nodes in the second logic relation set to determine different target logic relations as comparison results, and performing marking processing on the target logic relations.
Optionally, the method further comprises:
for any node in class nodes and function nodes, acquiring node information, and carrying out encryption processing on the node information to obtain an encryption value;
determining that the attribute of the class node is changed in response to the difference between the encrypted value of the class node in the first node set and the encrypted value of the class node in the second node set; and
and determining that the attribute of the function node is changed in response to the fact that the encryption value of the function node in the first node set is different from the encryption value of the function node in the second node set.
Optionally, the target node is a first target node or a second target node, and the target node is one of the following cases:
The target node is an engineering node, a packet node, a class node or a function node;
the target node is a node range, and the node range is determined according to at least two selected engineering nodes, packet nodes, class nodes and function nodes.
Optionally, the method comprises the following steps:
marking the target packet node, including one of adding and deleting;
marking the target class node, the target function node and the target logic relationship, wherein the marking comprises one of adding, deleting and changing.
Optionally, the method comprises the following steps:
marking a preset first value for the new case, marking a preset second value for the deleted case, and marking a preset third value for the changed case.
Optionally, the method comprises the following steps:
marking the logic relationship, setting the logic relationship as a preset first line form under the condition of new addition, setting the logic relationship as a preset second line form under the condition of deletion, and setting the logic relationship as a preset third line form under the condition of change.
Optionally, updating the display information of at least one of the first knowledge-graph and the second knowledge-graph based on the marking result includes one or more of the following:
taking the first knowledge graph as a compared object and the second knowledge graph as a compared object;
Based on the marking result, displaying change information of the second knowledge-graph relative to the first knowledge-graph in the first knowledge-graph;
and displaying the change information of the second knowledge-graph relative to the first knowledge-graph in the second knowledge-graph based on the marking result.
Optionally, updating the display information of at least one of the first knowledge-graph and the second knowledge-graph based on the marking result further includes:
and determining a target color attribute corresponding to each marking result, and replacing the color attribute of the node and the logic relation corresponding to each marking result with the target color attribute.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a data processing apparatus including:
the selection module is used for receiving selection operation of the first knowledge graph and the second knowledge graph so as to display the first knowledge graph and the second knowledge graph respectively;
the determining module is used for receiving the selection operation of the first target node in the first knowledge graph, and determining a first node set associated with the first target node in the first knowledge graph and a first logic relation set among the nodes by taking the first target node as a starting point; and
Receiving a selection operation of a second target node in the second knowledge graph, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relationship set between the nodes by taking the second target node as a starting point;
the comparison module is used for comparing the first node set with the second node set, the first logic relation set and the second logic relation set to obtain a comparison result and marking the comparison result so as to update the display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result.
Optionally, the apparatus further comprises an identification module for:
receiving an imported software package and an engineering name set for the software package, and scanning objects in the software package and logical relations among the objects;
taking the engineering name as a root node, the object as a child node, and taking the logic relationship between the objects as edges, and generating a knowledge graph corresponding to the software package; the software package is a first software package or a second software package, the first software package corresponds to the first knowledge graph, and the second software package corresponds to the second knowledge graph.
Optionally, the object includes a package name, a class name, and a function name, and the comparison module includes one or more of the following:
Traversing the packet nodes in the first node set and the packet nodes in the second node set to determine different target packet nodes as comparison results, and performing marking processing on the target packet nodes, class nodes under the target packet nodes, function nodes and logic relations;
traversing class nodes under the packet nodes in the first node set and class nodes under the packet nodes in the second node set to determine different target class nodes as comparison results, and marking the target class nodes, function nodes under the target class nodes and logic relations;
traversing function nodes under class nodes in the first node set and function nodes under class nodes in the second node set to determine that the comparison results are different objective function nodes, and performing marking processing on the objective function nodes and logic relations between the objective function nodes and other nodes;
traversing the logic relations between the function nodes and other nodes in the first logic relation set and the logic relations between the function nodes and other nodes in the second logic relation set to determine different target logic relations as comparison results, and performing marking processing on the target logic relations.
Optionally, the comparison module is further configured to:
for any node in class nodes and function nodes, acquiring node information, and carrying out encryption processing on the node information to obtain an encryption value;
Determining that the attribute of the class node is changed in response to the difference between the encrypted value of the class node in the first node set and the encrypted value of the class node in the second node set; and
and determining that the attribute of the function node is changed in response to the fact that the encryption value of the function node in the first node set is different from the encryption value of the function node in the second node set.
Optionally, the target node is a first target node or a second target node, and the target node is one of the following cases:
the target node is an engineering node, a packet node, a class node or a function node;
the target node is a node range, and the node range is determined according to at least two selected engineering nodes, packet nodes, class nodes and function nodes.
Optionally, the comparison module is configured to:
marking the target packet node, including one of adding and deleting;
marking the target class node, the target function node and the target logic relationship, wherein the marking comprises one of adding, deleting and changing.
Optionally, the comparison module is configured to:
marking a preset first value for the new case, marking a preset second value for the deleted case, and marking a preset third value for the changed case.
Optionally, the comparison module is configured to:
marking the logic relationship, setting the logic relationship as a preset first line form under the condition of new addition, setting the logic relationship as a preset second line form under the condition of deletion, and setting the logic relationship as a preset third line form under the condition of change.
Optionally, the alignment module includes one or more of the following:
taking the first knowledge graph as a compared object and the second knowledge graph as a compared object;
based on the marking result, displaying change information of the second knowledge-graph relative to the first knowledge-graph in the first knowledge-graph;
and displaying the change information of the second knowledge-graph relative to the first knowledge-graph in the second knowledge-graph based on the marking result.
Optionally, the method further comprises a presentation module for:
and determining a target color attribute corresponding to each marking result, and replacing the color attribute of the node and the logic relation corresponding to each marking result with the target color attribute.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a data processing electronic device.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement any of the data processing methods described above.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements any of the above-described data processing methods.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer program product. A computer program product according to an embodiment of the present invention includes a computer program that, when executed by a processor, implements a data processing method according to an embodiment of the present invention.
According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the comparison content is flexibly selected from the knowledge graphs by people, the comparison is not limited to the whole comparison, the comparison is performed in the form of the knowledge graphs, the comparison time is reduced, the comparison efficiency is improved, different marking modes are set for different difference types, marking results are displayed in a visual form, visual feeling is given to users, and most of the processes are automated operation, so that the purpose of realizing expected results with lower cost is achieved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic flow diagram of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an alternative data processing method according to an embodiment of the invention;
FIG. 3 is a flow chart of another alternative data processing method according to an embodiment of the invention;
FIG. 4 is a flow chart of yet another alternative data processing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main modules of a data processing apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 7 is a schematic diagram of a computer system suitable for use in implementing a mobile device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is noted that embodiments of the invention and features of the embodiments may be combined with each other without conflict. In the technical scheme of the invention, the related aspects of acquisition, analysis, use, transmission, storage and the like of the personal information of the user accord with the regulations of related laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside the legal use aspects and the like, and are subjected to supervision and management of a supervision department. Necessary measures should be taken for the personal information of the user to prevent illegal access to such personal information data, ensure that personnel having access to the personal information data comply with the regulations of the relevant laws and regulations, and ensure the personal information of the user.
Once these user personal information data are no longer needed, the risk should be minimized by limiting or even prohibiting the data collection and/or deletion. User privacy is protected, when applicable, by de-identifying the data, including in some related applications, such as by removing a particular identifier (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at a city level rather than at a specific address level), controlling how the data is stored, and/or other methods.
With the development of computer technology, software is increasingly classified and scaled, and software functions are dependent on code implementation implemented in a computer language. The software development process involves code change scenarios, such as the need to optimize business functions, code errors, pre-fix flaws, etc. In addition, the scene described by the computer language can also be a scene of a system framework, an enterprise block diagram and the like, so that the scheme is suitable for the scene described by the computer language, and the scenes have certain logic.
At present, the influence generated by code change is identified by constructing an association matrix by association factors, and the specific process is as follows: 1) scanning software, storing relations among association items as association factors, 2) constructing an association matrix through the association factors after finding all the association factors, wherein the association matrix contains association relations among all the association items in the software, and 3) comparing the association matrices before and after the change to obtain a change influence range of codes. The existing operation mainly has the following problems:
1. there are alterations effects that are not recognized: the focus of the relevance factor concerns is on the change of the relevance between the front and back relevance items, such as the change from calling to returning, but the internal logic change of the relevance items cannot be presented. When the internal logic of the related item is changed, the relationship between the two is unchanged, so that the change cannot be identified.
2. Changes to particular content cannot be viewed: in the prior art, the whole software is used as a whole for analysis and comparison, and only partial content cannot be selected for change influence analysis.
3. The change influence range cannot be intuitively presented, and the generated static incidence matrix cannot generate visual experience for the user.
Referring to fig. 1, a main flowchart of a data processing method provided by an embodiment of the present invention is shown, including the following steps:
s101: receiving selection operation of the first knowledge graph and the second knowledge graph to display the first knowledge graph and the second knowledge graph respectively;
s102: receiving a selection operation of a first target node in a first knowledge graph, and determining a first node set associated with the first target node and a first logic relation set among nodes in the first knowledge graph by taking the first target node as a starting point;
s103: receiving a selection operation of a second target node in the second knowledge graph, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relationship set between the nodes by taking the second target node as a starting point;
s104: comparing the first node set with the second node set, the first logic relation set and the second logic relation set to obtain a comparison result and marking the comparison result so as to update display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result.
In the above embodiment, for step S101, the comparison is performed in the form of a knowledge graph, for example, the knowledge graph a has been generated according to the old code installation package before, when the code is changed, the changed code installation package is uploaded to the system to generate the new knowledge graph B, and then the user selects the knowledge graph a on the system operation interface and clicks the "comparison" option, so that the comparison of the knowledge graph a and the knowledge graph B is triggered. The knowledge graph consists of nodes and edges, wherein the edges represent the logical relationship between the nodes, such as package nodes contain class nodes, and function 1 nodes call function 2 nodes.
For steps S102-S103, the comparison content is manually selected by manpower, so that the comparison content can be the whole knowledge graph, part of the content in the knowledge graph, all the content of one branch in the knowledge graph, and only one range of content, and is specifically determined by manual selection.
According to the scheme, the first knowledge graph is A, the second knowledge graph is B, and the nodes are required to be manually selected, so that after the knowledge graphs are selected, the two knowledge graphs are displayed at first:
1. Firstly, selecting a compared node from the first knowledge graph A, namely a first target node, wherein the node can be a root node of the first knowledge graph A, can be an existing node in the graph, such as a packet node, a class node or a function node, and can also be a section of node range, such as a root node-function node A111, a father node A1-class node A11 and a class node A12.
Taking codes as an example, a root node is usually set as an engineering name node, a packet node is arranged below the root node, a class node is arranged below the packet node, a function node is arranged below the class node, and logic relations exist among the function nodes and between the function nodes and the class nodes. The engineering name can be input after the uploading software installation package is generated, the name can be customized, the installation package name can also be directly used for naming, and if the engineering name is not customized, the installation package name is used as the engineering name by default.
And assuming that the root node is selected, determining the logic relationship among all packet nodes under the root node, all class nodes under the packet nodes, all function nodes under the class nodes and the function nodes by taking the root node as a starting point, thereby constructing a first node set and a first logic relationship set. If a certain class of nodes is selected, the class of nodes is needed to be used as a starting point, and a first node set and a first logic relation set are constructed according to the logic relation of all function nodes and function nodes below the class of nodes. Assuming that a certain node range is selected, all nodes within the node range and logical relationships between the nodes need to be determined to construct a first set of nodes and a first set of logical relationships.
2. And selecting a compared node from the second knowledge graph B, namely a second target node. Similarly, the node may be a root node in the second knowledge graph B, or an existing node in the graph, such as a packet node, a class node, or a function node, or a range of nodes, such as a root node-function node B111, a parent node B1-class node B11, and a class node B12.
And assuming that the root node is selected, determining the logic relationship among all the packet nodes under the root node, all the class nodes under the packet nodes, all the function nodes under the class nodes and the function nodes by taking the root node as a starting point, thereby constructing a second node set and a second logic relationship set. Assuming that a certain class of nodes is selected, the class of nodes is needed to be used as a starting point, and a second node set and a second logical relation set are constructed according to the logical relation of all function nodes and function nodes below the class of nodes. Assuming that a certain node range is selected, all nodes within the node range and logical relationships between the nodes need to be determined to construct a second set of nodes and a second set of logical relationships.
It should be noted that the first target node and the second target node must be the same, for example, both are root nodes, or both are a certain node range, so as to ensure that the two nodes have comparability.
For step S104, the first node set and the second node set, and the first logical relationship set and the second logical relationship set are compared, and the comparison process uses the selected node as a starting point to sequentially compare whether each node below the selected node can be matched with the existing node. When the selected node is the engineering node, the global comparison of the whole engineering is carried out, and the sub-packets, classes and functions of the whole engineering are traversed and compared. When a node is selected as a non-engineering node, specific content comparison is entered, and traversal and comparison are started from the corresponding node. For example, if the selected nodes are all nodes of a certain class, the selected nodes of the first knowledge graph A and the second knowledge graph B are used as starting points for comparison, so that comparison of specific contents is completed quickly, comparison time is saved, and comparison efficiency is improved.
After the comparison is completed, marking processing can be performed on the nodes and logic relations with different comparison results, for example, the nodes and the logic relations are uniformly displayed in red, so that full black display (characters and lines are black) of the previous knowledge graph can be distinguished. For example, the comparison result is highlighted by different nodes and logic relations, so that the difference between the two knowledge maps, namely the difference between the code change front and the code change rear, is displayed. In addition, besides the visual display difference, the visual display difference can be displayed in an animation mode, so that the change influence can be conveniently checked.
The display can be displayed on the first knowledge graph A, the second knowledge graph B, or both the first knowledge graph A and the second knowledge graph B, and the display is specifically executed according to selection or setting.
For example, the first knowledge graph a is used for an old version, the second knowledge graph B is used for a new version, the first knowledge graph a is used as a compared object, the second knowledge graph B is used as a compared object, change information of the second knowledge graph B relative to the first knowledge graph a, such as newly added content, changed content and deleted content in the second knowledge graph a, is displayed in the first knowledge graph a based on a marking result, and after the difference information is completed, all change and influence paths are displayed.
Alternatively, the second knowledge-graph B displays the change information with respect to the first knowledge-graph a, and since these pieces of information are all located in the second knowledge-graph B, only these pieces of information may be specially processed, such as the aforementioned change color, highlighting, and the like.
According to the method provided by the embodiment, the difference content between the patterns is determined by comparing the knowledge patterns and is presented in a visual form, so that misjudgment possibly caused by manual judgment can be avoided, the comparison content can be flexibly selected, the method is not limited to integral comparison, and the analysis efficiency of change influence is improved.
Referring to fig. 2, an alternative flow chart of a data processing method according to an embodiment of the invention is shown, comprising the following steps:
s201: receiving an imported software package and an engineering name set for the software package, and scanning objects in the software package and logical relations among the objects;
s202: taking the engineering name as a root node, the object as a child node, and taking the logic relationship between the objects as edges, and generating a knowledge graph corresponding to the software package; the software package is a first software package or a second software package, the first software package corresponds to the first knowledge graph, and the second software package corresponds to the second knowledge graph;
s203: receiving selection operation of the first knowledge graph and the second knowledge graph to display the first knowledge graph and the second knowledge graph respectively;
s204: receiving a selection operation of a first target node in a first knowledge graph, and determining a first node set associated with the first target node and a first logic relation set among nodes in the first knowledge graph by taking the first target node as a starting point;
s205: receiving a selection operation of a second target node in the second knowledge graph, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relationship set between the nodes by taking the second target node as a starting point;
S206: comparing the first node set with the second node set, the first logic relation set and the second logic relation set to obtain a comparison result and marking the comparison result so as to update display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result.
In the above embodiment, the steps S203 to S206 may be described with reference to fig. 1, and are not described herein.
With regard to steps S201 and S202, the present embodiment will be described only with respect to a software installation package. The user imports the software installation package into the system, the system starts the scanning function, scans the uploaded software installation package to obtain and record the package, class, function in the installation package, and logical relationships between class and function, function and function, such as "include", "call", and the like. The package, class and function are used as nodes and the information of the logical relation among the nodes is used as context, so that the information is stored in the knowledge graph in the form of a topological graph, and finally the information is presented in the form of the knowledge graph.
In addition, after the user uploads the software installation package to the system, the user also needs to name the software installation package to obtain the engineering name. The engineering name can be input after the software installation package is uploaded, such as a custom name, or the installation package name can be directly used for naming, and if the software installation package is not custom, the installation package name is used as the engineering name by default. Thus, after scanning, the nodes in the knowledge graph are generated according to engineering names, package names, class names and function names.
And uploading the changed software installation and deployment package to a system when codes are changed later, and selecting and comparing, wherein a comparison object is a previously generated knowledge graph, and manual selection is needed. For example, the system presents the existing engineering name by manually selecting from the desktop or manually selecting the comparison button, then the user selects from the existing engineering name, for example, the software installation package B is uploaded this time, the user clicks the comparison, the list presented by the system comprises A, then the user selects A, and then the comparison is performed on the knowledge graph A and the knowledge graph B.
According to the method provided by the embodiment, the software installation package is scanned to search the code change contents, and the contents are presented in a visual form, so that misjudgment possibly caused by manual judgment can be reduced, analysis efficiency of change influence is improved, and expected results are realized at lower cost.
Referring to FIG. 3, another alternative flow chart of a data processing method according to an embodiment of the invention is shown, comprising the steps of:
s301: traversing the packet nodes in the first node set and the packet nodes in the second node set to determine different target packet nodes as comparison results, and performing marking processing on the target packet nodes, class nodes under the target packet nodes, function nodes and logic relations;
S302: traversing class nodes under the packet nodes in the first node set and class nodes under the packet nodes in the second node set to determine different target class nodes as comparison results, and marking the target class nodes, function nodes under the target class nodes and logic relations;
s303: traversing function nodes under class nodes in the first node set and function nodes under class nodes in the second node set to determine that the comparison results are different objective function nodes, and performing marking processing on the objective function nodes and logic relations between the objective function nodes and other nodes;
s304: traversing the logic relations between the function nodes and other nodes in the first logic relation set and the logic relations between the function nodes and other nodes in the second logic relation set to determine different target logic relations as comparison results, and performing marking processing on the target logic relations.
In the above embodiment, for steps S301 to S304, the first node set and the second node set, and the first logical relationship set and the second logical relationship set are compared, and the comparison process uses the selected node as a starting point, and sequentially compares whether each node below the selected node can be matched with the existing node.
In the first embodiment, when the selected node is an engineering node, global comparison of the whole engineering is performed.
1. Firstly traversing packet nodes, comparing whether newly added and deleted packet nodes exist or not, marking the newly added and deleted packet nodes with corresponding labels respectively, and enabling the marked packet nodes not to participate in the comparison;
2. secondly, traversing class nodes under unchanged package nodes, comparing whether the newly added, deleted or changed class nodes exist, marking the newly added class nodes and the deleted or changed class nodes with corresponding labels respectively, and enabling the marked class nodes not to participate in the comparison;
3. thirdly, traversing function nodes under unchanged class nodes, comparing whether the function nodes are newly added, deleted or changed, marking the newly added function nodes, the deleted or changed function nodes with corresponding marks respectively, and enabling the marked function nodes not to participate in the comparison;
4. and traversing the logic relationship between the unchanged function node and other nodes, specifically, comparing whether the function node and the class node have new, deleted or changed relationships, and marking the new, deleted or changed logic relationship correspondingly.
The first three steps are used for comparing the nodes, so that the first node set and the second node set are compared, and the fourth step is used for comparing the logic relationship, so that the first logic relationship set and the second logic relationship set are compared.
In the scheme, the class node and the function node are subjected to MD5 processing on the information in the nodes, and the information can be obtained by MD5 conversion of the rest of contents after removing the annotation space symbol and the line feed symbol when the class and the function are scanned. The specific operation of the subsequent comparison is as follows: comparing whether the encryption value of the class node in the first node set is the same as the encryption value of the class node in the second node set, and comparing whether the encryption value of the function node in the first node set is the same as the encryption value of the function node in the second node set, so that the comparison speed is increased. Thus, for class nodes, function nodes and logic relations, three cases of adding, deleting and changing are included, and for packet nodes, only two cases of adding and deleting exist.
In the second embodiment, when the selected node is a packet node, comparison of branches corresponding to the packet node is performed.
1. Firstly, traversing class nodes under a packet node, comparing whether the class nodes are newly added, deleted or changed, and respectively marking the newly added class nodes and the deleted or changed class nodes with corresponding labels, wherein the labeled class nodes do not participate in the comparison;
2. secondly, traversing function nodes under unchanged class nodes, comparing whether the function nodes are newly added, deleted or changed, marking the newly added function nodes, the deleted or changed function nodes with corresponding marks respectively, and enabling the marked function nodes not to participate in the comparison;
3. And traversing the logic relationship between the unchanged function node and other nodes, specifically, comparing whether the function node and the class node have new, deleted or changed relationships, and marking the new, deleted or changed logic relationship correspondingly.
In the third embodiment, when the selected node is a class node, comparison of branches corresponding to the class node is performed.
1. Traversing function nodes under class nodes, comparing whether the function nodes are newly added, deleted or changed, marking the function nodes which are newly added, deleted or changed with corresponding labels respectively, and enabling the marked function nodes not to participate in the comparison;
2. traversing the logic relationship between the unchanged function node and other nodes, specifically, comparing whether the function node and the class node have new, deleted or changed relationships, and marking the new, deleted or changed logic relationships correspondingly.
In the fourth embodiment, when the selected node is a function node, comparison of logical relationships associated with the function node is performed.
And traversing the logic relationship between the function node and other nodes, specifically, comparing whether the function node and the class node have new, deleted or changed relationships, and marking the new, deleted or changed logic relationship correspondingly.
In a fifth embodiment, a node range is selected, where the node range is determined according to at least two selected engineering nodes, packet nodes, class nodes, and function nodes, and comparison is performed between the nodes, or between the nodes and the logical relationship.
The method provided by the embodiment can flexibly select comparison contents, is not limited to integral comparison, can be a node or a node range, and can compare the selected comparison contents, so that the comparison has flexible selectivity, and the analysis efficiency of change influence is improved.
Referring to FIG. 4, another alternative flow chart of a data processing method according to an embodiment of the invention is shown, comprising the steps of:
s401: receiving selection operation of the first knowledge graph and the second knowledge graph to display the first knowledge graph and the second knowledge graph respectively;
S402: receiving a selection operation of a first target node in a first knowledge graph, and determining a first node set associated with the first target node and a first logic relation set among nodes in the first knowledge graph by taking the first target node as a starting point;
s403: receiving a selection operation of a second target node in the second knowledge graph, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relationship set between the nodes by taking the second target node as a starting point;
s404: comparing the first node set with the second node set to obtain a comparison result and marking; marking a first numerical value for the newly added condition, marking a second numerical value for the deleted condition, and marking a third numerical value for the changed condition;
s405: comparing the first logic relation set with the second logic relation set to obtain a comparison result and marking; marking the logic relationship, setting the logic relationship as a black solid line form under the condition of new addition, setting the logic relationship as a broken line form under the condition of deletion, and setting the logic relationship as a virtual solid line form under the condition of change;
s406: updating display information of at least one of the first knowledge-graph and the second knowledge-graph based on the marking result; and determining a target color attribute corresponding to each marking result, and replacing the color attribute of the node and the logic relation corresponding to each marking result with the target color attribute.
In the above embodiment, the steps S401 to S403 may be described with reference to fig. 1, and are not described herein.
For step S404, in the present solution, when comparing two knowledge maps, the selected node is used as a starting point, and whether each node below the selected node can be matched with the existing node is sequentially compared. If there are new nodes marked 1 (i.e., first value), if there are deleted nodes marked 2 (i.e., second value), if there are node attribute changes marked 3 (i.e., third value). If there is no change, the labeling value is a default value of 0, or if there is no need to label each node as 0 by default, and then the node is changed from 0 to 1 according to the comparison result, for example, a new node is added.
For step S405, after the node comparison is completed, the logical relationship comparison of the function is continuously traversed, and it is verified whether the relationship sent by the function is different from the original relationship. There are three ways in which the marking can be done:
1. only the numbers are marked, and the marking modes of the numbers are the same as the marking modes of the nodes.
2. Marking numbers and changing lines, wherein the marking numbers are the same as the marking modes of the nodes: if the new logical relationship is marked as 1 and a black solid line (i.e. a preset first line) relationship is established with the corresponding function, if the new logical relationship is marked as 2 and is represented by a broken line (i.e. a preset second line), and if the new logical relationship is marked as 3 and is represented by a virtual-real line (i.e. a preset third line).
3. Only the lines are marked: the solid black line form is set in the case of the new addition, the broken line form is set in the case of the deletion, and the solid virtual line form is set in the case of the change.
In order to enable the comparison result to be clearer and give visual experience to the user, the scheme preselection adopts a second mode.
For step S406, by traversing each marking result to call the color attribute corresponding to each marking result, the node and the logic relationship corresponding to each marking result are displayed with different marked colors, such as setting new addition to red, deletion to green, and change to yellow. Further, the display may be highlighted.
For example, the first knowledge graph a includes three packet nodes A1, A2, and A3, the second knowledge graph B includes four packet nodes A1, A2, A3, and A4 is a new node, and A4 and all the nodes and logic relationships below the new node are replaced by red from original black. Here, it is assumed that the nodes and lines of the original map are black, and may be actually of other colors, and here, black is taken as an example for illustration.
For example, the first knowledge graph a includes three class nodes a11, a12 and a13 under A1, and the second knowledge graph B includes three class nodes a11, a12 and a13 under A1, but when the comparison finds that the node information of a12 in the two knowledge graphs is different, the first knowledge graph a12 and all the nodes and logic relations under the first knowledge graph a are replaced by yellow from black.
For example, the first knowledge graph a includes three class nodes a11, a12 and a13 under A1. For example, the first knowledge graph a includes three function nodes a111, a112 and a113 under a11, and the second knowledge graph B includes two function nodes a111 and a112 under a11, so that a113 and a logical relationship are displayed and the original black color is changed into green.
After the comparison, the content after the change is displayed in the knowledge graph, and the differences are displayed in the modes of labeling, color changing, highlighting and the like, so that visual and visual feeling is given to the user.
Compared with the prior art, the method provided by the embodiment of the invention has at least the following beneficial effects:
1. the method comprises the steps of installing a package by scanning software, taking the package, class and function as nodes, taking the relation between the nodes as edges, generating a knowledge graph, and comparing the knowledge graph with the knowledge graph in the follow-up process, so that the comparison speed is improved. In the node information, the attribute of the class node and the function node comprises an MD5 value besides the node name, so that the subsequent node comparison is convenient;
2. the comparison content can be flexibly selected, is not limited to overall comparison, and can present a change influence range from class and function levels. And selecting specific content for comparison and checking change influence, and sequentially comparing whether each node below the selected node can be matched with the existing node by taking the selected node as a starting point during comparison, so that the time cost is reduced, and the comparison efficiency is improved.
3. Different marking forms are set for different difference types, and for the logic relationship, a line form can be set, so that the difference types are displayed in a dynamic visual form, and visual feeling is given to a user.
4. The whole operation only depends on the user to upload the software installation package, select the knowledge graph and the nodes, the rest process is all automatic, and the whole operation can simplify the algorithm, so that the expected result is realized at lower cost.
Referring to fig. 5, a schematic diagram of main modules of a data processing apparatus 500 according to an embodiment of the present invention is shown, including:
a selection module 501, configured to receive a selection operation of the first knowledge-graph and the second knowledge-graph, so as to display the first knowledge-graph and the second knowledge-graph, respectively;
a determining module 502, configured to receive a selection operation of a first target node in the first knowledge-graph, determine a first node set associated with the first target node in the first knowledge-graph and a first logical relationship set between nodes by using the first target node as a starting point; and
receiving a selection operation of a second target node in the second knowledge graph, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relationship set between the nodes by taking the second target node as a starting point;
And the comparison module 503 is configured to compare the first node set with the second node set, the first logical relationship set and the second logical relationship set, obtain a comparison result, and mark the comparison result, so as to update display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result.
The implementation device of the invention further comprises an identification module for:
receiving an imported software package and an engineering name set for the software package, and scanning objects in the software package and logical relations among the objects;
taking the engineering name as a root node, the object as a child node, and taking the logic relationship between the objects as edges, and generating a knowledge graph corresponding to the software package; the software package is a first software package or a second software package, the first software package corresponds to the first knowledge graph, and the second software package corresponds to the second knowledge graph.
In the embodiment of the present invention, the object includes a package name, a class name, and a function name, and the comparison module 503 includes one or more of the following:
traversing the packet nodes in the first node set and the packet nodes in the second node set to determine different target packet nodes as comparison results, and performing marking processing on the target packet nodes, class nodes under the target packet nodes, function nodes and logic relations;
Traversing class nodes under the packet nodes in the first node set and class nodes under the packet nodes in the second node set to determine different target class nodes as comparison results, and marking the target class nodes, function nodes under the target class nodes and logic relations;
traversing function nodes under class nodes in the first node set and function nodes under class nodes in the second node set to determine that the comparison results are different objective function nodes, and performing marking processing on the objective function nodes and logic relations between the objective function nodes and other nodes;
traversing the logic relations between the function nodes and other nodes in the first logic relation set and the logic relations between the function nodes and other nodes in the second logic relation set to determine different target logic relations as comparison results, and performing marking processing on the target logic relations.
In the embodiment of the present invention, the comparison module 503 is further configured to:
for any node in class nodes and function nodes, acquiring node information, and carrying out encryption processing on the node information to obtain an encryption value;
determining that the attribute of the class node is changed in response to the difference between the encrypted value of the class node in the first node set and the encrypted value of the class node in the second node set; and
And determining that the attribute of the function node is changed in response to the fact that the encryption value of the function node in the first node set is different from the encryption value of the function node in the second node set.
In the implementation device of the invention, the target node is a first target node or a second target node, and the target node is one of the following conditions:
the target node is an engineering node, a packet node, a class node or a function node;
the target node is a node range, and the node range is determined according to at least two selected engineering nodes, packet nodes, class nodes and function nodes.
In the embodiment of the present invention, the comparison module 503 is configured to:
marking the target packet node, including one of adding and deleting;
marking the target class node, the target function node and the target logic relationship, wherein the marking comprises one of adding, deleting and changing.
In the embodiment of the present invention, the comparison module 503 is configured to:
marking a preset first value for the new case, marking a preset second value for the deleted case, and marking a preset third value for the changed case.
In the embodiment of the present invention, the comparison module 503 is configured to:
Marking the logic relationship, setting the logic relationship as a preset first line form under the condition of new addition, setting the logic relationship as a preset second line form under the condition of deletion, and setting the logic relationship as a preset third line form under the condition of change.
In the embodiment of the present invention, the comparison module 503 includes one or more of the following:
taking the first knowledge graph as a compared object and the second knowledge graph as a compared object;
based on the marking result, displaying change information of the second knowledge-graph relative to the first knowledge-graph in the first knowledge-graph;
and displaying the change information of the second knowledge-graph relative to the first knowledge-graph in the second knowledge-graph based on the marking result.
The implementation device of the invention further comprises a presentation module for:
and determining a target color attribute corresponding to each marking result, and replacing the color attribute of the node and the logic relation corresponding to each marking result with the target color attribute.
In addition, the implementation of the apparatus in the embodiments of the present invention has been described in detail in the above method, so that the description is not repeated here.
Fig. 6 shows an exemplary system architecture 600 in which embodiments of the invention may be applied, including terminal devices 601, 602, 603, a network 604, and a server 605 (by way of example only).
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, are installed with various communication client applications, and a user may interact with the server 605 through the network 604 using the terminal devices 601, 602, 603 to receive or transmit messages, etc.
The network 604 is used as a medium to provide communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The server 605 may be a server providing various services, and it should be noted that, the method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, there is illustrated a schematic diagram of a computer system 700 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 707 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 701.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor comprises a selection module, a determination module and an alignment module. The names of these modules do not in any way constitute a limitation of the module itself, for example the selection module may also be described as a "display module".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to perform any of the data processing methods described above.
The computer program product of the invention comprises a computer program which, when being executed by a processor, implements the data processing method in the embodiments of the invention.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (20)

1. A method of data processing, comprising:
receiving an imported software package and an engineering name set for the software package, and scanning objects in the software package and logical relations among the objects; wherein the object comprises a package name, a class name and a function name;
Taking the engineering name as a root node, taking the object as a child node, and taking the logic relationship between the objects as edges, and generating a knowledge graph corresponding to the software package; the software package is a first software package or a second software package, the first software package corresponds to the first knowledge graph, and the second software package corresponds to the second knowledge graph;
receiving selection operation of the first knowledge graph and the second knowledge graph to display the first knowledge graph and the second knowledge graph respectively;
receiving a selection operation of a first target node in a first knowledge graph, wherein the target node is a node range, the node range is determined according to at least two selected engineering nodes, packet nodes, class nodes and function nodes, the first target node is taken as a starting point, all nodes in the node range and logic relations among the nodes are determined, and a first node set associated with the first target node in the first knowledge graph and a first logic relation set among the nodes are determined; and
receiving a selection operation of a second target node in the second knowledge graph, determining all nodes in the node range and logic relations among the nodes by taking the second target node as a starting point, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relation set among the nodes;
Comparing the first node set with the second node set, the first logic relation set and the second logic relation set to obtain a comparison result and marking the comparison result so as to update display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result.
2. The method of claim 1, wherein the comparing the first set of nodes with the second set of nodes, the first set of logical relationships, and the second set of logical relationships results in a comparison and marking, comprising one or more of:
traversing the packet nodes in the first node set and the packet nodes in the second node set to determine different target packet nodes as comparison results, and performing marking processing on the target packet nodes, class nodes under the target packet nodes, function nodes and logic relations;
traversing class nodes under the packet nodes in the first node set and class nodes under the packet nodes in the second node set to determine different target class nodes as comparison results, and marking the target class nodes, function nodes under the target class nodes and logic relations;
traversing function nodes under class nodes in the first node set and function nodes under class nodes in the second node set to determine that the comparison results are different objective function nodes, and performing marking processing on the objective function nodes and logic relations between the objective function nodes and other nodes;
Traversing the logic relations between the function nodes and other nodes in the first logic relation set and the logic relations between the function nodes and other nodes in the second logic relation set to determine different target logic relations as comparison results, and performing marking processing on the target logic relations.
3. The method according to claim 2, wherein the method further comprises:
for any node in class nodes and function nodes, acquiring node information, and carrying out encryption processing on the node information to obtain an encryption value;
determining that the attribute of the class node is changed in response to the difference between the encrypted value of the class node in the first node set and the encrypted value of the class node in the second node set; and
and determining that the attribute of the function node is changed in response to the fact that the encryption value of the function node in the first node set is different from the encryption value of the function node in the second node set.
4. A method according to claim 2 or 3, characterized in that the target node is a first target node or a second target node, the target node being an engineering node, a packet node, a class node or a function node.
5. The method according to claim 2, characterized by comprising:
Marking the target packet node, including one of adding and deleting;
marking the target class node, the target function node and the target logic relationship, wherein the marking comprises one of adding, deleting and changing.
6. The method according to claim 5, comprising:
marking a preset first value for the new case, marking a preset second value for the deleted case, and marking a preset third value for the changed case.
7. A method according to claim 5 or 6, comprising:
marking the logic relationship, setting the logic relationship as a preset first line form under the condition of new addition, setting the logic relationship as a preset second line form under the condition of deletion, and setting the logic relationship as a preset third line form under the condition of change.
8. The method of claim 1, wherein updating the display information of at least one of the first knowledge-graph and the second knowledge-graph based on the marking result comprises one or more of:
taking the first knowledge graph as a compared object and the second knowledge graph as a compared object;
based on the marking result, displaying change information of the second knowledge-graph relative to the first knowledge-graph in the first knowledge-graph;
And displaying the change information of the second knowledge-graph relative to the first knowledge-graph in the second knowledge-graph based on the marking result.
9. The method according to claim 1 or 8, wherein updating the display information of at least one of the first knowledge-graph and the second knowledge-graph based on the marking result, further comprises:
and determining a target color attribute corresponding to each marking result, and replacing the color attribute of the node and the logic relation corresponding to each marking result with the target color attribute.
10. A data processing apparatus, comprising:
the identification module is used for receiving the imported software package and the engineering name set for the software package, and scanning objects in the software package and logical relations among the objects; wherein the object comprises a package name, a class name and a function name; taking the engineering name as a root node, taking the object as a child node, and taking the logic relationship between the objects as edges, and generating a knowledge graph corresponding to the software package; the software package is a first software package or a second software package, the first software package corresponds to the first knowledge graph, and the second software package corresponds to the second knowledge graph;
the selection module is used for receiving selection operation of the first knowledge graph and the second knowledge graph so as to display the first knowledge graph and the second knowledge graph respectively;
The determining module is used for receiving the selection operation of a first target node in the first knowledge graph, wherein the target node is a node range, the node range is determined according to at least two selected engineering nodes, packet nodes, class nodes and function nodes, the first target node is taken as a starting point, all nodes in the node range and the logic relationship among the nodes are determined, and a first node set associated with the first target node in the first knowledge graph and a first logic relationship set among the nodes are determined; and
receiving a selection operation of a second target node in the second knowledge graph, determining all nodes in the node range and logic relations among the nodes by taking the second target node as a starting point, and determining a second node set associated with the second target node in the second knowledge graph and a second logic relation set among the nodes;
the comparison module is used for comparing the first node set with the second node set, the first logic relation set and the second logic relation set to obtain a comparison result and marking the comparison result so as to update the display information of at least one of the first knowledge graph and the second knowledge graph based on the marking result.
11. The apparatus of claim 10, wherein the alignment module comprises one or more of:
Traversing the packet nodes in the first node set and the packet nodes in the second node set to determine different target packet nodes as comparison results, and performing marking processing on the target packet nodes, class nodes under the target packet nodes, function nodes and logic relations;
traversing class nodes under the packet nodes in the first node set and class nodes under the packet nodes in the second node set to determine different target class nodes as comparison results, and marking the target class nodes, function nodes under the target class nodes and logic relations;
traversing function nodes under class nodes in the first node set and function nodes under class nodes in the second node set to determine that the comparison results are different objective function nodes, and performing marking processing on the objective function nodes and logic relations between the objective function nodes and other nodes;
traversing the logic relations between the function nodes and other nodes in the first logic relation set and the logic relations between the function nodes and other nodes in the second logic relation set to determine different target logic relations as comparison results, and performing marking processing on the target logic relations.
12. The apparatus of claim 11, wherein the alignment module is further configured to:
For any node in class nodes and function nodes, acquiring node information, and carrying out encryption processing on the node information to obtain an encryption value;
determining that the attribute of the class node is changed in response to the difference between the encrypted value of the class node in the first node set and the encrypted value of the class node in the second node set; and
and determining that the attribute of the function node is changed in response to the fact that the encryption value of the function node in the first node set is different from the encryption value of the function node in the second node set.
13. The apparatus according to claim 11 or 12, wherein the target node is a first target node or a second target node, and the target node is an engineering node, a packet node, a class node or a function node.
14. The apparatus of claim 11, wherein the alignment module is configured to:
marking the target packet node, including one of adding and deleting;
marking the target class node, the target function node and the target logic relationship, wherein the marking comprises one of adding, deleting and changing.
15. The apparatus of claim 14, wherein the alignment module is configured to:
marking a preset first value for the new case, marking a preset second value for the deleted case, and marking a preset third value for the changed case.
16. The apparatus of claim 14 or 15, wherein the alignment module is configured to:
marking the logic relationship, setting the logic relationship as a preset first line form under the condition of new addition, setting the logic relationship as a preset second line form under the condition of deletion, and setting the logic relationship as a preset third line form under the condition of change.
17. The apparatus of claim 10, wherein the alignment module comprises one or more of:
taking the first knowledge graph as a compared object and the second knowledge graph as a compared object;
based on the marking result, displaying change information of the second knowledge-graph relative to the first knowledge-graph in the first knowledge-graph;
and displaying the change information of the second knowledge-graph relative to the first knowledge-graph in the second knowledge-graph based on the marking result.
18. The apparatus of claim 10 or 17, further comprising a presentation module configured to:
and determining a target color attribute corresponding to each marking result, and replacing the color attribute of the node and the logic relation corresponding to each marking result with the target color attribute.
19. An electronic device, comprising:
One or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-9.
20. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-9.
CN202311043099.9A 2023-08-18 2023-08-18 Data processing method and device Active CN116756052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311043099.9A CN116756052B (en) 2023-08-18 2023-08-18 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311043099.9A CN116756052B (en) 2023-08-18 2023-08-18 Data processing method and device

Publications (2)

Publication Number Publication Date
CN116756052A CN116756052A (en) 2023-09-15
CN116756052B true CN116756052B (en) 2023-11-14

Family

ID=87957582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311043099.9A Active CN116756052B (en) 2023-08-18 2023-08-18 Data processing method and device

Country Status (1)

Country Link
CN (1) CN116756052B (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9925011D0 (en) * 1998-10-26 1999-12-22 Ibm System and method for analysing dependencies of a computer program
US6360358B1 (en) * 1999-03-11 2002-03-19 Microsoft Corporation Maintenance of code knowledge for up-to-date access thereof
CN104035772A (en) * 2014-06-09 2014-09-10 中国科学院软件研究所 Static analysis based source code multi-versionfunction call relation difference identification method
WO2015121805A1 (en) * 2014-02-11 2015-08-20 Wix.Com Ltd. A system for comparison and merging of versions in edited websites and interactive applications
CN105159715A (en) * 2015-09-01 2015-12-16 南京大学 Python code change reminding method on basis of abstract syntax tree node change extraction
US9747446B1 (en) * 2013-12-26 2017-08-29 Fireeye, Inc. System and method for run-time object classification
CA2930618A1 (en) * 2016-05-20 2017-11-20 Tse-Kin Tong Knowledge management system
CN107944036A (en) * 2017-12-13 2018-04-20 美林数据技术股份有限公司 A kind of acquisition methods of collection of illustrative plates variation
CN108509338A (en) * 2018-03-17 2018-09-07 东南大学 A kind of Software Evolution assessment system and method based on multi-level analysis on altered project
US10365905B1 (en) * 2017-10-26 2019-07-30 Facebook, Inc. Systems and methods for evaluating application performance changes via comparative call graphs
CN111400197A (en) * 2020-05-29 2020-07-10 支付宝(杭州)信息技术有限公司 Application package analysis method and device and computer readable storage medium
CN112100322A (en) * 2020-08-06 2020-12-18 复旦大学 API element comparison result automatic generation method based on knowledge graph
CN114048329A (en) * 2021-11-25 2022-02-15 工银科技有限公司 Knowledge graph construction and display method and device, electronic equipment and medium
CN114564515A (en) * 2022-03-01 2022-05-31 中山大学 Unified storage method, device and medium for multi-version knowledge graph
CN114647735A (en) * 2020-12-21 2022-06-21 京东科技控股股份有限公司 Relation graph display method, medium and display device
CN114676266A (en) * 2022-03-29 2022-06-28 建信金融科技有限责任公司 Conflict identification method, device, equipment and medium based on multilayer relation graph
CN114692155A (en) * 2022-05-30 2022-07-01 中国海洋大学 Vulnerability code map construction and code vulnerability detection method based on knowledge map
CN114780330A (en) * 2022-03-18 2022-07-22 网易(杭州)网络有限公司 Code monitoring method and device
CN115543402A (en) * 2022-11-21 2022-12-30 北京大学 Software knowledge graph increment updating method based on code submission
CN115618011A (en) * 2022-09-28 2023-01-17 中国科学院自动化研究所 Knowledge question answering method, knowledge question answering device, electronic equipment and readable storage medium
CN115827487A (en) * 2022-12-22 2023-03-21 百度(中国)有限公司 Knowledge graph construction and query method, device, equipment, storage medium and product

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060224925A1 (en) * 2005-04-05 2006-10-05 International Business Machines Corporation Method and system for analyzing an application

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9925011D0 (en) * 1998-10-26 1999-12-22 Ibm System and method for analysing dependencies of a computer program
US6360358B1 (en) * 1999-03-11 2002-03-19 Microsoft Corporation Maintenance of code knowledge for up-to-date access thereof
US9747446B1 (en) * 2013-12-26 2017-08-29 Fireeye, Inc. System and method for run-time object classification
WO2015121805A1 (en) * 2014-02-11 2015-08-20 Wix.Com Ltd. A system for comparison and merging of versions in edited websites and interactive applications
CN104035772A (en) * 2014-06-09 2014-09-10 中国科学院软件研究所 Static analysis based source code multi-versionfunction call relation difference identification method
CN105159715A (en) * 2015-09-01 2015-12-16 南京大学 Python code change reminding method on basis of abstract syntax tree node change extraction
CA2930618A1 (en) * 2016-05-20 2017-11-20 Tse-Kin Tong Knowledge management system
US10365905B1 (en) * 2017-10-26 2019-07-30 Facebook, Inc. Systems and methods for evaluating application performance changes via comparative call graphs
CN107944036A (en) * 2017-12-13 2018-04-20 美林数据技术股份有限公司 A kind of acquisition methods of collection of illustrative plates variation
CN108509338A (en) * 2018-03-17 2018-09-07 东南大学 A kind of Software Evolution assessment system and method based on multi-level analysis on altered project
CN111400197A (en) * 2020-05-29 2020-07-10 支付宝(杭州)信息技术有限公司 Application package analysis method and device and computer readable storage medium
CN112100322A (en) * 2020-08-06 2020-12-18 复旦大学 API element comparison result automatic generation method based on knowledge graph
CN114647735A (en) * 2020-12-21 2022-06-21 京东科技控股股份有限公司 Relation graph display method, medium and display device
CN114048329A (en) * 2021-11-25 2022-02-15 工银科技有限公司 Knowledge graph construction and display method and device, electronic equipment and medium
CN114564515A (en) * 2022-03-01 2022-05-31 中山大学 Unified storage method, device and medium for multi-version knowledge graph
CN114780330A (en) * 2022-03-18 2022-07-22 网易(杭州)网络有限公司 Code monitoring method and device
CN114676266A (en) * 2022-03-29 2022-06-28 建信金融科技有限责任公司 Conflict identification method, device, equipment and medium based on multilayer relation graph
CN114692155A (en) * 2022-05-30 2022-07-01 中国海洋大学 Vulnerability code map construction and code vulnerability detection method based on knowledge map
CN115618011A (en) * 2022-09-28 2023-01-17 中国科学院自动化研究所 Knowledge question answering method, knowledge question answering device, electronic equipment and readable storage medium
CN115543402A (en) * 2022-11-21 2022-12-30 北京大学 Software knowledge graph increment updating method based on code submission
CN115827487A (en) * 2022-12-22 2023-03-21 百度(中国)有限公司 Knowledge graph construction and query method, device, equipment, storage medium and product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
知识地图与知识图谱研究进展;赵蓉英;陈必坤;;情报学进展(第00期);全文 *

Also Published As

Publication number Publication date
CN116756052A (en) 2023-09-15

Similar Documents

Publication Publication Date Title
US11132114B2 (en) Method and apparatus for generating customized visualization component
CN114490395A (en) Test processing method, device, equipment and medium
CN110413367B (en) Task creation method and device, storage medium and electronic equipment
CN113138927B (en) Software function test method and device
CN114297476A (en) Questionnaire survey method, system, electronic equipment and storage medium based on user tags
CN114386896A (en) Information sending method, page display device, electronic equipment and medium
CN116756052B (en) Data processing method and device
CN112596738A (en) Method and device for determining front-end page to be tested, storage medium and electronic equipment
CN111026629A (en) Method and device for automatically generating test script
CN115563942A (en) Contract generation method and device, electronic equipment and computer readable medium
CN115454956A (en) Log generation method and device, electronic equipment and storage medium
CN111181836B (en) Message pushing method and device
CN112947918A (en) Data display method and device
CN113312900A (en) Data verification method and device
CN113284174A (en) Method and device for processing pictures
CN111061625A (en) Automatic testing method and device applied to out-of-order password keyboard
CN110908763A (en) Acceptance method, device, equipment and storage medium
CN111309592B (en) Authority checking method, device, storage medium and terminal
CN115309612B (en) Method and device for monitoring data
CN111414566A (en) Method and device for pushing information
CN112417259A (en) Media resource processing method, device, equipment and storage medium
CN109871310B (en) Version quality testing method and device
CN112437479B (en) Hotspot connection method and device
CN113760586A (en) Picture detection method and device
CN111291199B (en) Information query method and device

Legal Events

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