CN114035801A - Project optimization method and device - Google Patents

Project optimization method and device Download PDF

Info

Publication number
CN114035801A
CN114035801A CN202111433066.6A CN202111433066A CN114035801A CN 114035801 A CN114035801 A CN 114035801A CN 202111433066 A CN202111433066 A CN 202111433066A CN 114035801 A CN114035801 A CN 114035801A
Authority
CN
China
Prior art keywords
dependency
information
project
code
target
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.)
Pending
Application number
CN202111433066.6A
Other languages
Chinese (zh)
Inventor
王鑫
冯程
倪志华
陈郑渊明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111433066.6A priority Critical patent/CN114035801A/en
Publication of CN114035801A publication Critical patent/CN114035801A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Abstract

The invention provides a project optimization method and a device, which relate to the field of finance, and the method comprises the following steps: acquiring component information of a target project code; determining the dependency relationship of the member in the target code according to the member information of the target project code; and determining a component to be optimized of the target project according to the determined dependency relationship of the component, and optimizing the project according to the determined component to be optimized, so that the functions of dependent scanning and automatic optimization of the project are realized, the project development and maintenance efficiency is improved, and the burden of developers and project managers is reduced.

Description

Project optimization method and device
Technical Field
The invention relates to a data processing technology, in particular to a project optimization method and a project optimization device.
Background
In the prior art, most of application projects of banks are long-term iteration projects. Along with the continuous expansion of projects, the dependence in the project engineering is complicated and staggered, the project engineering becomes overstaffed, the project maintenance becomes difficult, the problems of dependence conflict, version dependence disorder and the like are caused, in addition, some specifications in the bank also have close relation with the project dependence, such as the detection and elimination of the impermissible open source dependence, the optimization of repeated dependence and the like, which bring extra cost to the development and maintenance and reduce the development and maintenance efficiency.
The negative influence of the bloated project on the development and maintenance efficiency of the project needs to be optimized.
Disclosure of Invention
Aiming at the problems of dependency conflict and dependent version confusion existing in project iteration in the prior art, the invention provides a project optimization method, which comprises the following steps:
acquiring component information of a target project code;
determining the dependency relationship of the member in the target code according to the member information of the target project code;
determining a component to be optimized of the target item according to the determined dependency relationship of the component;
and optimizing the project according to the determined component to be optimized.
In this embodiment of the present invention, the code for acquiring the target item includes:
acquiring pull information of a target item input by a user; the pull information includes: code connection, branch structure information and user information with code pulling authority of the target project;
and acquiring the engineering code of the target project by utilizing Git according to the pulling information.
In this embodiment of the present invention, the determining the dependency relationship of the component in the target code according to the component information of the target project code includes:
determining GAV information and dependency reference list information of the code member according to a Pom.xml configuration file of the Maven of the code member;
and establishing a dependency tree according to the GAV information and the dependency reference list information to determine the dependency relationship of the members in the target code.
In the embodiment of the present invention, the determining a component to be optimized according to the determined dependency relationship of the component includes:
marking the dependencies with the same coordinates and different version information as conflict dependencies;
marking the dependency with the same node coordinate and the same version information on a continuous chain in the dependency tree as a repeated dependency; and
inquiring the open source dependence according to preset open source dependence inquiry interface information to determine illegal open source dependence;
and determining the component to be optimized of the target item according to the conflict dependency, the repeated dependency and the illegal open source dependency.
Meanwhile, the invention also provides a project optimization device, which comprises:
the construction information acquisition module is used for acquiring component information of the target project code;
the dependency relationship determining module is used for determining the dependency relationship of the components in the target codes according to the component information of the target project codes;
the target determination module is used for determining a component to be optimized of the target item according to the determined dependency relationship of the component;
and the optimization module is used for optimizing the project according to the determined component to be optimized.
In the embodiment of the present invention, the code obtaining module includes:
the pull information acquisition unit is used for acquiring pull information of a target item input by a user; the pull information includes: code connection, branch structure information and user information with code pulling authority of the target project;
and the pulling unit is used for acquiring the engineering code of the target project by utilizing Git according to the pulling information.
In the embodiment of the present invention, the dependency relationship determining module includes:
the component information determining unit is used for determining GAV information and dependency reference list information of the component according to a Pom.xml configuration file of Maven of the code component;
and the dependency tree establishing unit is used for establishing a dependency tree according to the GAV information and the dependency reference list information to determine the dependency relationship of the members in the target code.
In an embodiment of the present invention, the target determining module includes:
the conflict dependency marking unit is used for marking the dependencies with the same node coordinates and different version information in the dependency tree as conflict dependencies;
the repeated dependency marking unit is used for marking the dependencies with the same node coordinates and the same version information on a continuous chain in the dependency tree as repeated dependencies; and
the illegal open source dependency determining unit is used for inquiring the open source dependency according to preset open source dependency inquiry interface information to determine the illegal open source dependency;
and the target determining unit is used for determining the component to be optimized of the target item according to the conflict dependency, the repeated dependency and the illegal open source dependency.
Meanwhile, the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method when executing the computer program.
Meanwhile, the invention also provides a computer readable storage medium, and a computer program for executing the method is stored in the computer readable storage medium.
The method determines the component to be optimized of the target project according to the component information in the target project code, optimizes the project according to the determined component to be optimized, realizes the functions of dependent scanning and automatic optimization of the project, improves the project development and maintenance efficiency, and reduces the burden of developers and project managers.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a project optimization method provided by the present invention;
FIG. 2 is a block diagram of a project optimization apparatus provided in the present invention;
fig. 3 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, with the continuous expansion of projects, the problems of dependence conflicts, dependence version confusion and the like caused by complicated and staggered dependence in project engineering are solved, and in order to provide a solution to the problems of dependence conflicts, dependence repetition, illegal citation open source dependence and the like, the invention provides a project optimization method, as shown in fig. 1, the method comprises the following steps:
step S101, acquiring component information of a target project code;
step S102, determining the dependency relationship of the member in the target code according to the member information of the target project code;
step S103, determining a component to be optimized of the target item according to the determined dependency relationship of the component;
and step S104, optimizing the project according to the determined component to be optimized.
The project optimization method provided by the invention determines the construction information of the target project according to the code of the target project, and determines the component to be optimized of the target project according to the component information in the code of the target project so as to optimize the project. The component information of the code is determined by extracting the code, so that the dependent scanning is realized, the construction to be optimized is determined, the automatic optimization is carried out, the project development and maintenance efficiency is improved, and the requirement on engineering dependent management is met.
In this embodiment of the present invention, the code for acquiring the target item includes:
acquiring pull information of a target item input by a user; the pull information includes: code connection, branch structure information and user information with code pulling authority of the target project;
and acquiring the engineering code of the target project by utilizing Git according to the pulling information.
In an embodiment of the present invention, the pulling of the engineering code is completed through a Git (open source distributed version control system), specifically, a user provides pulling information of the engineering, that is, pulling information, where the pulling information includes: the code connection of the project, the branch name, the user name with the pull authority, the password or the secret key and the like. And acquiring the code according to the provided pulling information.
In addition, in the embodiment of the invention, different pulling actions can be performed according to the condition of the engineering code library. If the pulling project is the first pulling, the code is pulled according to the pulling information, and if the code library has the same project code, only the copying of the project code and the switching of the branch operation are needed, so that the time consumed by pulling the code is reduced, and the pulling speed is improved. Before pulling the code, judging whether the code pulling operation is carried out for the first time of the current project according to the pulling information, if so, pulling the code according to the pulling information, and if not, only copying the project code and switching the branch operation are needed, so that the time consumed by pulling the code is reduced, and the pulling speed is improved.
In the embodiment of the present invention, the determining the component to be optimized of the target project according to the component information in the target project code includes:
determining GAV information and dependency reference list information of the code member according to a Pom.xml configuration file of the Maven of the code member;
and establishing a dependency tree according to the GAV information and the dependency reference list information.
The Maven project management and automatic construction tool can manage the steps of construction, report, document and the like of a project by utilizing a central information fragment. Includes a Project Object Model, a set of criteria, a Project lifecycle, a dependency management system, and logic for running objects that define plug-ins during the lifecycle phase. When using Maven, an item is described with a well-defined item object model, and then Maven can apply the transection logic from a set of shared (or custom) plug-ins. The project object model pom is an XML representation of a Maven project, placed in a pom.
In the embodiment of the invention, after the code is pulled, the Pom.xml files of the Maven of all the components in the project are analyzed, and the GAV information (namely the coordinate of the Maven) of each component, the dependency reference list and other information are obtained. The dependency list of the useful relationship of the dependency reference list to the building block is identified by the GAV. According to the GAV information and the dependency reference list of the building blocks, after all building block abstract modeling is aggregated, a plurality of dependency trees which take the building blocks as nodes and take the reference relations as connecting lines can be formed. Xml is a configuration file that describes the Maven coordinates of the project, dependencies, rules that the developer needs to follow, defect management systems, organizations and licenses (licenses), and all other project-related factors.
In the embodiment of the invention, the component to be optimized of the target item is determined according to the established dependency tree and the preset conflict resolution strategy. Specifically, the established dependency tree is traversed, and an analysis strategy is executed during traversal. In this embodiment, the analysis policy is an extensible event-driven interface, and in this embodiment of the present invention, the preset conflict resolution policy includes: a conflict solution strategy is relied on, a repeat solution strategy is relied on, and an illegal open source solution strategy is relied on.
In this embodiment, each policy has its own built-in computation list for storing computation objects. The strategies can be influenced in parallel and in a complementary mode, and the analysis speed is increased.
The flow of the three strategies is as follows:
a. relying on a conflict resolution policy:
the strategy marks the dependency GAV with the same groupId and artifactId but different version as the conflicting dependency in the nodes in the same dependency tree, and records the conflicting dependency in a built-in list.
b. Relying on a repeat resolution strategy:
the strategy marks the same dependency GAV of groupId, artifactId and version on a continuous chain in the dependency tree as a repeated dependency, and records the repeated dependency in a built-in list.
c. Illegal open source dependency solution strategy:
the strategy is connected with a work line open source dependency query interface, open source dependencies on the dependency tree are filtered, open source dependencies GAV which are not registered or are not registered in the current version are marked as illegal open source dependencies, and the illegal open source dependencies are recorded in a built-in list.
That is, in the embodiment of the present invention, the determining, according to the established dependency tree and the preset conflict resolution policy, a to-be-optimized component of the target item includes:
marking the dependencies with the same coordinates and different version information as conflict dependencies;
marking the dependency with the same node coordinate and the same version information on a continuous chain in the dependency tree as a repeated dependency; and
inquiring the open source dependence according to preset open source dependence inquiry interface information to determine illegal open source dependence;
and determining the component to be optimized of the target item according to the conflict dependency, the repeated dependency and the illegal open source dependency.
The coordinates GAV, the composite identification of a building block in Maven, include attributes such as groupId, artifactId, version, etc. And determining the component to be optimized of the target item according to the conflict dependency, the repeat dependency and the illegal open source dependency of the GAV mark.
The method determines the component to be optimized of the target project according to the component information in the target project code, optimizes the project according to the determined component to be optimized, realizes the functions of dependent scanning and automatic optimization of the project, improves the project development and maintenance efficiency, and reduces the burden of developers and project managers.
In order to solve the negative influence of the overstaffed project on the development and maintenance efficiency, the embodiment of the invention provides a project optimization tool, and provides an automatic tool capable of realizing project optimization. In the embodiment of the invention, the general tools of Git and Maven are used for integrating the self dependence optimization algorithm strategy, and the solution to the problems of dependence conflict, dependence repetition, illegal citation, open source dependence and the like is completed.
The project optimization method provided by the embodiment comprises the following steps: and pulling the engineering code, analyzing the dependency tree, updating the engineering code and pushing the engineering code. The method comprises the following steps:
1. pulling the engineering code;
in this embodiment, the engineering code is pulled through Git, and the user needs to provide information of the pulled engineering, that is, pull information of the target item input by the user is obtained, where the pull information of the target item includes: the code connection of the project, the branch name, the user name with the pull authority, the password or the secret key and the like.
In the embodiment of the invention, the previous engineering codes are reserved to form the engineering code base, and different pulling actions can be carried out according to the condition of the engineering code base. If the pulling project is the first pulling, the codes are directly pulled, and if the code base has the codes of the same project, only the copying of the project codes and the branch switching operation are needed, so that the time consumed by pulling the codes is reduced, and the pulling speed is improved.
2. Analyzing the dependency tree;
and after pulling the code, analyzing the configuration Pom.xml of the Maven of all the components in the project, and acquiring the GAV information, the dependency reference list and other information of each component. The dependency list of the useful relationship of the dependency reference list to the building block is identified by the GAV. According to the GAV information and the dependency reference list of the building blocks, after all building block abstract modeling is aggregated, a plurality of dependency trees which take the building blocks as nodes and take the reference relations as connecting lines can be formed. Xml describes primarily the Maven coordinates of the project, dependencies, rules that the developer needs to follow, configuration files for the defect management system, organization, licenses, and all other project-related factors.
The dependency trees are then analyzed through traversal, and an analysis strategy is executed during traversal. In this embodiment, the analysis policy is an extensible event-driven interface, including: and depending on a conflict resolution strategy, depending on a repeated resolution strategy and an illegal open source dependence resolution strategy, supporting the expansion of the interface and adding a new strategy scheme.
Each policy has its own built-in computation list for storing the computation objects. The strategies can be influenced in parallel and in a complementary mode, and the analysis speed is increased.
In this embodiment, the flows of the three strategies are as follows:
relying on a conflict resolution policy:
the strategy marks the dependency GAV with the same groupId and artifactId but different version as the conflicting dependency in the nodes in the same dependency tree, and records the conflicting dependency in a built-in list.
Relying on a repeat resolution strategy:
the strategy marks the same dependency GAV of groupId, artifactId and version on a continuous chain in the dependency tree as a repeated dependency, and records the repeated dependency in a built-in list.
Illegal open source dependency solution strategy:
the strategy is connected with a work line open source dependency query interface, open source dependencies on the dependency tree are filtered, open source dependencies GAV which are not registered or are not registered in the current version are marked as illegal open source dependencies, and the illegal open source dependencies are recorded in a built-in list.
3. Updating the engineering code;
after analyzing the dependency tree, the optimized solution needs to be practiced into project engineering, consisting of several steps.
Executing an optimization strategy:
after the analysis of the dependency resolution strategy, according to the marked objects in the built-in object list, executing a corresponding optimization scheme, removing repeated dependencies, and replacing conflicting dependencies or illegal dependencies with the dependencies of the correct version. Unlike the concurrent analysis above, the optimization process here is serial, avoiding repeated modifications to the same dependency.
Upgrading the GAV version of the component:
the GAV with the reference dependent version deleted or modified needs to be upgraded, and the GAV needs to be synchronously upgraded in all the dependency trees containing the upgraded GAV in the dependency tree.
Update component Maven profile pom.
Update the above modified GAV and reference dependency list into the corresponding pom.xml according to the corresponding relationship of the intra-project building block GAV and pom.xml file.
4. Pushing the engineering code;
and performing Git submission operation on the engineering, and adding a tool automation optimization tool mark in the annotation. The code is then pushed to the engineering project repository. Finally, the modified components are deployed to a Maven warehouse. After completion, the code is backed up as an engineering code library of the tool for caching of the next code pull.
The method and the system realize dependent scanning and automatic optimization functions of the project engineering jar package based on Git and Maven, improve project development and maintenance efficiency, and reduce the burden of developers and project managers. Meanwhile, the embodiment provides an analysis strategy interface, and developers can conveniently solve other related requirements on engineering dependence management by expanding the function of the analysis strategy interface. Finally, the tool performs performance optimization at multiple places, and the working time is greatly reduced.
Meanwhile, the present invention also provides a project optimizing apparatus, as shown in fig. 2, which includes:
a construction information acquisition module 201, configured to acquire component information of a target project code;
a dependency relationship determining module 202, configured to determine a dependency relationship of a component in the target code according to the component information of the target project code;
and the target determining module 203 is used for determining a component to be optimized optimizing module 204 of a target item according to the determined dependency relationship of the component, and is used for optimizing the item according to the determined component to be optimized.
The project optimization device provided by the invention determines the construction information of the target project according to the code of the target project, and determines the component to be optimized of the target project according to the component information in the code of the target project so as to optimize the project. The component information of the code is determined by extracting the code, so that the dependent scanning is realized, the construction to be optimized is determined, the automatic optimization is carried out, the project development and maintenance efficiency is improved, and the requirement on engineering dependent management is met.
In this embodiment of the present invention, the construction information obtaining module 201 includes:
the pull information acquisition unit is used for acquiring pull information of a target item input by a user; the pull information includes: code connection, branch structure information and user information with code pulling authority of the target project;
and the pulling unit is used for acquiring the engineering code of the target project by utilizing Git according to the pulling information.
In this embodiment of the present invention, the dependency relationship determining module 202 includes:
and the component information determining unit is used for determining the dependency relationship of the components in the target code according to the Pom.
In this embodiment of the present invention, the target determining module 203 includes:
the conflict dependency marking unit is used for marking the dependencies with the same node coordinates and different version information in the dependency tree as conflict dependencies;
the repeated dependency marking unit is used for marking the dependencies with the same node coordinates and the same version information on a continuous chain in the dependency tree as repeated dependencies; and
the illegal open source dependency determining unit is used for inquiring the open source dependency according to preset open source dependency inquiry interface information to determine the illegal open source dependency;
and the target determining unit is used for determining the component to be optimized of the target item according to the conflict dependency, the repeated dependency and the illegal open source dependency.
For those skilled in the art, the implementation of the project optimization apparatus provided by the present invention can be clearly understood through the foregoing description of the embodiments, and details are not repeated herein.
It should be noted that the method and apparatus for optimizing a project of the present disclosure may be used in the project optimization processing in the financial field, and may also be used in the project optimization processing in any field other than the financial field.
The present embodiment also provides an electronic device, which may be a desktop computer, a tablet computer, a mobile terminal, and the like, but is not limited thereto. In this embodiment, the electronic device may refer to the embodiments of the method and the apparatus, and the contents thereof are incorporated herein, and repeated descriptions are omitted.
Fig. 3 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention. As shown in fig. 3, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. Notably, this diagram is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the project optimization function may be integrated into the central processor 100. The central processor 100 may be configured to control as follows:
acquiring component information of a target project code;
determining the dependency relationship of the member in the target code according to the member information of the target project code;
determining a component to be optimized of the target item according to the determined dependency relationship of the component;
and optimizing the project according to the determined component to be optimized.
In another embodiment, the project optimizing device may be configured separately from the central processor 100, for example, the project optimizing device may be configured as a chip connected to the central processor 100, and the project optimizing function is realized by the control of the central processor.
In this embodiment of the present invention, the code for acquiring the target item includes:
acquiring pull information of a target item input by a user; the pull information includes: code connection, branch structure information and user information with code pulling authority of the target project;
and acquiring the engineering code of the target project by utilizing Git according to the pulling information.
Determining GAV information and dependency reference list information of the code member according to a Pom.xml configuration file of the Maven of the code member;
and establishing a dependency tree according to the GAV information and the dependency reference list information to determine the dependency relationship of the members in the target code.
In the embodiment of the present invention, the determining a component to be optimized according to the determined dependency relationship of the component includes:
marking the dependencies with the same coordinates and different version information as conflict dependencies;
marking the dependency with the same node coordinate and the same version information on a continuous chain in the dependency tree as a repeated dependency; and
inquiring the open source dependence according to preset open source dependence inquiry interface information to determine illegal open source dependence;
and determining the component to be optimized of the target item according to the conflict dependency, the repeated dependency and the illegal open source dependency.
As shown in fig. 3, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in fig. 3; furthermore, the electronic device 600 may also comprise components not shown in fig. 3, which may be referred to in the prior art.
As shown in fig. 3, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
Embodiments of the present invention also provide a computer-readable program, where when the program is executed in an electronic device, the program enables a computer to execute the project optimization method in the electronic device according to the above embodiments.
The embodiment of the present invention also provides a storage medium storing a computer-readable program, where the computer-readable program enables a computer to execute the project optimization described in the above embodiment in an electronic device.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. The many features and advantages of the embodiments are apparent from the detailed specification, and thus, it is intended by the appended claims to cover all such features and advantages of the embodiments that fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the embodiments of the invention to the exact construction and operation illustrated and described, and accordingly, all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for optimizing a project, the method comprising:
acquiring component information of a target project code;
determining the dependency relationship of the member in the target code according to the member information of the target project code;
determining a component to be optimized of the target item according to the determined dependency relationship of the component;
and optimizing the project according to the determined component to be optimized.
2. The project optimization method of claim 1, wherein said code for obtaining a target project comprises:
acquiring pull information of a target item input by a user; the pull information includes: code connection, branch structure information and user information with code pulling authority of the target project;
and acquiring the engineering code of the target project by utilizing Git according to the pulling information.
3. The project optimization method of claim 1, wherein determining dependencies of constructs in object code based on the construct information of the object project code comprises:
determining GAV information and dependency reference list information of the code member according to a Pom.xml configuration file of the Maven of the code member;
and establishing a dependency tree according to the GAV information and the dependency reference list information to determine the dependency relationship of the members in the target code.
4. The project optimization method of claim 3, wherein determining the component to be optimized based on the determined dependency of the component comprises:
marking the dependencies with the same coordinates and different version information as conflict dependencies;
marking the dependency with the same node coordinate and the same version information on a continuous chain in the dependency tree as a repeated dependency; and
inquiring the open source dependence according to preset open source dependence inquiry interface information to determine illegal open source dependence;
and determining the component to be optimized of the target item according to the conflict dependency, the repeated dependency and the illegal open source dependency.
5. An apparatus for optimizing a project, the apparatus comprising:
the construction information acquisition module is used for acquiring component information of the target project code;
the dependency relationship determining module is used for determining the dependency relationship of the components in the target codes according to the component information of the target project codes;
the target determination module is used for determining a component to be optimized of the target item according to the determined dependency relationship of the component;
and the optimization module is used for optimizing the project according to the determined component to be optimized.
6. The project optimization apparatus of claim 5, wherein the code acquisition module comprises:
the pull information acquisition unit is used for acquiring pull information of a target item input by a user; the pull information includes: code connection, branch structure information and user information with code pulling authority of the target project;
and the pulling unit is used for acquiring the engineering code of the target project by utilizing Git according to the pulling information.
7. The project optimization apparatus of claim 5, wherein the dependency determination module comprises:
the component information determining unit is used for determining GAV information and dependency reference list information of the component according to a Pom.xml configuration file of Maven of the code component;
and the dependency tree establishing unit is used for establishing a dependency tree according to the GAV information and the dependency reference list information to determine the dependency relationship of the members in the target code.
8. The item optimization device of claim 7, wherein the targeting module comprises:
the conflict dependency marking unit is used for marking the dependencies with the same node coordinates and different version information in the dependency tree as conflict dependencies;
the repeated dependency marking unit is used for marking the dependencies with the same node coordinates and the same version information on a continuous chain in the dependency tree as repeated dependencies; and
the illegal open source dependency determining unit is used for inquiring the open source dependency according to preset open source dependency inquiry interface information to determine the illegal open source dependency;
and the target determining unit is used for determining the component to be optimized of the target item according to the conflict dependency, the repeated dependency and the illegal open source dependency.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 4.
CN202111433066.6A 2021-11-29 2021-11-29 Project optimization method and device Pending CN114035801A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111433066.6A CN114035801A (en) 2021-11-29 2021-11-29 Project optimization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111433066.6A CN114035801A (en) 2021-11-29 2021-11-29 Project optimization method and device

Publications (1)

Publication Number Publication Date
CN114035801A true CN114035801A (en) 2022-02-11

Family

ID=80139124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111433066.6A Pending CN114035801A (en) 2021-11-29 2021-11-29 Project optimization method and device

Country Status (1)

Country Link
CN (1) CN114035801A (en)

Similar Documents

Publication Publication Date Title
CN106796522B (en) System and method for updating source code file
CN112558980A (en) Multi-software-package management method and device
US10489591B2 (en) Detection system and method thereof
CN104991793A (en) Method, device and system used for application program subpackage
US20140372998A1 (en) App package deployment
CN110442371B (en) Method, device and medium for releasing codes and computer equipment
CN102902558A (en) Project script file updating system and method as well as script file merging method and device
JP5900193B2 (en) Update determination program and update determination apparatus
CN108694049B (en) Method and equipment for updating software
US20210124575A1 (en) Providing build avoidance without requiring local source code
WO2019041891A1 (en) Method and device for generating upgrade package
CN111949303A (en) Upgrade package processing method and device, electronic equipment and storage medium
US9396239B2 (en) Compiling method, storage medium and compiling apparatus
CN114035801A (en) Project optimization method and device
CN110806891A (en) Method and device for generating software version of embedded equipment
JP6717140B2 (en) Analysis program, analysis method, and analysis device
KR100990091B1 (en) Method and apparatus for the requirement management
CN115630835A (en) Activity-based workflow general parameter configuration method and system
CN115145634A (en) System management software self-adaption method, device and medium
CN113504904A (en) User-defined function implementation method and device, computer equipment and storage medium
CN111008018A (en) CAN signal unpacking processing method and system
JP2010176594A (en) Source code version management program and source code version managing method
CN108008981B (en) Method and device for initializing program in system on chip (SoC)
CN112860314B (en) Code modeling method and device
WO2017076180A1 (en) Virtual machine upgrading method and device

Legal Events

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