Intelligent notification method and system based on Maven dependency changes

By customizing the Maven plug-in and linking it with the Git version control system, combined with a graph database and depth-first search algorithm, we solved the problem of Maven dependency change notifications being insufficiently detailed, achieved real-time monitoring and detailed notifications, and improved team collaboration efficiency and the ability to respond to dependency changes.

CN120085908BActive Publication Date: 2025-09-19HANGZHOU JUBO TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510559050.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-09-19
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

The existing Maven dependency change notification method is not sophisticated enough and cannot delve into the specific change content and impact analysis of the dependency. In addition, the triggering conditions and content of the notification are relatively fixed, making it difficult to meet personalized notification needs, especially in multi-person collaborative projects, where dependency change information cannot be conveyed in a timely manner.

Method used

By customizing the Maven plug-in to detect dependency changes in real time, combined with the Git version control system linkage, the dependency graph is drawn using graph database technology, and the graph is traversed using the depth-first search algorithm to generate a visual dependency graph. Finally, detailed dependency change notifications are pushed to team members via email or instant messaging tools.

Benefits of technology

It realizes real-time monitoring and accurate collection of Maven project dependency changes, and can push detailed dependency change information in a timely manner, helping the team understand the scope of impact and provide operational suggestions, improving team collaboration efficiency and notification coverage, and reducing the risk of development interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120085908B_ABST
    Figure CN120085908B_ABST
Patent Text Reader

Abstract

This paper discloses a smart notification method and system based on Maven dependency changes. By customizing a Maven plugin and integrating it with the Git version control system, the system can monitor dependency changes in Maven projects in real time and accurately collect metadata such as dependency version numbers, coordinate information, authors, release dates, change logs, and functional features. This real-time monitoring mechanism ensures that dependency change information is captured promptly and pushed to team members via email or instant messaging, avoiding the delays associated with traditional notification methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electromechanical equipment, and in particular to an intelligent notification method and system based on Maven dependency changes. Background Art

[0002] Common continuous integration tools, such as Jenkins, can configure notifications during the build and deployment process. When key events such as build failures and deployment successes occur, the Jenkins pipeline file can be configured to notify relevant personnel of the build results via email, instant messaging, and other methods. However, notifications for Maven dependency changes are not granular enough to delve into the specific changes and impact analysis of dependencies. Furthermore, the triggering conditions and content of notifications are relatively fixed, making it difficult to meet personalized notification needs.

[0003] Some integrated development environments (IDEs) provide plug-ins for integration with Maven, such as IDEA's MavenHelper plug-in, which can help developers view and manage Maven dependencies. Some plug-ins can also display prompt information in the IDE when dependency conflicts or version updates occur. These prompts are usually just simple warnings or information displays, lacking the function of active push notifications, and cannot promptly convey dependency change information to relevant personnel. This is especially true in multi-person collaborative projects, where other members may not pay attention to the prompts in the IDE in a timely manner.

[0004] In summary, a Maven dependency change-based intelligent notification method and system are needed to address the deficiencies in the existing technology. Summary of the Invention

[0005] In view of the deficiencies of the existing technology, 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:

[0007] 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.

[0008] Step S2: Linking with the Git version control system, configuring hook scripts, triggering dependency monitoring programs, and capturing change information;

[0009] 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 using a depth-first search algorithm.

[0010] Step S4: Push dependency change notifications to team members via email or instant messaging tools.

[0011] Optionally, the dependency change detection and data collection in step S1 are performed in the following manner:

[0012] Step A1: Customize the Maven plugin. In the Maven core phase, capture the changed dependency information and use Maven's parsing API to compare the differences in real time, and build the dependency version numbers and coordinate information in the round.

[0013] 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;

[0014] Step A3: Link with the version control system. Link with the Git version control system and configure a hook script. When code is committed or merged in the private component repository, the dependency monitoring program is triggered to capture change information.

[0015] Optionally, the dependency graph in step S3 is drawn in the following manner:

[0016] Step B1: Based on the DFS algorithm, the dependency graph is traversed using the depth-first search algorithm, recording node access status and dependency relationships, and locating the affected modules.

[0017] Step B2: Pruning strategy: Prune the dependency graph according to the project configuration rules and dependency stability rules, skipping unnecessary or stable dependency nodes;

[0018] Step B3: Circular dependency processing, detecting and processing circular dependencies in the dependency graph;

[0019] Step B4: Performance tuning: Optimize the traversal performance of the dependency graph by caching already calculated dependency results and computing some dependencies in parallel.

[0020] Optionally, the process of the DFS algorithm in step B1 is as follows:

[0021] Step B11: Start searching from the starting point and select the dependent framework node that has changed as the starting node;

[0022] 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;

[0023] Step B13: After completing the traversal of all adjacent nodes of the top node of the stack, backtrack to the previous layer node to continue searching.

[0024] Optionally, the efficient notification push in step S4 is performed in the following manner:

[0025] Step C1: Generate an email template. Design an HTML email template based on JavaMail and template engine technology. Dynamically fill in framework upgrade details, dependency change charts, and action suggestions, and support batch sending.

[0026] Step C2: Integrate with instant messaging tools and push notifications in the form of picture cards and rich text through the official API, supporting group push and personal reminders.

[0027] Optionally, the notification content in step C1 includes the following:

[0028] Framework upgrade details include but are not limited to the framework's version number, author, release date, change log, and functional features;

[0029] Dependency change chart, generated through dependency relationship graph, shows the impact scope of dependency changes;

[0030] Operational suggestions: Based on the impact analysis of dependency changes, corresponding operational suggestions are provided to help team members quickly respond to dependency changes.

[0031] An intelligent notification system based on Maven dependency changes, using an intelligent notification method based on Maven dependency changes, including:

[0032] The dependency change monitoring and data collection module 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.

[0033] 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.

[0034] The dependency graph drawing module is used to visualize the project's dependencies in the form of a graph using graph database technology, and traverse the dependency graph through a depth-first search algorithm to locate the affected modules;

[0035] 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.

[0036] Optionally, the dependency change monitoring and data collection module includes:

[0037] The Maven plugin customization unit is used to accurately capture dependency information changes in the pom.xml file during the Maven core phase, and use Maven's parsing API to compare dependency version numbers and coordinate information in different build rounds in real time;

[0038] 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;

[0039] The version control system linkage unit 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 ensure that the change information is captured without delay.

[0040] Optionally, the dependency graph drawing module includes:

[0041] The basic unit of the DFS algorithm is used to traverse the dependency graph through the depth-first search algorithm, record node access status and dependency relationships, and accurately locate the affected modules;

[0042] The pruning strategy unit is used to prune the dependency graph according to the project configuration rules and dependency stability rules, skipping unnecessary or stable dependency nodes;

[0043] Circular dependency processing unit, used to detect and handle circular dependencies in the dependency graph;

[0044] The performance tuning unit is used to optimize the traversal performance of the dependency graph by caching the already calculated dependency results and computing some dependencies in parallel.

[0045] Optionally, the efficient notification push mechanism module includes:

[0046] 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;

[0047] 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 supports group push and personal reminders.

[0048] Beneficial effects of the present invention:

[0049] 1. In this invention, by customizing the Maven plug-in and linking it with the Git version control system, the system can monitor dependency changes in Maven projects in real time and accurately collect metadata such as dependency version numbers, coordinate information, authors, release dates, change logs, and functional features. This real-time monitoring mechanism ensures that dependency change information can be captured promptly and pushed to team members via email or instant messaging tools, avoiding the delays associated with traditional notification methods.

[0050] 2. This invention uses graph database technology (such as Neo4j) to visualize project dependencies as a graph. Combined with a depth-first search (DFS) algorithm, the system can quickly traverse the dependency graph and accurately locate affected modules. This visualization and analysis capability helps development teams better understand the impact of dependency changes, allowing them to make more informed decisions.

[0051] 3. In this invention, the system supports push notifications of dependency changes via email and instant messaging tools. The email template is designed based on JavaMail and template engine technology, and can dynamically fill in framework upgrade details, dependency change charts, operation suggestions, etc., and supports batch sending. Instant messaging tool integration supports group push and personal reminders, ensuring that notifications can reach all relevant personnel and improving team collaboration efficiency;

[0052] 4. In this invention, the system introduces a pruning strategy, which skips unnecessary or stable dependency nodes according to the project configuration rules and dependency stability rules, thus reducing unnecessary calculations. At the same time, by caching the already calculated dependency results and computing some dependencies in parallel, 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 display of different terminal devices, ensuring the readability of the notification content on different devices. At the same time, the system supports batch sending of notifications, which can be pushed to all members of the project team with one click, ensuring the coverage of the notifications.

[0053] 5. In this invention, the system not only provides detailed information about dependency changes but also offers actionable insights based on the impact of these changes, helping team members quickly address them and reducing development interruptions or project risks. By integrating with instant messaging tools like DingTalk, the system can push notifications in the form of graphic cards and rich text, supporting both group push and individual reminders. This highly interactive notification method allows team members to instantly provide feedback on questions and discuss escalated response plans, enhancing team collaboration and communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 The present invention is a flow chart of a method.

[0055] Figure 2 This is a flow chart of dependency change monitoring and data collection according to the present invention.

[0056] Figure 3 Draw a flow chart for a dependency graph of the present invention. DETAILED DESCRIPTION

[0057] In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0058] like Figure 1 、 2 As shown in FIG. 3 , an intelligent notification method based on Maven dependency changes includes the following steps:

[0059] 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.

[0060] Step S2: Linking with the Git version control system, configuring hook scripts, triggering dependency monitoring programs, and capturing change information;

[0061] 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 using a depth-first search algorithm.

[0062] Step S4: Push dependency change notifications to team members via email or instant messaging tools.

[0063] Dependency change detection and data collection in step S1 are performed in the following ways:

[0064] Step A1: Customize the Maven plugin. In the Maven core phase, capture the changed dependency information and use Maven's parsing API to compare the differences in real time, and build the dependency version numbers and coordinate information in the round.

[0065] 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;

[0066] Step A3: Link with the version control system. Link with the Git version control system and configure a hook script. When code is committed or merged in the private component repository, the dependency monitoring program is triggered to capture change information.

[0067] The dependency graph in step S3 is drawn in the following way:

[0068] Step B1: Based on the DFS algorithm, the dependency graph is traversed using the depth-first search algorithm, recording node access status and dependency relationships, and locating the affected modules.

[0069] Step B2: Pruning strategy: Prune the dependency graph according to the project configuration rules and dependency stability rules, skipping unnecessary or stable dependency nodes;

[0070] Step B3: Circular dependency processing, detecting and processing circular dependencies in the dependency graph;

[0071] Step B4: Performance tuning: Optimize the traversal performance of the dependency graph by caching already calculated dependency results and computing some dependencies in parallel.

[0072] The process of the DFS algorithm in step B1 is as follows:

[0073] Step B11: Start searching from the starting point and select the dependent framework node that has changed as the starting node;

[0074] 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;

[0075] Step B13: After completing the traversal of all adjacent nodes of the top node of the stack, backtrack to the previous layer node to continue searching.

[0076] The efficient notification push of step S4 is achieved by:

[0077] Step C1: Generate an email template. Design an HTML email template based on JavaMail and template engine technology. Dynamically fill in framework upgrade details, dependency change charts, and action suggestions, and support batch sending.

[0078] Step C2: Integrate with instant messaging tools and push notifications in the form of picture cards and rich text through the official API, supporting group push and personal reminders.

[0079] The notification content in step C1 includes the following:

[0080] Framework upgrade details include but are not limited to the framework's version number, author, release date, change log, and functional features;

[0081] Dependency change chart, generated through dependency relationship graph, shows the impact scope of dependency changes;

[0082] Operational suggestions: Based on the impact analysis of dependency changes, corresponding operational suggestions are provided to help team members quickly respond to dependency changes.

[0083] The specific method is:

[0084] 1. Dependency change monitoring and data collection:

[0085] 1. Maven Plugin Customization: Develop a dedicated Maven plugin to accurately capture dynamic changes in dependency information within the pom.xml file during core phases like validate and compile. Leveraging Maven's parsing API, we compare dependency version numbers and coordinates across build cycles in real time. Once we detect references to private component repositories or version changes within third-party frameworks, we immediately trigger follow-up notifications.

[0086] 2. Metadata Parsing Engine: Build a module capable of parsing additional information about dependent components, not just version numbers but also the framework's author, release date, changelog, features, and more. For Java project JARs, this engine deeply reads the MANIFEST.MF file and the built-in pom.properties file. For dependencies in other formats, it adapts the corresponding parsing rules to comprehensively collect information about the dependent party.

[0087] 3. Version Control System Interaction: If your project uses the Git version control system, configure a hook script. When code is committed or merged in the private component repository, resulting in dependency changes, the hook script quickly activates the dependency monitoring program to ensure that changes are captured without delay. Simultaneously, the official version repositories of third-party open source libraries are monitored, and using web crawler technology, they regularly compare official releases with the project's current referenced versions, collecting information as soon as upgrades are discovered.

[0088] 4. Dependency Graphing: Utilizing graph database technology (such as Neo4j), complex dependencies can be visualized as a graph based on project dependency configurations. Nodes represent dependent frameworks, while edges symbolize dependency relationships. When a framework is upgraded, graph algorithms can quickly radiate to all direct and indirect dependencies, accurately locating affected project modules and assisting in customizing notification content. A depth-first search (DFS) algorithm is proposed to traverse the dependency graph and improve it based on specific strategies, such as pruning strategies, circular dependency handling, and performance optimization. The following is a detailed explanation:

[0089] 4.1. DFS Algorithm Basics

[0090] 4.1.1 Data structure preparation:

[0091] Dependency graph representation: Use a graph data structure to represent Maven project dependencies, with each dependency framework as a node and dependencies as edges. This graph structure can be implemented using an adjacency list or adjacency matrix. In Python, this can be simply represented using nested dictionary sets, for example, graph = {node: {adjacent_node1, adjacent_node2,...} for node in all_nodes}, where all_nodes is the set of all dependency framework nodes in the project.

[0092] Node visit status record: Create two Boolean dictionaries, visited and inProgress, to record whether a node has been visited and is being visited. Initially, the values ​​of visited and inProgress for all nodes are False.

[0093] 4.1.2 Basic DFS algorithm process:

[0094] Start searching from the start node: select the dependent frame node where the change occurred as the start node (assuming it is start_node), mark it as visited (visited[start_node] = True) and being visited (inProgress[start_node] = True), and push it into the stack (stack.append(start_node)).

[0095] Depth-first traversal: When the stack is not empty, take out the top node current_node = stack.pop().

[0096] 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), mark it as visited (visited[adjacent_node] = True) and being visited (inProgress[adjacent_node] = True), and push it into the stack (stack.append(adjacent_node)).

[0097] Record the dependency relationship between adjacent_node and current_node to accurately locate the affected project modules later. You can use a dictionary to store the dependency information of each node, for example, dependency_info ={node: set() for node in all_nodes}. During the traversal process, add the dependency to the corresponding node's set (dependency_info[current_node].add(adjacent_node)).

[0098] Backtracking processing: After completing the traversal of all adjacent nodes of current_node, set inProgress[current_node] to False, indicating that the search for the node has been completed, and start backtracking to the previous layer of nodes to continue searching.

[0099] 4.2. Pruning Strategy

[0100] 4.2.1 Pruning rule definition:

[0101] Project-configured rules: Dependencies that can be ignored are determined based on the project's configuration files (such as dependency scopes and exclusion rules in pom.xml). For example, if the project explicitly specifies that certain test dependencies should not be considered at runtime, pruning can be performed when traversing these test dependency nodes.

[0102] Rules based on dependency stability: For some stable and rarely changing dependent libraries, or dependencies that have been fully tested and have good compatibility with the current project, they can be set to be skipped during the search process unless they themselves have changed.

[0103] 4.2.2 Pruning operation implementation:

[0104] When traversing the adjacent nodes of the current node, for each adjacent node, before pushing it onto the stack, the pruning judgment function should_prune(adjacent_node) is called. If the function returns True, the adjacent node is skipped and no further search is performed; if it returns False, the search continues as normal.

[0105] 4.3 Circular Dependency Handling

[0106] 4.3.1 Circular Dependency Detection

[0107] During a depth-first search, when visiting a node called current_node, inProgress[current_node] is set to True. If, while traversing current_node's adjacent nodes, an adjacent node is found marked with inProgress[adjacent_node] == True, a circular dependency exists. In this case, the path information for the circular dependency is printed (print(f"Circular dependency detected: {current_node} -> {adjacent_node}")) and the search for that path is stopped to avoid an infinite loop.

[0108] 4.3.2 Circular Dependency Processing Logic

[0109] When a circular dependency is detected, you can choose to ignore the circular dependency path and continue searching other unvisited nodes. Alternatively, you can perform more complex processing based on project requirements, such as logging the circular dependency information and alerting developers to potential issues in subsequent notifications. In the basic DFS algorithm described above, the continue statement skips the adjacent node with the circular dependency and continues processing to the next adjacent node.

[0110] 4.4 Performance Tuning

[0111] 4.4.1 Cache Already Calculated Dependency Results

[0112] Cache data structure creation: Use a global dictionary dependency_cache to store the calculated node dependency results. The key is the node identifier, and the value is a set of direct and indirect dependent parties (dependency_cache = {node: set() for node in all_nodes}).

[0113] Cache query and update: 1. Before starting a depth-first search for a node, check whether the node's dependency results already exist in the cache (if node in dependency_cache:). If so, return the cached result (return dependency_cache[node]) without searching again.

[0114] 2. After completing the search for a node, the calculated dependency result is stored in the cache (dependency_cache[node] = result) so that the result can be quickly obtained when the node is accessed again later.

[0115] 4.4.2 Parallel Computation of Partial Dependencies

[0116] Graph segmentation strategy: Split the dependency graph into multiple relatively independent subgraphs based on the project's module structure, dependency hierarchy, or other reasonable division methods. For example, the graph can be divided into multiple subgraphs based on functional modules, each of which contains the dependency nodes and dependency relationships related to that functional module.

[0117] Parallel Computing Implementation: Use the concurrent.futures module in Python (such as ThreadPoolExecutor or ProcessPoolExecutor) to implement parallel computing. Create a thread pool or process pool and set the degree of parallelism appropriately based on system resources and the number of subgraphs (for example, with concurrent.futures.ThreadPoolExecutor(max_workers=num_threads) as executor:, where num_threads is the number of parallel threads).

[0118] For each subgraph, 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 undergone pruning, circular dependency processing, and cache optimization.

[0119] Wait for all tasks to complete (concurrent.futures.wait(futures)) and get the results of each task (results = [future.result() for future in futures]). Finally, merge the results of each subgraph to obtain the final dependent party set (final_result = set.union(*results)).

[0120] 2. Efficient notification push mechanism:

[0121] 1. Email Template Engine: Based on established email sending libraries (such as JavaMail), combined with template engine technologies like FreeMarker and Thymeleaf, we design beautiful, informative HTML email templates. These templates dynamically populate with framework upgrade details, dependency change charts, action suggestions, and other content, adapting to display on different devices. We also support batch sending, with one-click push notifications based on project team member lists to ensure widespread notification coverage.

[0122] 2. Instant Messaging Tool Integration Suite: Developed a corresponding integration program for DingTalk, the team's commonly used instant messaging platform. Leveraging the official open API, this package includes message push functionality, enabling notifications in the form of image cards and rich text. Supporting group push notifications and individual @ notifications, the highly interactive nature of instant messaging facilitates instant feedback from members and the exchange of escalating solutions.

[0123] An intelligent notification system based on Maven dependency changes, using an intelligent notification method based on Maven dependency changes, including:

[0124] The dependency change monitoring and data collection module 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.

[0125] 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.

[0126] The dependency graph drawing module is used to visualize the project's dependencies in the form of a graph using graph database technology, and traverse the dependency graph through a depth-first search algorithm to locate the affected modules;

[0127] 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.

[0128] The dependency change monitoring and data collection module includes:

[0129] The Maven plugin customization unit is used to accurately capture dependency information changes in the pom.xml file during the Maven core phase, and use Maven's parsing API to compare dependency version numbers and coordinate information in different build rounds in real time;

[0130] 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;

[0131] The version control system linkage unit 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 ensure that the change information is captured without delay.

[0132] The dependency graph drawing module includes:

[0133] The DFS algorithm basic unit is used to traverse the dependency graph using the depth-first search (DFS) algorithm, record node access status and dependency relationships, and accurately locate the affected modules;

[0134] The pruning strategy unit is used to prune the dependency graph according to the project configuration rules and dependency stability rules, skipping unnecessary or stable dependency nodes;

[0135] Circular dependency processing unit, used to detect and handle circular dependencies in the dependency graph;

[0136] The performance tuning unit is used to optimize the traversal performance of the dependency graph by caching the already calculated dependency results and computing some dependencies in parallel.

[0137] The efficient notification push mechanism modules include:

[0138] 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;

[0139] 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 supports group push and personal reminders.

[0140] By integrating a custom Maven plugin with the Git version control system, the system can monitor dependency changes in Maven projects in real time and accurately collect metadata such as version numbers, coordinates, authors, release dates, change logs, and features. This real-time monitoring mechanism ensures that dependency change information is captured promptly and pushed to team members via email or instant messaging tools (such as DingTalk), avoiding the delays associated with traditional notification methods.

[0141] By using graph database technologies (such as Neo4j) to visualize project dependencies as a graph, and combining it with the depth-first search (DFS) algorithm, the system can quickly traverse the dependency graph and accurately locate affected modules. This visualization and analysis capability helps development teams better understand the impact of dependency changes and make more informed decisions.

[0142] The system supports push notifications of dependency changes via email and instant messaging tools. Designed based on JavaMail and template engine technology, email templates can dynamically populate framework upgrade details, dependency change charts, operational suggestions, and more, supporting batch sending. Instant messaging tool integration supports group push and personal reminders, ensuring that notifications reach all relevant personnel and improving team collaboration efficiency.

[0143] The system introduces a pruning strategy that skips unnecessary or stable dependency nodes based on project configuration rules and dependency stability rules, reducing unnecessary calculations. At the same time, by caching already calculated dependency results and computing some dependencies in parallel, the system optimizes the traversal performance of the dependency graph and improves the overall responsiveness of the system. System-generated email notifications can adapt to the display of different terminal devices, ensuring the readability of notification content on different devices. At the same time, the system supports batch notifications, which can be pushed to all members of the project team with one click, ensuring notification coverage.

[0144] The system not only provides detailed information about dependency changes but also offers actionable insights based on their impact, helping team members quickly address them and reducing development interruptions or project risks. Integration with instant messaging tools like DingTalk allows for push notifications in the form of graphic cards and rich text, supporting both group push and individual reminders. This highly interactive notification method allows team members to instantly provide feedback on questions and discuss escalated response plans, enhancing team collaboration and communication efficiency.

[0145] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included in the scope of protection 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. Dependency change detection and data collection, through the following methods: Step A1: Customize the Maven plugin. In the Maven core phase, capture the changed dependency information and use Maven's parsing API to compare the differences in real time, and build the dependency version numbers 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 S2: 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 using a depth-first search algorithm. Through graph algorithms, we can quickly find all direct and indirect dependent parties, accurately locate affected project modules, assist in customizing notification content, and make improvements based on policies. Each dependency framework is treated as a node, and the dependency relationship is treated as an edge. Adjacency lists or adjacency matrices are used to implement the graph structure. Dependency graph drawing, through the following methods: Step B1: Based on the DFS algorithm, the dependency graph is traversed using the depth-first search algorithm, recording node access status and dependency relationships, and locating the affected modules. Step B2: Pruning strategy: Prune the dependency graph according to the project configuration rules and dependency stability rules, skipping unnecessary or stable dependency nodes; When traversing the adjacent nodes adjacent_nodes of the current node current_node, for each adjacent node adjacent_node, before pushing it into the stack, first call the pruning judgment function should_prune(adjacent_node). If the function returns True, skip the adjacent node and do not search further; if it returns False, search according to the normal process; Step B3: Circular dependency processing, detecting and processing circular dependencies in the dependency graph; When a circular dependency is detected, choose to ignore the circular dependency path and continue searching for other unvisited nodes, or record the circular dependency information according to project requirements and remind developers of possible problems in subsequent notifications; Step B4: Performance tuning: Optimize the dependency graph traversal performance by caching already calculated dependency results and computing some dependencies in parallel. Parallelize the computation of some dependencies by: Divide the dependency graph into multiple relatively independent subgraphs according to the functional modules. Each subgraph contains the dependency nodes and dependency relationships related to the functional module. For each subgraph, submit an independent depth-first search task to the thread pool or process pool. After the task is completed, obtain the results of each task and merge the results of each subgraph to obtain the final set of dependent parties. Step S4: Push dependency change notifications to team members via email or instant messaging tools.

2. 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 node to continue searching.

3. 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 achieved by: Step C1: Generate an email template. Design an HTML email template based on JavaMail and template engine technology. Dynamically fill in framework upgrade details, dependency change charts, and action suggestions, and support batch sending. Step C2: Integrate with instant messaging tools and push notifications in the form of picture cards and rich text through the official API, supporting group push and personal reminders.

4. The intelligent notification method based on Maven dependency changes according to claim 3 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, corresponding operational suggestions are provided to help team members quickly respond to dependency changes.

5. A smart notification system based on Maven dependency changes, using the smart notification method based on Maven dependency changes as claimed in any one of claims 1 to 4, characterized in that: include: The dependency change monitoring and data collection module 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 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.

6. The intelligent notification system based on Maven dependency changes according to claim 5 is characterized in that: The dependency change monitoring and data collection module includes: The Maven plugin customization unit is used to accurately capture dependency information changes in the pom.xml file during the Maven core phase, and use Maven's parsing API to compare 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 and configure hook scripts. When there is code submission or merging in the private component repository, the dependency monitoring program is triggered to ensure that the change information is captured without delay.

7. The intelligent notification system based on Maven dependency changes according to claim 5 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 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, skipping unnecessary or stable dependency nodes; Circular dependency processing unit, 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 already calculated dependency results and computing some dependencies in parallel.

8. The intelligent notification system based on Maven dependency changes according to claim 5 is 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 supports group push and personal reminders.

Citation Information

Patent Citations

  • Data change message notification method and device

    CN112347202A

  • Change reminding method and device, equipment and storage medium

    CN113961228A

  • Data processing method and device, storage medium and electronic equipment

    CN119645482A