Unlock instant, AI-driven research and patent intelligence for your innovation.

Code reconstruction method and system on packet level based on combined clustering

A clustering and code technology, applied in the field of code reconstruction, can solve problems such as high time complexity of hierarchical clustering algorithm, unfavorable processing software, etc., to achieve the effect of improving security and reducing running time

Pending Publication Date: 2022-04-12
以萨技术股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the hierarchical clustering algorithm has a high time complexity, which is not conducive to dealing with large-scale software

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code reconstruction method and system on packet level based on combined clustering
  • Code reconstruction method and system on packet level based on combined clustering
  • Code reconstruction method and system on packet level based on combined clustering

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0033] Such as figure 1 As shown, this embodiment provides a method for refactoring code at the package level based on combination clustering, including the following steps:

[0034] S1: Obtain code data to be refactored;

[0035] S2: construct the entity attribute matrix of the code module from the code data to be reconstructed;

[0036] S3: Calculate the similarity between entities based on the entity attribute matrix to obtain an entity similarity matrix;

[0037] S4: According to entity similarity matrix, adopt density clustering algorithm to cluster entity and obtain entity cluster grouping;

[0038] It should be noted that, in this embodiment, the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm is used to cluster the entities. In addition, the OPTICS algorithm and the DENCLUE algorithm may also be used, for example.

[0039] S5: performing hierarchical clustering on each entity clustering group to obtain a clustering dendrogram;

[0040...

Embodiment 2

[0061] This embodiment provides a code reconstruction system at the package level based on combination clustering, including:

[0062] The code acquisition module is configured to: acquire code data to be refactored;

[0063] The entity attribute matrix construction module is configured to: construct the entity attribute matrix of the code module from the code data to be refactored;

[0064] The entity similarity matrix construction module is configured to: calculate the similarity between entities based on the entity attribute matrix to obtain an entity similarity matrix;

[0065] The entity clustering and grouping module is configured to: according to the entity similarity matrix, use the density clustering algorithm to cluster the entities to obtain the entity clustering groups;

[0066] The entity hierarchical clustering module is configured to: perform hierarchical clustering on each entity clustering group to obtain a clustering dendrogram;

[0067] The code refactorin...

Embodiment 3

[0069] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned code reconstruction method at the package level based on combination clustering is implemented. step.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the field of code reconstruction, and provides a code reconstruction method and system on a package level based on combined clustering, and the method comprises the steps: obtaining to-be-reconstructed code data; constructing an entity attribute matrix of the code module from the code data to be reconstructed; calculating the similarity between the entities based on the entity attribute matrix to obtain an entity similarity matrix; according to the entity similarity matrix, clustering entities by adopting a density clustering DBSCAN algorithm to obtain entity clustering groups; performing hierarchical clustering on each entity clustering group to obtain a clustering tree diagram; and based on a clustering tree diagram analysis result, segmenting a grouping result of code reconstruction.

Description

technical field [0001] The invention belongs to the field of code reconstruction, and in particular relates to a code reconstruction method and system at the package level based on combination clustering. Background technique [0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art. [0003] In the real world, evolution is an intrinsic property of software. As the software is enhanced, modified and adapted to new requirements, the code becomes more and more complex and gradually deviates from the original design, resulting in a gradual decline in the quality of the code, and refactoring is an effective way to solve this problem. Refactoring is a program organization method that modifies the code and improves the code quality without changing the external behavior of the code. However, finding the code that needs to be refactored and determining which refactoring strategy to us...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/72G06F16/35G06F40/194G06K9/62
Inventor 李文昊李凡平石柱国
Owner 以萨技术股份有限公司