Intelligent notification method and system based on Maven dependency change
By customizing the Maven plug-in and linking with the Git version control system, combined with graph database technology and deep-first search algorithm, real-time monitoring and accurate analysis of Maven dependency changes is achieved, the problem of insufficient notification in the existing technology is solved, detailed dependency changes notification is provided, and team collaboration efficiency is improved.
Patent Information
- Application Number
- CN202510559050.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-04-30
AI Technical Summary
The prior art cannot deeply analyze the specific changes and impacts of Maven dependencies, and the triggering conditions and content of notifications are relatively fixed, making it difficult to meet personalized notification needs.
By customizing the Maven plug-in and linking with the Git version control system, we can detect dependency changes in the Maven project in real time, and use graph database technology and depth-first search algorithm to draw a dependency map to accurately locate the affected modules. Then push detailed dependency change notifications to team members via email or instant messaging tools.
Real-time monitoring and accurate analysis of Maven dependency changes is realized, and detailed dependency changes are provided to help the development team understand the impact range of dependency changes in a timely manner and improve team collaboration efficiency.
Smart Images

Figure CN120085908A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electromechanical equipment, and particularly to an intelligent notification method and system based on Maven dependency changes. Background Art
[0002] Common continuous integration tools, such as Jenkins, can be configured to send notifications during the build and deployment processes. When key events such as build failure or successful deployment occur, the build results can be notified to relevant personnel via email, instant messaging tools, etc. by configuring the Jenkins pipeline file. However, the notification for Maven dependency changes is not fine-grained enough, unable to delve into the specific change content and impact analysis of the dependencies, and the triggering conditions and content of the notifications are relatively fixed, making it difficult to meet personalized notification requirements.
[0003] Some integrated development environments (IDEs) provide plugins integrated with Maven, such as the MavenHelper plugin for IDEA, which can help developers view and manage Maven dependencies. Some plugins can also display prompt messages in the IDE when dependency conflicts or version updates occur. These prompts are usually just simple warnings or information displays, lacking the function of actively pushing notifications and unable to convey dependency change information to relevant personnel in a timely manner. Especially in a project with multiple collaborators, other members cannot timely pay attention to the prompts in the IDE.
[0004] In summary, there is a need for an intelligent notification method and system based on Maven dependency changes to address the deficiencies in the prior art. Summary of the Invention
[0005] In view of the deficiencies of the prior art, the present invention provides an intelligent notification method and system based on Maven dependency changes, aiming to solve the above problems.
[0006] To achieve the above object, the present invention provides the following technical solution: An intelligent notification method based on Maven dependency changes, comprising the following steps: Step S1: Dependency change detection and data collection. Through a Maven plugin, during the core stage of Maven, real-time detection of dependency changes in the Maven project is performed, and dependency source data is collected; Step S2: Linkage with the version control system. Linkage with the Git version control system is performed, a hook script is configured to trigger a dependency monitoring program to capture change information; Step S3: Drawing of the dependency relationship graph. Using graph database technology, the dependency relationship of the project is converted into a visual graph, and the dependency relationship graph is traversed through a depth-first search algorithm; Step S4: Push the dependency change notice to team members via email or instant messaging tool.
[0007] Optionally, for the dependency change detection and data collection in step S1, the following methods are adopted: Step A1: Maven plug-in customization. In the core stage of Maven, grab the changed dependency information, use the parsing API of Maven to compare in real time, and construct the dependency version number and coordinate information in different build rounds; Step A2: Metadata parsing. Parse the additional information of the dependent components, and deeply read the MANIFEST.MF file and pom.properties file in the JAR package; Step A3: Linkage with version control system. Link with the Git version control system, configure the hook script, and when there is code submission or merging in the private component repository, trigger the dependency monitoring program to capture the change information.
[0008] Optionally, for the drawing of the dependency relationship graph in step S3, the following methods are adopted: Step B1: Basis of DFS algorithm. Traverse the dependency relationship graph through the depth-first search algorithm, record the node access status and dependency relationship, and locate the affected modules; Step B2: Pruning strategy. Prune the dependency relationship graph according to the rules configured in the project and the dependency stability rules, and skip unnecessary or stable dependency nodes; Step B3: Circular dependency processing. Detect and process circular dependencies in the dependency relationship graph; Step B4: Performance tuning. Optimize the traversal performance of the dependency relationship graph by caching the calculated dependency relationship results and parallel computing some dependency relationships.
[0009] Optionally, the process of the DFS algorithm in step B1 is as follows: Step B11: Start searching from the starting point, and select the changed dependency framework node as the starting node; Step B12: Depth-first traversal. Take out the top node of the stack, traverse all adjacent nodes. If not visited, mark it as visited and being visited, push it into the stack, and record the dependency relationship between the top node of the stack and the adjacent node; Step B13: After traversing all adjacent nodes of the top node of the stack, backtrack to the upper-level node to continue the search.
[0010] Optionally, for the efficient notification push in step S4, the following methods are adopted: Step C1: Email template generation. Design an HTML email template based on JavaMail and template engine technology, dynamically fill in the framework upgrade details, dependency change charts and operation suggestions, and support batch sending; Step C2: Integrate with instant messaging tools, and push notifications in the form of picture - text cards and rich text through the official API, supporting group push and personal reminders.
[0011] Optionally, the notification content in step C1 includes the following: Details of framework upgrade include but are not limited to the version number of the framework, author, release date, change log, and functional features; Dependency change chart, a dependency change chart generated through a dependency relationship graph, showing the scope of influence of dependency changes; Operation suggestions: Based on the impact analysis of dependency changes, provide corresponding operation suggestions to help team members quickly respond to dependency changes.
[0012] An intelligent notification system based on Maven dependency changes, adopting an intelligent notification method based on Maven dependency changes, including: Dependency change monitoring and data collection module, used to monitor dependency changes in Maven projects in real - time, and collect metadata such as the version number, coordinate information, author, release date, change log, and functional features of dependencies; Version control system linkage module, used to link with the Git version control system, configure hook scripts, and trigger the dependency monitoring program when there is code submission or merge in the private component repository to capture change information; Dependency relationship graph drawing module, used to visualize the dependency relationship of the project in the form of a graph using graph database technology, and traverse the dependency relationship graph through the depth - first search algorithm to locate the affected modules; Efficient notification push mechanism module, used to push dependency change notifications to team members via email or instant messaging tools, supporting batch sending, group push, and personal reminders.
[0013] Optionally, the dependency change monitoring and data collection module includes: Maven plugin customization unit, used to accurately capture changes in dependency information in the pom.xml file at the core stage of Maven, and use Maven's parsing API to compare the dependency version numbers and coordinate information in different build rounds in real - time; Metadata parsing engine unit, used to parse additional information of dependent components, and deeply read the MANIFEST.MF file and pom.properties file in the JAR package; Version control system linkage unit, used to link with the Git version control system, configure hook scripts, and trigger the dependency monitoring program when there is code submission or merge in the private component repository to ensure that change information is captured without delay.
[0014] Optionally, the dependency relationship graph drawing module includes: The basic unit of the DFS algorithm is used to traverse the dependency graph through the depth - first search algorithm, record the node access status and dependencies, and accurately locate the affected modules; The pruning strategy unit is used to prune the dependency graph according to the rules configured in the project and the dependency stability rules, and skip unnecessary or stable dependency nodes; The circular - dependency handling unit is used to detect and handle circular dependencies in the dependency graph; The performance - tuning unit is used to optimize the traversal performance of the dependency graph by caching the calculated dependency results and parallel - computing some dependencies.
[0015] Optionally, the efficient notification - pushing mechanism module includes: The email template engine unit: It is used to design HTML email templates based on JavaMail and template engine technologies, dynamically fill in details of framework upgrades, dependency change charts, and operation suggestions, and support batch sending; The instant - messaging tool integration unit is used to integrate with instant - messaging tools and push notifications in the form of graphic cards and rich text through official APIs, supporting group pushing and personal reminders.
[0016] The beneficial effects of the present invention: 1. In the present invention, through customizing the Maven plug - in and linking with the Git version control system, the system can monitor the dependency changes in the Maven project in real - time, and accurately collect metadata such as the version number, coordinates, author, release date, change log, and feature characteristics of the dependencies. This real - time monitoring mechanism ensures that dependency change information can be captured in a timely manner and pushed to team members via email or instant - messaging tools, avoiding the delay problems of traditional notification methods; 2. In the present invention, by using graph database technology (such as Neo4j) to visualize the project's dependencies in the form of a graph and combining with the depth - first search (DFS) algorithm, the system can quickly traverse the dependency graph and accurately locate the affected modules. This visualization and analysis ability helps the development team better understand the scope of influence of dependency changes, thus making more informed decisions; 3. In the present invention, the system supports pushing dependency change notifications via email and instant - messaging tools. The email template is designed based on JavaMail and template engine technologies, which can dynamically fill in details of framework upgrades, dependency change charts, operation suggestions, etc., and support batch sending. The integration of instant - messaging tools supports group pushing and personal reminders, ensuring that notifications can cover all relevant personnel and improving team collaboration efficiency; 4. In the present invention, the system introduces a pruning strategy. According to the rules configured for the project and the dependency stability rules, unnecessary or stable dependency nodes are skipped, reducing unnecessary calculations. At the same time, by caching the results of the calculated dependency relationships and calculating some dependencies in parallel, the system optimizes the traversal performance of the dependency relationship graph, improving the overall response speed of the system. The email notifications generated by the system can adapt to the displays of different terminal devices, ensuring the readability of the notification content on different devices. Meanwhile, the system supports batch sending of notifications and can push them to all members of the project team with one click, ensuring the coverage of the notifications; 5. In the present invention, the system can not only provide detailed information about dependency changes, but also provide corresponding operation suggestions based on the impact analysis of dependency changes to help team members quickly respond to dependency changes, reducing development interruptions or project risks caused by dependency changes. Through integration with instant messaging tools (such as DingTalk), the system can push notifications in the form of graphic cards and rich text, supporting group push and personal reminders. This highly interactive notification method facilitates team members to instantly feedback questions and communicate and upgrade response plans, enhancing the collaboration and communication efficiency of the team. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic flowchart of a method of the present invention.
[0018] Figure 2 It is a flowchart of dependency change monitoring and data collection of the present invention.
[0019] Figure 3 It is a flowchart of drawing a dependency relationship graph of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] As Figure 1 、 2 、3 show, an intelligent notification method based on Maven dependency changes includes the following steps: Step S1: Dependency change detection and data collection. Through a Maven plug-in, during the core stage of Maven, dependency changes in the Maven project are detected in real time, and dependency source data is collected; Step S2: Linkage with the version control system. Link with the Git version control system, configure hook scripts, trigger the dependency monitoring program, and capture change information; Step S3: Dependency graph drawing. Use graph database technology to convert the dependencies of the project into a visual graph, and traverse the dependency graph through the depth-first search algorithm; Step S4: Push dependency change notifications to team members via email or instant messaging tools.
[0022] In step S1, for dependency change detection and data collection, it is done in the following ways: Step A1: Maven plugin customization. In the core stage of Maven, capture the changed dependency information, use Maven's parsing API to compare in real time, and build the dependency version numbers and coordinate information in the build cycle; Step A2: Metadata parsing. Parse the additional information of the dependent components, and deeply read the MANIFEST.MF file and pom.properties file in the JAR package; Step A3: Version control system linkage. Link with the Git version control system, configure hook scripts, and when there is a code commit or merge in the private component repository, trigger the dependency monitoring program to capture the change information.
[0023] In step S3, for dependency graph drawing, it is done in the following ways: Step B1: DFS algorithm basics. Traverse the dependency graph through the depth-first search algorithm, record the node access status and dependencies, and locate the affected modules; Step B2: Pruning strategy. Prune the dependency graph according to the rules configured in the project and the dependency stability rules, and skip unnecessary or stable dependency nodes; Step B3: Circular dependency handling. Detect and handle circular dependencies in the dependency graph; Step B4: Performance tuning. Optimize the traversal performance of the dependency graph by caching the calculated dependency relationship results and parallelizing the calculation of some dependency relationships.
[0024] The process of the DFS algorithm in step B1 is as follows: Step B11: Start searching from the starting point, and select the dependency framework node with changes as the starting node; Step B12: Depth-first traversal. Take out the top node of the stack, traverse all adjacent nodes. If not visited, mark it as visited and being visited, push it into the stack, and record the dependency relationship between the top node of the stack and the adjacent node; Step B13: After traversing all adjacent nodes of the top node of the stack, backtrack to the upper-level node to continue the search.
[0025] For efficient notification push in step S4, it is done in the following ways: Step C1: Email template generation. Design an HTML email template based on JavaMail and template engine technology, dynamically fill in details of framework upgrade, dependency change charts, and operation suggestions, and support batch sending. Step C2: Integrate with instant messaging tools. Push notifications in the form of graphic cards and rich text through the official API, and support group push and personal reminder.
[0026] The notification content in Step C1 includes the following: Details of framework upgrade include but are not limited to the version number, author, release date, change log, and feature characteristics of the framework. Dependency change chart. A dependency change chart generated through a dependency relationship graph, showing the scope of influence of dependency changes. Operation suggestions: Provide corresponding operation suggestions based on the impact analysis of dependency changes to help team members quickly respond to dependency changes.
[0027] The specific method is as follows: I. Dependency change monitoring and data collection: 1. Maven plugin customization: Develop a dedicated Maven plugin to accurately capture the dynamic changes of dependency information in the pom.xml file at core stages such as validate and compile. Use Maven's parsing API to compare the version numbers and coordinate information of dependencies in different build rounds in real time. Once a change in the reference to the private component repository or the version change of a third-party framework is detected, immediately trigger the subsequent notification process.
[0028] 2. Metadata parsing engine: Build a module that can parse additional information of dependent components, not limited to version numbers, but also covering the author, release date, change log, feature characteristics, etc. of the framework. For JAR packages in Java projects, deeply read the MANIFEST.MF file and the built-in pom.properties; for other format dependencies, adapt the corresponding parsing rules to collect dependency information comprehensively.
[0029] 3. Version control system linkage: If the project uses the Git version control system, configure a hook script. When there is a code commit or merge in the private component repository, causing dependency changes, the hook script quickly activates the dependency monitoring program to ensure that change information is captured without delay; at the same time, monitor the official version repository of third-party open-source libraries, and use web crawler technology to regularly compare the official released version with the currently referenced version in the project, and collect information immediately when an upgrade is found.
[0030] 4. Dependency Relationship Graph Drawing: Using graph database technology (such as Neo4j), according to the project dependency configuration, the complex dependency relationships are visualized in the form of a graph. Nodes represent each dependent framework, and edges symbolize dependency associations. When a certain framework is upgraded, through the graph algorithm, all direct and indirect dependent parties can be quickly searched and located, and the affected project modules can be accurately positioned to assist in customizing the notification content. Here, the depth-first search (DFS) algorithm is proposed to traverse the dependency relationship graph and be improved based on certain strategies, such as pruning strategies, cyclic dependency handling, and performance optimization. The following is a detailed elaboration: 4.1. Basics of the DFS Algorithm 4.1.1 Preparation of Data Structures: Representation of the Dependency Relationship Graph: Use a graph data structure to represent the dependency relationships of a Maven project, where each dependent framework is a node and the dependency relationship is an edge. The graph structure can be implemented using an adjacency list or an adjacency matrix. In Python, it can be simply represented using a dictionary nested with sets, for example, graph = {node: {adjacent_node1, adjacent_node2,...} for node in all_nodes}, where all_nodes is the set of all dependent framework nodes in the project.
[0031] Recording the Access Status of Nodes: Create two boolean dictionaries visited and inProgress to record whether a node has been visited and is being visited. Initially, the values of all nodes in visited and inProgress are False.
[0032] 4.1.2 Basic DFS Algorithm Process: Start Searching from the Starting Node: Select the node of the dependent framework where the change occurs as the starting node (assumed to be start_node), mark it as visited (visited[start_node] = True) and being visited (inProgress[start_node]= True), and push it onto the stack stack (stack.append(start_node)).
[0033] Depth-First Traversal: When the stack is not empty, pop the top node of the stack current_node = stack.pop().
[0034] Traverse all adjacent nodes adjacent_nodes of current_node. For each adjacent node adjacent_node, if it has not been visited (visited[adjacent_node] == False), then mark it as visited (visited[adjacent_node]= True) and being visited (inProgress[adjacent_node] =True), and push it onto the stack (stack.append(adjacent_node)).
[0035] Record the dependency relationship between adjacent_node and current_node for subsequent accurate positioning of affected project modules. A dictionary can be used to store the dependency information of each node, for example, dependency_info ={node: set() for node in all_nodes}, and during the traversal process, add the dependent party to the set of the corresponding node (dependency_info[current_node].add(adjacent_node)).
[0036] Backtracking process: When the traversal of all adjacent nodes of current_node is completed, set inProgress[current_node] to False, indicating that the search for this node has been completed, and start backtracking to the upper-level node to continue the search.
[0037] 4.2. Pruning Strategy 4.2.1 Definition of Pruning Rules: Rules based on project configuration: Determine which dependency relationships can be ignored according to the specific configuration file of the project (such as dependency scopes, exclusion rules, etc. in pom.xml). For example, if the project clearly stipulates that certain test dependencies do not need to be considered during runtime, then pruning can be performed when traversing these test dependency nodes.
[0038] Rules based on dependency stability: For some stable and rarely changed dependency libraries, or dependencies that have been fully tested and are compatible with the current project, they can be set to be skipped during the search, unless they themselves have changed.
[0039] 4.2.2 Implementation of Pruning Operations: When traversing the adjacent nodes adjacent_nodes of the current node current_node, for each adjacent node adjacent_node, before pushing it onto the stack, first call the pruning judgment function should_prune(adjacent_node). If this function returns True, skip this adjacent node and do not perform further search; if it returns False, perform the search according to the normal process.
[0040] 4.3 Circular Dependency Handling 4.3.1 Circular Dependency Detection During the depth-first search process, when starting to visit a node current_node, set inProgress[current_node] to True. If, when traversing the adjacent nodes adjacent_nodes of current_node, it is found that an adjacent node adjacent_node has been marked as inProgress[adjacent_node] == True, it indicates that there is a circular dependency. At this time, print the path information of the circular dependency (print(f"Circular dependency detected: {current_node} -> {adjacent_node}")), and stop the continued search of this path to avoid falling into an infinite loop.
[0041] 4.3.2 Circular Dependency Handling Logic When a circular dependency is detected, you can choose to ignore the circular dependency path and continue searching other unvisited nodes, or perform more complex processing according to project requirements, such as recording circular dependency information and reminding developers of possible problems in subsequent notifications. In the above basic DFS algorithm, the adjacent nodes with circular dependencies are skipped through the continue statement, and the next adjacent node is processed.
[0042] 4.4 Performance Tuning 4.4.1 Caching the Results of Computed Dependency Relationships Creation of the cache data structure: Use a global dictionary dependency_cache to store the results of the dependency relationships of the nodes that have been computed. The key is the node identifier, and the value is a set containing the direct dependents and indirect dependents (dependency_cache = {node: set() for node in all_nodes}).
[0043] Cache Query and Update: 1. Before starting the depth - first search for a node 'node', first check if the dependency relationship result of this node already exists in the cache (if node in dependency_cache:). If it exists, directly return the result in the cache (return dependency_cache[node]), and there is no need to perform the search again.
[0044] 2. After completing the search for a node, store the calculated dependency relationship result in the cache (dependency_cache[node] = result) so that the result can be quickly obtained when accessing this node again later.
[0045] 4.4.2 Parallel Computation of Partial Dependencies Graph Partitioning Strategy: According to the module structure, dependency hierarchy of the project, or other reasonable partitioning methods, partition the dependency graph into multiple relatively independent sub - graphs. For example, the graph can be partitioned into multiple sub - graphs according to functional modules, and each sub - graph contains the dependency nodes and dependency relationships related to this functional module.
[0046] Parallel Computation Implementation: Use the concurrent.futures module in Python (such as ThreadPoolExecutor or ProcessPoolExecutor) to implement parallel computation. Create a thread pool or a process pool, and reasonably set the degree of parallelism according to system resources and the number of sub - graphs (for example, with concurrent.futures.ThreadPoolExecutor(max_workers = num_threads) as executor:, where num_threads is the number of parallel threads).
[0047] For each sub - graph, submit an independent depth - first search task to the thread pool or process pool (futures =[executor.submit(dfs, subgraph) for subgraph in subgraphs]), where dfs is the depth - first search function that has been pruned, processed for circular dependencies, and optimized for caching as described above.
[0048] Wait for all tasks to complete (concurrent.futures.wait(futures)), and obtain the results of each task (results = [future.result() for future in futures]). Finally, merge the results of each sub-graph to obtain the final set of dependent parties (final_result = set.union(*results)).
[0049] II. Efficient notification push mechanism: 1. Email template engine: Based on a mature email sending library (such as JavaMail), combined with template engine technologies such as FreeMarker and Thymeleaf, design beautiful and information-rich HTML email templates. The templates are dynamically filled with framework upgrade details, dependency change charts, operation suggestions, etc., and are adapted to different terminal device displays; support batch sending, and push notifications with one click according to the personnel information list of the project team to ensure the coverage of notifications.
[0050] 2. Instant messaging tool integration suite: Develop corresponding docking programs for the commonly used instant messaging platform DingTalk in the team. Utilize the official open API to encapsulate the message push function, and be able to push notifications in the form of graphic cards and rich text; support group push and personal @ reminder, and with the strong interactivity of instant messaging, it is convenient for members to instantaneously feedback questions and communicate on upgrade response plans.
[0051] An intelligent notification system based on Maven dependency changes, adopting an intelligent notification method based on Maven dependency changes, including: Dependency change monitoring and data collection module, used to monitor the dependency changes in the Maven project in real time, and collect the version numbers, coordinate information, authors, release dates, change logs and functional feature metadata of the dependencies; Version control system linkage module, used to link with the Git version control system, configure hook scripts, and trigger the dependency monitoring program when there is code submission or merging in the private component repository to capture change information; Dependency relationship graph drawing module, used to visualize the dependency relationship of the project in the form of a graph using graph database technology, and traverse the dependency relationship graph through the depth-first search algorithm to locate the affected modules; Efficient notification push mechanism module, used to push dependency change notifications to team members via email or instant messaging tools, supporting batch sending, group push and personal reminder.
[0052] The dependency change monitoring and data collection module includes: The Maven plugin customization unit is used to accurately capture changes in dependency information in the pom.xml file during the core phases of Maven, and use Maven's parsing API to compare the dependency version numbers and coordinate information in different build rounds in real time; The metadata parsing engine unit is used to parse additional information of dependent components and deeply read the MANIFEST.MF file and pom.properties file in the JAR package; The version control system linkage unit is used to link with the Git version control system, configure hook scripts, and trigger the dependency monitoring program when there is code submission or merging in the private component repository to ensure that change information is captured without delay.
[0053] The dependency relationship graph drawing module includes: The DFS algorithm basic unit is used to traverse the dependency relationship graph through the depth-first search (DFS) algorithm, record the node access status and dependency relationships, and accurately locate the affected modules; The pruning strategy unit is used to prune the dependency relationship graph according to the rules configured in the project and the dependency stability rules, and skip unnecessary or stable dependency nodes; The circular dependency processing unit is used to detect and process circular dependencies in the dependency relationship graph; The performance tuning unit is used to optimize the traversal performance of the dependency relationship graph by caching the calculated dependency relationship results and parallel computing some dependency relationships.
[0054] The efficient notification push mechanism module includes: The email template engine unit: is used to design HTML email templates based on JavaMail and template engine technologies, dynamically fill in the details of framework upgrades, dependency change charts, and operation suggestions, and support batch sending; The instant messaging tool integration unit is used to integrate with instant messaging tools and push notifications in the form of graphic cards and rich text through the official API, supporting group push and personal reminders.
[0055] By customizing the Maven plugin and linking with the Git version control system, the system can monitor dependency changes in Maven projects in real time, and accurately collect metadata such as the version numbers, coordinate information, authors, release dates, change logs, and features of dependencies. This real-time monitoring mechanism ensures that dependency change information can be captured in a timely manner and pushed to team members via email or instant messaging tools (such as DingTalk), avoiding the latency problems of traditional notification methods; By applying graph database technology (such as Neo4j) to visualize the project's dependency relationships in the form of a graph, and combining with the depth-first search (DFS) algorithm, the system can quickly traverse the dependency graph and accurately locate the affected modules. This visualization and analysis ability helps the development team better understand the scope of influence of dependency changes, thus making more informed decisions; The system supports pushing dependency change notifications via email and instant messaging tools. The email template is designed based on JavaMail and template engine technology, and can dynamically fill in details such as framework upgrades, dependency change charts, operation suggestions, etc., and supports batch sending. The integration of instant messaging tools supports group pushing and personal reminders to ensure that notifications can cover all relevant personnel and improve team collaboration efficiency; The system introduces a pruning strategy. According to the rules configured in the project and the dependency stability rules, it skips unnecessary or stable dependency nodes, reducing unnecessary calculations. At the same time, by caching the calculated dependency relationship results and parallel computing some dependency relationships, the system optimizes the traversal performance of the dependency graph and improves the overall response speed of the system. The email notifications generated by the system can adapt to the displays of different terminal devices to ensure the readability of the notification content on different devices. At the same time, the system supports batch sending of notifications and can push them to all members of the project team with one click to ensure the coverage of the notifications; The system can not only provide detailed information about dependency changes, but also provide corresponding operation suggestions based on the impact analysis of dependency changes to help team members quickly respond to dependency changes, reducing development interruptions or project risks caused by dependency changes. By integrating with instant messaging tools (such as DingTalk), the system can push notifications in the form of graphic cards and rich text, supporting group pushing and personal reminders. This highly interactive notification method facilitates team members to instantly feedback questions and communicate upgrade response plans, enhancing team collaboration and communication efficiency.
[0056] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, or improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. An intelligent notification method based on Maven dependency changes, characterized in that: The following steps are involved: Step S1: Dependency change detection and data collection: Through the Maven plug-in, in the Maven core phase, the dependency changes in the Maven project are detected in real time, and the dependency source data is collected; Step S2: Linking with the version control system: Linking with the Git version control system, configuring hook scripts, triggering dependency monitoring programs, and capturing change information; Step S3: Draw a dependency graph, use graph database technology to convert the project's dependencies into a visual graph, and traverse the dependency graph through a depth-first search algorithm; Step S4: Push dependency change notifications to team members via email or instant messaging tools.
2. According to the intelligent notification method based on Maven dependency changes according to claim 1, it is characterized in that: The dependency change detection and data collection in step S1 are performed in the following manner: Step A1: Maven plugin customization, in the Maven core phase, captures the changed dependency information, uses Maven's parsing API to compare the differences in real time, and builds the dependency version number and coordinate information in the round; Step A2: Metadata parsing, parsing additional information of dependent components, and deeply reading the MANIFEST.MF file and pom.properties file in the JAR package; Step A3: Link with the version control system. Link with the Git version control system and configure the hook script. When there is code submission or merging in the private component repository, the dependency monitoring program is triggered to capture the change information.
3. According to the intelligent notification method based on Maven dependency changes according to claim 1, it is characterized in that: The dependency graph in step S3 is drawn in the following manner: Step B1: DFS algorithm foundation, traverse the dependency graph through the depth-first search algorithm, record the node access status and dependency, and locate the affected modules; Step B2: Pruning strategy: prune the dependency graph according to the project configuration rules and dependency stability rules, and skip unnecessary or stable dependency nodes; Step B3: Circular dependency processing, detecting and processing circular dependencies in the dependency graph; Step B4: Performance tuning, by caching the already calculated dependency results and computing some dependencies in parallel, the traversal performance of the dependency graph is optimized.
4. The intelligent notification method based on Maven dependency changes according to claim 1 is characterized in that: The process of the DFS algorithm in step B1 is as follows: Step B11: Start searching from the starting point and select the dependent framework node that has changed as the starting node; Step B12: Depth-first traversal, take out the top node of the stack, traverse all adjacent nodes, if it has not been visited, mark it as visited and being visited, push it into the stack, and record the dependency relationship between the top node of the stack and the adjacent nodes; Step B13: After completing the traversal of all adjacent nodes of the top node of the stack, backtrack to the previous layer of nodes to continue searching.
5. The intelligent notification method based on Maven dependency changes according to claim 1 is characterized in that: The efficient notification push of step S4 is implemented in the following manner: Step C1: Generate email templates. Design HTML email templates based on JavaMail and template engine technology, dynamically fill in framework upgrade details, dependency change charts and operation suggestions, and support batch sending. Step C2: Integrate with instant messaging tools to push notifications in the form of picture cards and rich text through the official API, supporting group push and personal reminders.
6. The intelligent notification method based on Maven dependency changes according to claim 5 is characterized in that: The notification content in step C1 includes the following: Framework upgrade details include but are not limited to the framework's version number, author, release date, change log, and functional features; Dependency change chart, generated through dependency relationship graph, shows the impact scope of dependency changes; Operational suggestions: Based on the impact analysis of dependency changes, provide corresponding operational suggestions to help team members quickly respond to dependency changes.
7. An intelligent notification system based on Maven dependency changes, using the intelligent notification method based on Maven dependency changes as claimed in any one of claims 1 to 6, characterized in that: include: Dependency change monitoring and data collection module, which is used to monitor dependency changes in Maven projects in real time, and collect dependency version numbers, coordinate information, authors, release dates, change logs, and feature metadata; The version control system linkage module is used to link with the Git version control system and configure hook scripts. When there is code submission or merging in the private component repository, the dependency monitoring program is triggered to capture change information. The dependency graph drawing module is used to visualize the project's dependencies in the form of a graph using graph database technology, and to traverse the dependency graph through a depth-first search algorithm to locate the affected modules; An efficient notification push mechanism module is used to push dependency change notifications to team members via email or instant messaging tools, supporting batch sending, group push, and personal reminders.
8. The intelligent notification system based on Maven dependency changes according to claim 7 is characterized in that: The dependency change monitoring and data collection module includes: Maven plugin customization unit, used to accurately capture the dependency information changes in the pom.xml file in the core phase of Maven, and use Maven's parsing API to compare the dependency version numbers and coordinate information in different build rounds in real time; The metadata parsing engine unit is used to parse the additional information of dependent components and deeply read the MANIFEST.MF file and pom.properties file in the JAR package; The version control system linkage unit is used to link with the Git version control system and configure hook scripts. When code is submitted or merged in the private component repository, the dependency monitoring program is triggered to ensure that change information is captured without delay.
9. The intelligent notification system based on Maven dependency changes according to claim 7 is characterized in that: The dependency graph drawing module includes: The basic unit of the DFS algorithm is used to traverse the dependency graph through the depth-first search algorithm, record the node access status and dependency relationships, and accurately locate the affected modules; The pruning strategy unit is used to prune the dependency graph according to the project configuration rules and dependency stability rules, and skip unnecessary or stable dependency nodes; Circular dependency processing unit, used to detect and handle circular dependencies in dependency graphs; The performance tuning unit is used to optimize the traversal performance of the dependency graph by caching the already calculated dependency results and calculating some dependencies in parallel.
10. The intelligent notification system based on Maven dependency changes according to claim 7, characterized in that: The efficient notification push mechanism module includes: Mail template engine unit: used to design HTML mail templates based on JavaMail and template engine technology, dynamically fill in framework upgrade details, dependency change charts and operation suggestions, and support batch sending; The instant messaging tool integration unit is used to integrate with instant messaging tools, push picture and text cards, and rich text notifications through the official API, and support group push and personal reminders.
Citation Information
Patent Citations
Code change notification method and device between associated systems
CN111045723A
Data change message notification method and device
CN112347202A
Project transformation method, device and equipment
CN113515303A
Change reminding method and device, equipment and storage medium
CN113961228A
Method, device and equipment for data search
CN115408427A