CN116955719B - Code management method and system for digital storage of chained network structure - Google Patents
Code management method and system for digital storage of chained network structure Download PDFInfo
- Publication number
- CN116955719B CN116955719B CN202311215962.4A CN202311215962A CN116955719B CN 116955719 B CN116955719 B CN 116955719B CN 202311215962 A CN202311215962 A CN 202311215962A CN 116955719 B CN116955719 B CN 116955719B
- Authority
- CN
- China
- Prior art keywords
- code
- codes
- chain network
- chain
- network structure
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 143
- 238000012552 review Methods 0.000 claims abstract description 60
- 238000000034 method Methods 0.000 claims abstract description 45
- 238000006243 chemical reaction Methods 0.000 claims abstract description 13
- 238000011217 control strategy Methods 0.000 claims abstract description 5
- 238000004458 analytical method Methods 0.000 claims description 79
- 230000006870 function Effects 0.000 claims description 27
- 238000011161 development Methods 0.000 claims description 19
- 230000008569 process Effects 0.000 claims description 16
- 238000000547 structure data Methods 0.000 claims description 15
- 238000007689 inspection Methods 0.000 claims description 13
- 238000010276 construction Methods 0.000 claims description 12
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 238000001914 filtration Methods 0.000 claims description 10
- 230000000694 effects Effects 0.000 claims description 9
- 230000008520 organization Effects 0.000 claims description 7
- 238000012795 verification Methods 0.000 claims description 7
- 238000012550 audit Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 6
- 238000005516 engineering process Methods 0.000 claims description 5
- 230000006872 improvement Effects 0.000 claims description 5
- 230000002159 abnormal effect Effects 0.000 claims description 4
- 230000007547 defect Effects 0.000 claims description 4
- 238000003058 natural language processing Methods 0.000 claims description 4
- 239000012141 concentrate Substances 0.000 claims description 3
- 230000002457 bidirectional effect Effects 0.000 claims description 2
- 230000008859 change Effects 0.000 abstract description 9
- 230000008901 benefit Effects 0.000 description 7
- 238000005457 optimization Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 238000012360 testing method Methods 0.000 description 6
- 230000000007 visual effect Effects 0.000 description 5
- 238000000605 extraction Methods 0.000 description 4
- 238000013135 deep learning Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000013475 authorization Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000012916 structural analysis Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 241000700605 Viruses Species 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000003339 best practice Methods 0.000 description 1
- 238000007635 classification algorithm Methods 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- ZXQYGBMAQZUVMI-GCMPRSNUSA-N gamma-cyhalothrin Chemical compound CC1(C)[C@@H](\C=C(/Cl)C(F)(F)F)[C@H]1C(=O)O[C@H](C#N)C1=CC=CC(OC=2C=CC=CC=2)=C1 ZXQYGBMAQZUVMI-GCMPRSNUSA-N 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000007373 indentation Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000003012 network analysis Methods 0.000 description 1
- 238000001303 quality assessment method Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
- G06F8/433—Dependency analysis; Data or control flow analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/43—Checking; Contextual analysis
- G06F8/436—Semantic checking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/101—Access control lists [ACL]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2221/00—Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/21—Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F2221/2141—Access rights, e.g. capability lists, access control lists, access tables, access matrices
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a code management method and a system for digitally storing a chained network structure, wherein the method comprises the following steps: starting code management and performing code group management service; entering a code management platform and searching and analyzing codes; analyzing and converting code information; displaying and modifying codes; AST conversion and binarization of codes; storing source codes and chain network structure information; code review and review pass again for the modified code. The invention can more intuitively store the version and the branching relation of the codes by utilizing the storage scheme of the chained network structure, so that the version control of the codes is more flexible and intuitive, the chained network structure stores the codes in the cloud, the access rights of different users or roles are limited by the rights control strategy, the code safety is protected, and unauthorized access and accidental code change are prevented. All changes can be traced, ensuring that code changes are traceable.
Description
Technical Field
The invention relates to the field of software development, in particular to a code management method and system for digitally storing a chained network structure.
Background
In today's high-speed development of technology and web services, there is an increasing need for the scenerization of underlying code management. Not only needs convenient browsing and editing functions, but also gets rid of the single management requirement on local files, thereby meeting the trend of mobile and online office. Meanwhile, the safety and disaster tolerance of the code file are also in higher demands.
Initially, local code management tools such as Eclipse, intelliJ IDEA, visual Studio Code have appeared on the market to facilitate the browsing of code files, the sorting of file formats, the automatic completion of codes, grammar checking, etc. However, these tools do not have the functionality to backup and remotely synchronize code files. Therefore, a cloud code management platform such as SVN and Github is generated, and local files can be conveniently uploaded to the cloud or pulled to the local from the cloud and automatically combined. The code of the cloud can be used as a backup file to prevent local file abnormality or loss.
The code storage at the local and cloud is typically performed in a tree structure, i.e. the code modules consist of folders and code files, each folder may contain a plurality of code files and folders. In general, current code storage and management schemes include the following:
1. And (3) storing a local file: this is the most basic way of storing code, storing code files in local disk, which has the advantage of simple use and lower cost.
2. File sharing: and uploading the code file into a network sharing folder, and connecting the sharing folder by using a local area network. Its advantages are low cost and convenient collaborative development.
3. Version control tool: such as Git, SVN, etc. The tools have the advantages of easy version control, convenient collaborative development, incremental update and low bandwidth requirement.
4. On-line code hosting platform: such as GitHub, gitLab, etc. The method has the advantages that the method is approximately the same as a version control tool, is more convenient to operate and has stronger community support.
However, a common feature of these schemes is that the file management is still a tree-based file storage scheme, i.e. the code files are managed in the form of folders and subfiles. The tree structure-based file storage model has some obvious defects in practical application, such as inconvenient version management and easy version conflict during multi-user collaboration; the code file has low safety, is easy to illegally copy, and is not suitable for collaborative development in an encryption mode; the relevance among different files is not obvious, and the time and the labor are wasted when searching the files; and complex dependencies between files, etc., cannot be fully described.
Thus, with the growing maturity of digital computer programs and the ever-expanding size of programs, single file storage and management code is no longer an efficient solution. The digitized storage of codes in a database may be a better option, particularly when code files are expanding and the code to be managed is rapidly increasing, traditional file-based management may not be adequate. The storage scheme of the chained network structure based on digital storage can better meet the service requirement and improve the efficiency of code management.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a code management method and a system for digitally storing a chain network structure, which can more intuitively store the version and the branch relation of codes by utilizing a storage scheme of the chain network structure, so that the version control of the codes is more flexible and intuitive, the chain network structure stores the codes in a cloud, access authorities of different users or roles are limited by an authority control strategy, the code safety is protected, and unauthorized access and accidental code change are prevented. All changes can be traced, ensuring that code changes are traceable.
In order to achieve the above object, the present invention provides a code management method for digitally storing a chain network structure, including:
step S1: starting code management and performing code group management service;
step S2: entering a code management platform and searching and analyzing codes;
step S3: analyzing and converting code information;
step S4: displaying and modifying codes;
step S5: AST conversion and binarization of codes;
s6, storing source codes and chain network structure information;
step S7: code review and review pass again for the modified code.
Further, the step S1 specifically includes:
step S11: the developer provides a user name and a password to log in, and if no account number of the developer exists, a new account number needs to be registered
Step S12: after login or registration is successful, a user identification ID is added into session of the user;
step S13: querying of user code sets
Step S14: retrieving visible code sets according to role authority configuration of developer
Step S15: and managing the members of the code group, if the code group does not exist, adding a new code group management service, and setting the code group manager as a user identification ID in the current session.
Further, the step S2 specifically includes:
step S21: performing validity verification, and performing identity and authority verification by using OAuth 2.0;
step S22: recording and processing the abnormal IP address;
step S23: performing menu display of an interface according to authority information of a user by using RBAC-based authority filtering;
step S24: code chained network retrieval and review using code retrieval and analysis services
Step S25: querying a qualified set of chain network structure information through an elastic search repository
Step S26: and (3) delivering the chained network structure meeting the requirements to a chained network structure storage service for data query to obtain a service chain set ChainList.
Further, the step S3 is specifically as follows:
step S31: collecting code identification ID in node information of the service chain, and transmitting the code identification ID to an AST code analysis engine for code source data inquiry;
step S32: performing deserialization construction on the queried code set to construct an abstract syntax number;
step S33: and exposing codes and chain structures to corresponding graphical editors according to different code languages.
Further, step S4 specifically includes using the ace.js online code management component and the LogicFlow flow structure management component to display the code chain and source code, then editing the code, and delivering the modified code information, code language type and code ID to the AST code analysis engine for processing.
Further, step S5 includes performing AST conversion on the code source code information, converting the AST semantic structure into json format, and performing binarization conversion on all the changed codes by using serialization tools.
Further, step S6 specifically includes delivering the binary converted byte stream information and semantic tree information analyzed by the AST engine to a code storage engine for source code storage; and carrying out structural analysis and comparison on the changed chained network structure information by a chained network structure analysis engine, and storing the structural analysis and comparison into a chained network structure storage engine.
Further, step S7 specifically includes:
step S71: the push service rabit MQ sends the review request to a reviewer;
step S72: the method comprises the steps that a reviewer receives a review request, performs quality inspection and review on submitted codes, and generates a review structure and review comments;
step S73: the developer modifies the code according to the feedback of the reviewer, and submits the modified code again for further examination;
step S74: the reviewer reviews the modified code again;
step S75: code that passes the audit can enter the backbone branch to become a formally publishable code version.
The code management system for the chain network structure digital storage is applicable to the code management method for the chain network structure digital storage, and comprises a code digital storage library 1, a chain network relation storage database 2, an AST code analysis analyzer 3, a chain network structure analysis engine 4, a code management platform 5, a code collaboration and sharing service 6, a code retrieval analysis service 7, a permission security management service 8, a code review service 9, a developer management service 10 and a code group management service 11;
The code digitizing memory 1 is used for storing digitized codes;
the chained network relation storage database 2 is used for storing chained network relation information of codes;
the AST code analysis parser 3 refers to a AST (Abstract Syntax Tree) code analysis parser for parsing a source code file into a form of a syntax tree to extract semantic information of a code;
the chain network structure analysis engine 4 is used for analyzing the chain network structure data in the code storage library;
the code management platform 5 is an integrated tool platform for managing, organizing and coordinating the various operations and activities in the digitized code storage scheme;
the code collaboration and sharing service 6 provides collaborative editing, version management, comments and discussions, code sharing and other functions, so that team members can concentrate on the same platform to develop and maintain codes together;
the code search analysis service 7 provides functions of code search and analysis;
the authority security management service 8 is used for managing and controlling the access authority of the user to the code storage library and the code resource, and defines different authority levels and access control strategies based on the identity and the role of the user so as to ensure that only authorized users can access and operate the code;
The code review service 9 is used for team members to conduct quality check, error identification and improvement suggestion of codes; through code review and inspection, the code quality can be improved, and potential defects and risks can be reduced;
the developer management service 10 is used for managing and tracking development activities and skill information of team members;
the code-group management service 11 is used to manage and organize code-groups in a code repository.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention provides a code management method and a system for digitally storing a chained network structure, which greatly improve the efficiency of mobile office work, reduce errors possibly caused by intermediate steps and solve the problem of inconsistent contents and states of local and cloud files by digitally storing codes in a cloud.
2. The invention provides a code management method and a system for digitally storing a chained network structure, which can more intuitively store the version and the branch relation of codes by utilizing a chained network structure storage scheme, so that the version control of the codes is more flexible and intuitive, the chained network structure stores the codes in a cloud, access rights of different users or roles are limited by a right control strategy, the code safety is protected, and unauthorized access and accidental code change are prevented. All changes can be traced, ensuring that code changes are traceable.
3. The invention provides a code management method and a system for digitally storing a chained network structure, which can realize more flexible file storage and management. The relationship between its nodes may be an interconnected network relationship so that the dependencies between files may be more accurately represented, helping to find potential problems, optimize code structure, and reduce unnecessary coupling.
4. The invention provides a code management method and a system for digitally storing a chained network structure, wherein each node in the chained network structure is an independent module and has independent identification and attribute. The modularization mode greatly improves the reusability and testability of codes, and a developer can quickly position and adjust the structure of the codes through chain network structure storage.
5. The invention provides a code management method and a system for digitally storing a chained network structure, codes are not fixedly existing in a specific file and area, but can be repeatedly called through a virtual chained structure, so that the effects of flexible storage and convenient browsing are achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will briefly explain the drawings needed in the embodiments or the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a system frame diagram of the present invention;
FIG. 3 is a block diagram of a chain network;
FIG. 4 is a diagram illustrating a comparison of common storage structures;
FIG. 5 is a diagram showing a comparative example of network structure;
FIGS. 6-7 are diagrams illustrating differences in memory structures;
FIG. 8 is a graph of code versus chain.
Description of the embodiments
The technical solution of the present invention will be more clearly and completely explained by the description of the preferred embodiments of the present invention with reference to the accompanying drawings.
As shown in fig. 1, the present invention specifically comprises:
step S1: starting code management and performing code group management service;
step S2: entering a code management platform and searching and analyzing codes;
step S3: analyzing and converting code information;
Step S4: displaying and modifying codes;
step S5: AST conversion and binarization of codes;
s6, storing source codes and chain network structure information;
step S7: code review and review pass again for the modified code.
Also includes automatic code optimization, as follows
A new module is added for code optimization. The input of the module is AST and chain network structure, and the output is optimized code.
In this module, a series of code optimization algorithms are implemented, such as removing redundant code, code compression, etc.
In the code modification and submission process, adding the step of code optimization. The developer may choose whether to use the auto-optimization function.
The system also comprises a code semantic understanding and recommending system, which is specifically as follows:
a new module is added for code semantic understanding. The inputs to the module are AST and the chained network structure and the outputs are semantic information (e.g., notes) of the code.
In this module, a code recommendation algorithm based on semantic information is implemented. This may require a combination of historical data of the code library and behavior data of the developer.
On the interface of code searching and viewing, functions based on semantic understanding and recommendation are added.
Also comprises deep learning and artificial intelligence, and is specifically as follows:
depending on your needs and resources, a suitable deep learning technique is selected, such as NLP or GNN.
Models and algorithms for deep learning-based code analysis, retrieval, recommendation are designed and implemented. This may require a large amount of code data to train.
Deep learning models and algorithms are integrated into your system as part of code analysis, retrieval, recommendation.
Also included are integrated test and deployment tools, specifically as follows:
a new module is added to the system for code testing and deployment. The module may integrate existing testing and deployment tools, such as Jenkins, docker, etc.
In the code modification and submission process, test and deployment steps are added. The developer may choose whether to use the automatic test and deployment functions.
In the code inspection process, a check of the test result and the deployment state is added.
Also comprises cross-language and cross-platform support, which is specifically as follows:
support for more programming languages is added in the AST code analysis engine. This may require the development of new language resolvers and compilers.
Support for more development platforms is added on the code management platform. This may require appropriate modification and optimization of interfaces and operations.
Cross-language transcoding and migration tools are developed. This may require a deep understanding of the grammatical and semantic features of the various languages.
As shown in fig. 1, the following describes a code management system digitally stored in a chained network structure in conjunction with fig. 1, which includes the following steps:
starting code management, providing a user name and a password for a developer management service to carry out identity verification when the developer logs in, if the developer does not have a development account, carrying out account registration by using the developer management service, wherein each user has an identity code besides an identity ID, a user identification ID user database is associated and searched, the identity code is generated through a Java UUID mechanism and is used for collaborative invitation, the identity code is equivalent to a mobile phone number/identity card number, and the user identification ID is added into a user session after the login or registration is successful.
The method comprises the steps of performing code group management service, performing inquiry of a user code group through the code group management service, filtering out the code group with the state of < disabled >, then searching the visible code group according to the role authority configuration of a developer, and also managing members of the code group, wherein the developer can perform inquiry and invitation of the developer through the identity code of the developer through the developer management service, or the member authority information is configured, and the authority of the developer is maintained, including adding, removing and modifying the access authority of the developer. If the code group does not exist, the code group management service needs to be added newly, a code group manager is set as a user identification ID in the current session, and the code group is selected for the next code management.
And entering a code management platform, and according to the user identification ID stored in the session and the group ID of the code group, carrying out validity check. An OAuth 2.0 authentication mechanism can be used to make authentication decisions to verify the identity and rights of the user. An access token (access token) and an authentication server (authorization server) are typically used in the authentication mechanism to implement the authentication procedure, and the access token and the user identification ID of the user need to be submitted to the authentication server, and are verified by a token verification algorithm (Token Verification) in OAuth 2.0, so as to verify the validity and authority of the authentication server. If the authentication check fails, prompting the abnormal information to the user, and recording the IP address of the user. When recording an IP address, the IP address calculates a hash value of the IP address using a hash function. Thus, the privacy of the user can be protected, meanwhile, the uniqueness of the IP can still be judged, when the IP is abnormal for a plurality of times to reach the threshold value, the IP is added into a blacklist, and a reasonable threshold value is set. After the blacklist is added, the IP address cannot continuously initiate subsequent requests, so that the safety of the code management platform is ensured. After authentication is successful, the authority security management service 8 performs menu display of the interface according to the authority information of the user by using authority filtering based on RBAC. This includes filtering the displayed menu items according to the user's role and the group ID of the code group. The rights filtering mechanism is implemented using condition judgment, access Control Lists (ACLs), and rules for access rights control.
The code searching and analyzing device comprises a code searching and analyzing service 7, a developer, a code chain network searching and analyzing service 7, a shared code group information checking service 6, a code collaboration and sharing service 6, a chain code filtering service, a chain search storage library in the code searching and analyzing service 7, a chain network structure information set meeting the conditions, and a chain network structure meeting the requirements, wherein the chain network structure is submitted to the chain network structure storage service for data searching to obtain a service chain set ChainList, and the service chain set is of a Json type and used for the next code conversion.
The code information is analyzed and converted, the code management platform searches and analyzes and inquires service chain set ChainList Json information through the code in the step 3, and the analysis and analysis are carried out by the chain network structure analysis engine 4, and a chain network structure of the code is constructed. After analyzing the chain network structure, the chain network structure analysis engine 4 collects the code identification ID in the node information of the service chain, and sends the collected code identification ID to the AST code analysis engine for code source data query, where the reason that the code and the chain network structure need to be separately queried is that the code and the chain network structure are separately stored, the chain network structure only concerns the structure and the associated information, the code concerns the semantics, the language and the source code, so that the chain network structure needs to be separately queried and combined, then the queried code set is subjected to deserialization construction to construct an abstract syntax number for extracting key field information such as class, function, variable, annotation and the like, and then the code and the chain structure are presented to the corresponding graphic editor according to different code languages, so that a developer is allowed to browse the code and the syntax analysis result. If the developer has editing authority, the developer can be allowed to edit the code, and after all information retrieval and conversion are completed, the code management platform 5 is used for displaying and modifying the code.
The code management platform 5 uses an ACE.js online code management component and a LogicFlow flow structure management component to display the code chain and source codes, and after the developer performs code editing and chain association editing, the modified code information, code language type and code ID are transmitted to the AST code analysis analyzer 3 for processing.
The code firstly converts the code source code information into an AST through an AST code analysis analyzer 3, the converted AST semantic structure is in json format so as to be stored and transmitted in the code storage process, and then all changed codes are binarized and converted by using serialization tools.
The binary converted byte stream information of the codes and semantic tree information analyzed by an AST engine are transmitted to a code digital storage library 1 for source code storage. For the changed chained network structure information, the chained network structure analysis engine 4 performs structure analysis and comparison, and stores the structure change record and the change content into the chained network relation storage database 2, wherein the network structure is stored into the graph database neo4j, and the table structure change record is stored into the mysql so as to facilitate subsequent search and query, and thus all code change submissions are completed.
After all the codes are changed, the developer can submit the code, and the code review service 9 flow engine automatically or manually triggers the code review flow according to the predefined review rules. The rules of the review include the code set of the application, chain, trigger condition, code information, review object, etc., the code review service 9 will send the review request to the reviewer using the push service rabit MQ, and the designated reviewer receives the review request, and performs quality inspection and review on the submitted code. The review process may include a review of the code structure, readability, code style, etc., while for the associated rationality of the chain network structure, the necessity of the chain node is reviewed, a review structure and review opinion are generated and notified to the developer, who modifies the code according to the feedback of the reviewer (same as step 3), and the modified code is submitted again for further review.
The modified code is subjected to the code review service 9 flow engine again to trigger a review flow, a reviewer carries out review again on the modified code, and if the code passes the review, the code passing the review can enter a main branch according to the review result to become a formally publishable code version.
And (5) ending.
The above is the main flow of the code management platform digitally stored in the chained network structure, and comprises the participation process of each service and key field information. The processes and services are combined together, a comprehensive code management and cooperation platform is provided for team development, team cooperation and code quality management can be effectively supported, and development efficiency, code quality and team cooperation capability, and maintainability and expandability of codes are improved.
Referring to fig. 2, the invention discloses a code management system for digitally storing a chained network structure, which comprises a code digital storage library 1, a chained network relation storage database 2, an AST code analysis analyzer 3, a chained network structure analysis engine 4, a code management platform 5, a code collaboration and sharing service 6, a code retrieval analysis service 7, a permission security management service 8, a code review service 9, a developer management service 10 and a code group management service 11.
The code digitizing repository 1 is mainly used for storing digitized codes, and after the code text source codes are added and modified from the code management platform 5 or imported, the code management platform 5 calls the AST code analysis parser 3 3 to process the text source codes. The AST code analysis parser 3 parses the syntax structure of the code to construct an abstract syntax tree of the code (Abstract Syntax Tree). The abstract syntax tree is data structure information representing code syntax in a tree structure, and is stored in a Json format to comprise variables, classes, functions and the like, so as to facilitate analysis and processing of codes, and finally, the extracted code structure, the relation Json information and a binary stream of code source codes are stored in a code digital storage library 1 in a digital form. The purpose of the digitized storage is to provide more efficient access and querying, and to support relational analysis and visualization of the code, and the component is used to store a digitized representation of the code, which may be a cloud server deployment or local network storage. The system is responsible for saving the chain network structure data of codes and providing interfaces for accessing and managing the code storage library, and comprises operations of creating, updating, deleting, inquiring codes and the like, and the system has large data volume and simple structure. The main technical support used is Redis, elasticSearch.
The chain network relation storage database 2 this component is used to store chain network relation information of codes. The whole chain network structure is completed by a chain network relation storage database 2, a chain network structure analysis engine 4 and a code management platform 5, wherein the code management platform 5 is used for constructing a chain network, associating nodes, adding chain nodes and the like, the chain structure management part is mainly constructed by using a LogicFlow open source framework technology, after construction, the flow chain structure data are subjected to structural cleaning and analysis by the chain network structure analysis engine 4, finally, the flow chain structure data are arranged to conform to expected chain structure Json information, and then the chain structure information is submitted to the chain network relation storage database for storage, and the chain structure network Json information mainly records the relation between nodes and edges in codes and the attribute information of the nodes and also contains the information of code chains, code association nodes, code groups, developers and the like. This database can be used to store and query dependencies between code files and dependencies of developers and code, and supports fast relational retrieval and expansion. The chain network structure is stored by a graph database, and the other chain network structure is stored by a relational database. The technical supports mainly used are Mysql, neo4j.
The AST code analysis parser 3 is a AST (Abstract Syntax Tree) code analysis parser, and is mainly used for parsing a source code file into a syntax tree form to extract semantic information of a code. The method analyzes the source code into a tree structure, describes various grammars and structures in the code file, including variables, classes, functions and the like, and provides basic data for further constructing a chain network structure. Technical demand support is carried out based on an open source framework ANTLR, and main components of the support comprise: a recognizer (recognizer), a compiler (compiler) and an interpreter (translator). In the whole code digitizing process, the AST code analysis analyzer 3 performs the functions of identifying, compiling and explaining, the code generated by the code management platform 5 needs to generate an analysis result in real time, the AST code analysis analyzer 3 needs to be called for source code analysis and code semantic extraction and display, when the code is stored, related semantic Json information and function internal source codes are submitted to the code digitizing storage library 1 by the AST code analysis analyzer 3 for storage, and then when the code needs to be inquired and displayed, the AST analyzer converts the semantic Json information into functions and variables and combines the function internal source codes to form a final complete text source code.
The chain network structure parsing engine 4 is used for parsing the chain network structure data in the code repository. The method acquires the relation between the nodes and the edges of the codes and the related attribute information from the database, and analyzes and processes the relation so as to better understand the organization structure, the module dependency relationship and the logic flow of the codes. The method comprises the steps of firstly obtaining chain network structure data from a code storage library, and then analyzing and analyzing according to the relation between nodes and edges. It may apply community discovery algorithms, graph traversal algorithms, etc. to infer the structure and relationship of the code. The parsing engine may also perform some analysis tasks such as extraction of code blocks, identification of duplicate codes, detection of dependencies, etc. The parsing engine may also use graph algorithm techniques such as graph traversal, graph clustering, graph matching, and the like. It may also be natural language processing techniques such as named entity recognition, keyword extraction, etc. to further understand the semantic meaning of the code. In the whole construction and display process of the chain structure network, the function born by the chain network structure analysis engine 4 is bidirectional conversion, when the chain structure is stored, network structure data content formed by a process construction UI component of the code management platform is converted into a chain network structure data set List conforming to a normal form, then the related data set List is stored into a neo4j graph database and a Mysql database from the chain network relation storage database 2, the graph database is used for facilitating relation network query, the Mysql database is used for structured retrieval, filtration and analysis and recording association of chain nodes and code nodes, and when the chain structure is required to be displayed, the engine queries the chain network relation and the code association relation from the chain network relation storage database 2 and converts the chain gateway system information into a data structure required by a structural network construction tool LogicFlow of the UI layer in the code management platform 5 so as to be convenient to display.
The code management platform 5 is an integrated tool platform for managing, organizing, and coordinating the various operations and activities in a digitized code storage scheme. It provides graphical interfaces and functions that allow a user to conveniently view, edit, publish and manage codes, and provide functions such as grammar checking, code indentation rules, keyword highlighting, autocompletion, etc. during the viewing and editing of codes, the components presented herein are primarily code-oriented rather than plain text. Therefore, the code grammar is compatible with pertinence, and the code grammar mainly supported is as follows: json, javaScript, java, html, etc. In addition, it also supports code version control, task management, construction and deployment functions. Typically includes user login and authentication, code import and creation, code browsing and editing, code submission and review, code release and deployment, and the like. The user may perform these operations using the interface provided by the platform and collaborate and share with other developers. Web development techniques are used such as front end frameworks (e.g., vue. Js, angullar js), back end servers (e.g., JAVA and node. Js), and databases (e.g., mySQL, mongoDB). It also uses code editor, code comparison and merging tool, such as ace, js, git, etc. to support the editing, comparison and merging operations of codes, in the whole chain network structure digital storage code management platform, it belongs to front end interface part, at the same time, the chain information analyzed by the chain network analysis engine is displayed by the logic flow component in chain network, when single chain node information is clicked to view source code information, the code management platform initiates query request to see, the final source code generated after combining function source code with information constructed by AST semantic analysis engine, at the same time, the whole process of codes is needed in the code management platform, including code cooperation and sharing service 6, code retrieval analysis service 7, authority security management service 8, code evaluation service 9 and developer management service 10 and code group management service 11, the foreground operation of these services is displayed by the code platform, the process stage of codes has no strong association, can exist alone, i.e. only code inspection platform can be used to conduct code display, or only conduct developer management, therefore the following services are part of code management platform.
The code collaboration and sharing service 6 is intended to facilitate collaboration and knowledge sharing between team members. The system provides the functions of collaborative editing, version management, comment and discussion, code sharing and the like, so that team members can concentrate on the same platform to jointly develop and maintain codes. In addition, it supports sharing and publishing of code for use and access by others. Team members may create a team, project, or organization on the code collaboration and sharing service and invite other members to join. They can edit the code together, discuss and comment, use tools to resolve conflicts and do code merging. In addition, they can share code and knowledge and browse and search for other people's codes on the code collaboration and sharing service.
The code search analysis service 7 provides functions of code search and analysis. It converts code into a searchable and analyzable data structure by indexing and analyzing the code in the code store so that a user can quickly and efficiently search and analyze code resources. The code retrieval analysis service 7 first acquires code data through a code repository, then performs syntax and semantic analysis on the code, and builds an index. The user inputs a keyword or a query condition through the search interface, and the code search analysis service 7 performs a query according to the index and returns a code result matching the query condition. The analysis function may provide functions such as code quality assessment, code complexity analysis, vulnerability detection, etc. Common techniques include full text search engines (e.g., elastic search, apache Lucene) for fast searching and retrieving codes, static code analysis techniques for analyzing code quality and vulnerability detection, and natural language processing techniques for semantic analysis and keyword extraction of code text.
The rights security management service 8 is used to manage and control the user's access rights to the code repository and code resources. It defines different levels of rights and access control policies based on user identity and role to ensure that only authorized users can access and operate the code. The rights security management service maintains a database of user identities and roles, as well as rights settings for the code repository. When a user accesses a code repository or performs a specific operation, the rights security management service checks the identity and role of the user and determines whether to allow the operation according to an access control policy. If the user does not have sufficient rights, access will be denied. Rights security management services typically use identity authentication and authorization mechanisms such as oauth2.0 and the like. It also uses role-based access control (RBAC) to manage and control user rights. In addition, encryption and protection measures of the server side are also important technologies for guaranteeing code security.
The code review service 9 is intended to facilitate review and inspection of codes between team members. It provides a set of procedures and tools that enable team members to conduct quality checks, error identification, and improvement suggestions for codes. Code quality can be improved, potential flaws and risks can be reduced through code review and inspection. The code review and audit service flow includes code submission, audit task assignment, reviewer review of the code, comment and improvement suggestion, code revision, final audit, and the like. The reviewer may review the code to present questions and suggestions based on predefined code quality criteria and best practices. The sponsor and developer revise the code according to the comments and confirm the combinability of the code in the final audit phase. Code review and review services typically use collaborative tools and flow management tools, such as Jira, gitLab, gitHub. It also often incorporates static code analysis tools, code specification inspection tools, and code comparison tools to help reviewers identify code quality problems, duplicate codes, unnormalized coding styles, etc., code review and review services use collaborative tools and flow management tools, such as Jira, gitHub, etc. And the Activity flow engine is used for the promotion of auditing. It also incorporates static code analysis tools, code specification inspection tools, and code comparison tools to help the reviewer identify code quality problems, duplicate codes, non-specification coding styles, etc.
The developer management service 10 is used to manage and track development activities and skill information for team members. It provides a centralized platform for recording and managing the personal information, skill assessment, project participation, etc. of the developer. This helps find the appropriate developer, learn about their expertise and engagement, and support personnel configuration and task allocation for the project. The developer management service maintains a developer database and records the affiliated team, roles, personal information, skills, experience, training records, etc. of the developer. Developers can update and maintain their personal information themselves, using databases to store and manage the developer's information.
The code-group management service 11 is used to manage and organize code-groups in a code repository. It provides a way to organize and categorize codes so that team members can organize codes in terms of different dimensions of project, module, function, etc., and support access and sharing of codes inside and outside the team. The code-group management service may improve the searchability and manageability of the code. The code group management service flow includes creation and naming of code groups, attribution and allocation of codes, authority management of code groups, association and dependence among code groups, and the like. Team members can browse and access codes of different code groups through the interface of the code group management service, and share and cooperate codes according to requirements. The code-group management service typically uses a database to store and manage code-group information. In terms of rights management, role-based access control (RBAC) is used to manage and control access rights of code sets. In addition, associations and dependencies between code sets are established and maintained through algorithms and models, such as dependency graphs, tag classification algorithms, and the like.
The invention provides a digitalized code management platform based on a chained network structure, which not only meets the requirements of mobile office and disaster tolerance in the sustainable development of code management, stores codes in a digitalized cloud end, but also adopts a chained network storage scheme of more fitting service, thereby improving the readability, the cooperatability and the maintainability of the codes.
As shown in fig. 3, the chain network structure is composed of a virtual chain common chain network node and an associated chain network node, and in general, a plurality of chains with different structures pass through the associated nodes, and the chains are only chains in a logic level and are used for describing the flow among the nodes;
as shown in fig. 4, the difference between various structures can be intuitively displayed, each structure has the advantages and disadvantages, the chain network structure is more complex, but the method is very suitable for the principle of decoupling and cohesion in a software system, and the strategy of opening is hugged, so that the links and the association are very clear from the whole view;
fig. 5 shows an example of a difference between a network structure and a chain network structure in a specific scenario, where the network structure may show a [ relational network ], that is, a difference between association relations of a certain subject cannot be intuitively seen, and a process of generating association by the subject cannot be shown. The chain network structure is very simple and visual, and meanwhile, the flexibility of the network structure is not lost;
Files are stored in a code pool, not in an entity, but in digitized form, and then the code is located in an indexed manner in the code pool, with the relationships between files not being the manner in which folders and subfiles in existing tree schemes. But flexible association, forms a virtual chain and an associated mode, and can add specific attributes to the modes, so that the associated information is more detailed, as shown in fig. 6;
FIG. 7 illustrates that after the files are digitized, the storage of the codes and the change of the application flow do not need local development tools or code storage tools of the local and cloud sides, but the digitized code management is directly completed through an integrated code management platform;
in the aspect of file version, the scheme of digital code management avoids the steps of pulling cloud codes, uploading local files and the like due to the mechanism of local management cloud synchronization of the traditional scheme, so that not only is the efficiency of mobile office work improved, but also errors possibly caused by intermediate steps are reduced, the development efficiency of software companies is further improved, the problem that the contents and states of the local and cloud files are inconsistent is thoroughly solved, and compared with the problem that the traditional code management scheme such as (git) has difficulty and conflict when complex code relationships are processed, the method and the system can store the versions and branch relationships of the codes more intuitively, so that the version control of the codes is more flexible and visual. The developer can more conveniently create, combine and manage different code branches, and support concurrent development and rapid iteration of codes.
In terms of security, the chained network structure stores codes in the cloud and limits access rights of different users or roles through rights control policies. Thus, it can control which users or teams have access to a particular code block, node or file at a fine granularity, while also facilitating statistics of the operations of each member on the file. Because the codes are digitized, risks cannot be caused by Trojan horse viruses of single files, file damage and tampering and file copy leakage. In addition, the configurable authority management model is adopted, the management and the checking authority of the codes are completely and flexibly controlled, and compared with the traditional scheme, the chained network structure digital storage scheme can realize fine-granularity authority control, and the authority management of accessing and modifying the codes for different users or roles is realized. The developer can give the appropriate rights to the different members as required and restrict access to the sensitive code. This helps to increase the security of the code, preventing unauthorized access and accidental code modification. All changes can be traced and code changes are guaranteed to be traceable. When security issues or unexpected modifications occur, the code may be more easily tracked and restored to the previous version. The security of the code of the enterprise is greatly ensured.
In the aspect of the relevance of codes, for the traditional tree file storage mode, the chain network structure can realize more flexible file storage and management. Because the chain structure is relative to the tree structure, the relation between the nodes of the chain structure can be not only a nested relation, but also a network relation of interconnection, thus files can be organized and managed more flexibly, and meanwhile, in the chain network structure, the dependency relation between the files can be expressed more accurately. Relative paths need to be searched upwards or downwards relative to the tree structure, and in the chain network structure, a complete dependency relationship network can be obtained only by traversing node dependency relationships existing in the file. Because the chain network structure stores the relation and the dependency relation of the codes, the structure and the dependency relation of the codes can be visualized, so that a developer can better understand the architecture and the organization mode of the codes. This helps to find potential problems, optimize code structure, and reduce unnecessary coupling. The complexity of the code can be better understood and managed through analysis of the code relationships.
In terms of the structural aspect of codes, the method is more modularized than the traditional tree file storage scheme, because each node is an independent module in a chained network structure and has independent identification and attribute. The nodes can be connected to form a large graph structure, so that a programmer can conveniently combine, reuse and multiplex codes. This modular approach greatly improves code reusability and testability. Meanwhile, as the nodes are modules with independent identification and attribute, each node can have a plurality of inputs and outputs, so that a plurality of different combination modes can be constructed. The flexible combination mode can carry out depth customization on the code files, and actual requirements can be better met. Moreover, the code structure in the chain network structure is intuitive, easy to understand and operate, each node represents a part of the code, and it can link other nodes and modules to form a code structure with obvious logical relations. The chain network structure storage can display the relation and the dependency relation of the codes in a visual mode, and helps a development team to better understand and analyze the architecture and the organization structure of the codes. Through the visualized code relation diagram, the dependency relation among the modules, inheritance relation among the classes and the like can be clearly displayed, so that a developer can better understand the structure and logic of the code, and can quickly position and adjust the structure of the code through chain network structure storage. Through visual viewing of code relationships, a developer can quickly locate a particular function or module and make the necessary structural adjustments. This helps to optimize the organization of the code, reduce redundancy, and improve maintainability of the code. The chain network structure store enables developers to more deeply analyze and understand complex code relationships, such as call paths, data flows, dependencies, and the like of code. By inquiring the chain network structure, the call chain of the code can be tracked, potential errors or performance problems can be found out, corresponding optimization is performed, and the quality and performance of the code are further improved.
In addition, because the digitalized storage advantage of the codes is achieved, the storage structure of the codes does not have isolation limitation that local files cannot be associated, the invention carries out transformation of the chain network structure, thus the whole-flow code content of the service can be conveniently and rapidly positioned and displayed through the chain network connection information, the comparison of the chain network structure and the traditional tree structure is shown in the attached drawing, the codes are not fixedly existing in a specific file and area through transformation of the chain network structure and the digitalized structure, but can be repeatedly called through the virtual chain structure, the effects of flexible storage and convenient browsing are achieved, and along with the increase of the number of the code files, the code positioning difficulty does not change, and the advantages compared with the traditional local tree structure are more obvious.
In summary, the digitized code storage scheme of the chained network structure has the characteristics of elegance, high flexibility and high efficiency. Such an approach may convert text codes into semantic web structures and store their codes digitally in a database using distributed storage techniques. Its main features include maintainability, extensibility, readability, interoperability and better code management and organization. Compared with the traditional tree structure, the chain network structure establishes richer relevance among the code nodes through various connection modes among the nodes, so that the logic structure of the source code is more accurately represented, the modularization degree is higher, the dependency management is more accurate, the safety control and backup recovery capability are better, and the efficiency and quality of code development and maintenance are improved.
As shown in FIG. 8, the relationship between codes and chains in a chain network system is schematically shown, and the main body is divided into a code space, a chain network, nodes and codes. The chain network associates different codes by means of nodes, and the code space can comprise a plurality of chain network structures.
The above detailed description is merely illustrative of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Various modifications, substitutions and improvements of the technical scheme of the present invention will be apparent to those skilled in the art from the description and drawings provided herein without departing from the spirit and scope of the invention. The scope of the invention is defined by the claims.
Claims (7)
1. A code management method for digitally storing a chain network structure, comprising:
step S1: starting code management and performing code group management service, wherein the step S1 specifically comprises the following steps:
step S11: the developer provides a user name and a password to log in, and if no account number of the developer exists, a new account number needs to be registered
Step S12: after login or registration is successful, a user identification ID is added into session of the user;
Step S13: querying of user code sets
Step S14: retrieving visible code sets according to role authority configuration of developer
Step S15: managing members of the code group, if the code group does not exist, adding a new code group management service, and setting a code group manager as a user identification ID in the current session;
step S2: entering a code management platform and code searching and analyzing, searching and checking a code chain network by a developer by using a code searching and analyzing service, checking shared code group information, carrying out data query by code cooperation and sharing service, if chain code filtering is required by keywords or information, transmitting the keyword information to an elastic search storage library in the code searching and analyzing service to query a chain network structure information set meeting the condition, and transmitting the chain network structure meeting the requirement to a chain network structure storage service to carry out data query to obtain a service chain set ChainList, wherein the structure is Json type and is used for the next code conversion;
step S3: the code information analysis and conversion, the code management platform searches and analyzes the service chain set ChainList Json information through codes, analyzes and analyzes the service chain set ChainList Json information through a chain network structure analysis engine, builds a chain network structure of the codes, collects code identification ID in node information of the service chain after the chain network structure analysis engine analyzes the chain network structure, sends the code source data query to an AST code analysis engine, and then carries out deserialization construction on the queried code set to build abstract grammar number for extracting key field information, and then gives the key field information to a corresponding graphical editor to display codes and the chain structure according to different code languages, so that a developer is allowed to browse the codes and grammar analysis results, if the developer has editing authority, the developer is allowed to edit the codes, and after all information retrieval and conversion are completed, the code management platform is used for displaying and modifying the codes;
Step S4: displaying and modifying codes;
step S5: AST conversion and binarization of codes;
step S6: the method comprises the steps of storing source codes and chain network structure information, wherein the chain network structure consists of virtual chain common chain network nodes and associated chain network nodes, and consists of a plurality of chains with different structures through the associated nodes, and the chains are only chains in a logic level and are used for describing the flow among the nodes;
the chain network relation storage database component is used for storing chain network relation information of codes, the whole chain network structure is jointly completed by a chain network relation storage database, a chain network structure analysis engine and a code management platform, wherein the code management platform is used for constructing a chain network, associating nodes and adding chain nodes, after the chain structure management part is constructed, the flow chain structure data is structurally cleaned and analyzed by the chain network structure analysis engine, finally, the flow chain structure data are arranged into expected chain structure Json information, the chain structure Json information is submitted to the chain network relation storage database for storage, the chain structure Json information records the relation between nodes and edges in the codes and the attribute information of the nodes, and meanwhile, the chain structure Json information also comprises code chains, code association nodes, code groups and developer information, the chain network relation storage database is used for storing and inquiring the dependency relation between the code files and the relation between the developer and the codes, and supports rapid relation retrieval and expansion, and the chain network structure is stored by the graph database, and other relation databases are used for storage;
The chain network structure analysis engine is used for analyzing the chain network structure data in the code storage library, acquiring the relation between the nodes and the edges of the code and the related attribute information from the database, and analyzing and processing the relation so as to better understand the organization structure, the module dependency relation and the logic flow of the code; firstly, obtaining chain network structure data from a code storage library, then analyzing and analyzing according to the relation between nodes and edges, and deducing the structure and relation of the codes; the method comprises the steps that a chain network structure analysis engine executes analysis tasks, a graph algorithm technology and a natural language processing technology are used, in the whole construction and display process of a chain structure network, the chain network structure analysis engine plays a role of bidirectional conversion, when a chain structure is stored, network structure data content formed by a flow construction UI component of a code management platform is converted into a chain network structure data set List conforming to a normal form, then the related data set List is stored into a neo4j graph database and a Mysql database from a chain network relation storage database, the graph database is used for facilitating relation network query, the Mysql database is used for searching, filtering and analyzing in a structured mode, and recording association between chain nodes and code nodes, and when the chain structure is required to be displayed, the chain network structure analysis engine queries the chain network relation and the code association relation from the chain network relation storage database and converts chain gateway system information into a data structure required by a structure network construction tool LogicFlow at a UI layer in the code management platform so as to be convenient to display;
Step S7: code review and review pass again for the modified code.
2. The method for managing digitally stored codes of a chain network architecture according to claim 1, wherein step S2 is specifically:
step S21: performing validity verification, and performing identity and authority verification by using OAuth 2.0;
step S22: recording and processing the abnormal IP address;
step S23: performing menu display of an interface according to authority information of a user by using RBAC-based authority filtering;
step S24: code chained network retrieval and review using code retrieval and analysis services
Step S25: querying a qualified set of chain network structure information through an elastic search repository
Step S26: and (3) delivering the chained network structure meeting the requirements to a chained network structure storage service for data query to obtain a service chain set ChainList.
3. The method for managing digitally stored codes of a chain network architecture according to claim 1, wherein step S3 is specifically as follows:
step S31: collecting code identification ID in node information of the service chain, and transmitting the code identification ID to an AST code analysis engine for code source data inquiry;
step S32: performing deserialization construction on the queried code set to construct an abstract syntax tree;
Step S33: and exposing codes and chain structures to corresponding graphical editors according to different code languages.
4. A method for managing digitally stored codes in a chained network architecture according to claim 3, wherein step S4 specifically comprises exposing the code chains and source codes using ace.js online code management components and LogicFlow flow structure management components, editing the codes, and submitting the modified code information, code language type, and code ID to an AST code analysis engine.
5. The method for managing digitally stored codes in a chain network structure according to claim 1, wherein step S5 comprises converting the code source code information into AST, converting the converted AST semantic structure into json format, and binarizing all the changed codes using serialization tools.
6. The method for managing digitally stored codes of a chain network architecture according to claim 1, wherein step S7 is specifically:
step S71: the push service rabit MQ sends the review request to a reviewer;
step S72: the method comprises the steps that a reviewer receives a review request, performs quality inspection and review on submitted codes, and generates a review structure and review comments;
Step S73: the developer modifies the code according to the feedback of the reviewer, and submits the modified code again for further examination;
step S74: the reviewer reviews the modified code again;
step S75: the code which passes the audit enters a trunk branch to become a formally publishable code version.
7. A code management system for digitally storing a chain network structure, which is applicable to the code management method for digitally storing a chain network structure according to any one of claims 1 to 6, and is characterized by comprising a code digital storage library, a chain network relation storage database, an AST code analysis analyzer, a chain network structure analysis engine, a code management platform, a code collaboration and sharing service, a code retrieval analysis service, a rights security management service, a code review service, a developer management service and a code group management service;
the code digitalized storage database is used for storing digitalized codes;
the chain network relation storage database is used for storing chain network relation information of codes;
the AST code analysis analyzer is used for analyzing the source code file into a grammar tree form so as to extract semantic information of the code;
The chain network structure analysis engine is used for analyzing the chain network structure data in the code storage library;
the code management platform is an integrated tool platform and is used for managing, organizing and coordinating various operations and activities in the digital code storage scheme;
the code collaboration and sharing service provides collaborative editing, version management, comments and discussions and code sharing functions, so that team members concentrate on the same platform to jointly develop and maintain codes;
the code searching and analyzing service provides code searching and analyzing functions;
the authority security management service is used for managing and controlling the access authority of a user to the code storage library and the code resource, and defines different authority levels and access control strategies based on the identity and the role of the user so as to ensure that only authorized users can access and operate the code;
the code review and inspection service is used for team members to conduct quality inspection, error identification and improvement suggestion of codes; through code review and inspection, the code quality is improved, and potential defects and risks are reduced;
the developer management service is used for managing and tracking development activities and skill information of team members;
The code-group management service is used to manage and organize code-groups in a code-repository.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311215962.4A CN116955719B (en) | 2023-09-20 | 2023-09-20 | Code management method and system for digital storage of chained network structure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311215962.4A CN116955719B (en) | 2023-09-20 | 2023-09-20 | Code management method and system for digital storage of chained network structure |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116955719A CN116955719A (en) | 2023-10-27 |
CN116955719B true CN116955719B (en) | 2023-12-05 |
Family
ID=88455021
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311215962.4A Active CN116955719B (en) | 2023-09-20 | 2023-09-20 | Code management method and system for digital storage of chained network structure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116955719B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118245983B (en) * | 2024-05-28 | 2024-07-30 | 深圳昂楷科技有限公司 | Network structure uniqueness identification acquisition method and cloud environment software authorization verification method |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473400A (en) * | 2013-08-27 | 2013-12-25 | 北京航空航天大学 | Software FMEA (failure mode and effects analysis) method based on level dependency modeling |
CN106796637A (en) * | 2014-10-14 | 2017-05-31 | 日本电信电话株式会社 | Analytical equipment, analysis method and analysis program |
CN110781086A (en) * | 2019-10-23 | 2020-02-11 | 南京大学 | Cross-project defect influence analysis method based on program dependency relationship and symbolic analysis |
CN111338622A (en) * | 2020-05-15 | 2020-06-26 | 支付宝(杭州)信息技术有限公司 | Supply chain code identification method, device, server and readable storage medium |
US10915304B1 (en) * | 2018-07-03 | 2021-02-09 | Devfactory Innovations Fz-Llc | System optimized for performing source code analysis |
CN113761163A (en) * | 2021-08-18 | 2021-12-07 | 浙江大学 | Deep code searching method, system and device based on code structure semantic information |
CN114528008A (en) * | 2022-01-28 | 2022-05-24 | 中银金融科技有限公司 | Code control method, device and medium based on distributed version control system |
CN114528221A (en) * | 2022-02-24 | 2022-05-24 | 北京航空航天大学 | Software defect prediction method based on heterogeneous graph neural network |
WO2022147574A1 (en) * | 2021-01-04 | 2022-07-07 | Codestream, Inc. | System and method for in-ide code review |
CN116302919A (en) * | 2022-11-29 | 2023-06-23 | 西安交通大学 | Multi-language extensible code dependency analysis model and analysis method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017134665A1 (en) * | 2016-02-03 | 2017-08-10 | Cocycles | System for organizing, functionality indexing and constructing of a source code search engine and method thereof |
US20210279338A1 (en) * | 2020-03-04 | 2021-09-09 | The George Washington University | Graph-based source code vulnerability detection system |
-
2023
- 2023-09-20 CN CN202311215962.4A patent/CN116955719B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473400A (en) * | 2013-08-27 | 2013-12-25 | 北京航空航天大学 | Software FMEA (failure mode and effects analysis) method based on level dependency modeling |
CN106796637A (en) * | 2014-10-14 | 2017-05-31 | 日本电信电话株式会社 | Analytical equipment, analysis method and analysis program |
US10915304B1 (en) * | 2018-07-03 | 2021-02-09 | Devfactory Innovations Fz-Llc | System optimized for performing source code analysis |
CN110781086A (en) * | 2019-10-23 | 2020-02-11 | 南京大学 | Cross-project defect influence analysis method based on program dependency relationship and symbolic analysis |
CN111338622A (en) * | 2020-05-15 | 2020-06-26 | 支付宝(杭州)信息技术有限公司 | Supply chain code identification method, device, server and readable storage medium |
WO2022147574A1 (en) * | 2021-01-04 | 2022-07-07 | Codestream, Inc. | System and method for in-ide code review |
CN113761163A (en) * | 2021-08-18 | 2021-12-07 | 浙江大学 | Deep code searching method, system and device based on code structure semantic information |
CN114528008A (en) * | 2022-01-28 | 2022-05-24 | 中银金融科技有限公司 | Code control method, device and medium based on distributed version control system |
CN114528221A (en) * | 2022-02-24 | 2022-05-24 | 北京航空航天大学 | Software defect prediction method based on heterogeneous graph neural network |
CN116302919A (en) * | 2022-11-29 | 2023-06-23 | 西安交通大学 | Multi-language extensible code dependency analysis model and analysis method |
Non-Patent Citations (2)
Title |
---|
一种基于UML关系的Java代码库构造方法;姜人和 等;计算机科学;第44卷(第11期);69-79 * |
基于深度学习的代码分析研究综述;张峰逸 等;计算机应用与软件;第35卷(第06期);9-17、22 * |
Also Published As
Publication number | Publication date |
---|---|
CN116955719A (en) | 2023-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Choudhury et al. | Auto-generation of smart contracts from domain-specific ontologies and semantic rules | |
Zupan et al. | Secure smart contract generation based on petri nets | |
Avgeriou et al. | Relating software requirements and architectures | |
Gerth | Business Process Models | |
Euzenat et al. | Ontology alignments: an ontology management perspective | |
CN116955719B (en) | Code management method and system for digital storage of chained network structure | |
US20230179622A1 (en) | Methods and systems for generating recommendations based on threat model knowledge graphs comprising crowdsourced modeling contributions | |
Francescomarino et al. | A framework for the collaborative specification of semantically annotated business processes | |
Fathalla et al. | SEO: A scientific events data model | |
Aslam et al. | Cross-platform real-time collaborative modeling: An architecture and a prototype implementation via emf. cloud | |
Salva et al. | A catalogue associating security patterns and attack steps to design secure applications | |
US11956269B2 (en) | Methods and systems for integrating crowd sourced threat modeling contributions into threat modeling systems | |
US20230177165A1 (en) | Methods and systems for comparing crowd sourced threat modeling systems to non-integrated threat modeling systems | |
Yao et al. | Modeling and configuration of process variants for on-boarding customers to IT outsourcing | |
Gómez-Pérez et al. | Ontological engineering and the semantic web | |
Arndt | Distributed Collaboration on Versioned Decentralized RDF Knowledge Bases | |
Leonard et al. | SQL Server 2012 integration services design patterns | |
Oussena et al. | Validating enterprise architecture using ontology-based approach: A case study of student internship programme | |
Navarro et al. | Antipatterns for architectural knowledge management | |
AlAmoudi et al. | GRLMerger: an automatic approach for integrating GRL models | |
Parreiras et al. | Towards a marketplace of open source software data | |
US12079216B2 (en) | Systems and methods for querying and performing operations on data using predicate logic extended to include quotation | |
Carpio Salvatierra | A proposal of automatic quality for Git commit messages | |
Salva et al. | A security pattern classification based on Data integration | |
Garcia | Curating and Standardizing Data: The Case Study of Pharmaceutical Company Using a Common Data Layer |
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 |