Data processing method and device, storage medium and electronic equipment
By creating a dependency acquisition plug-in in the dependency management system, dependent data is captured and processed in real time and uploaded to a centralized database, the problem of inefficient dependency data query is solved, and the automation and visualization of dependency management is realized.
Patent Information
- Application Number
- CN202411706953.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
In the existing dependency management system, relying on data to store decentralized data leads to low query efficiency and lack of a unified platform to integrate and manage dependent data.
By creating a dependency acquisition plug-in in the project object model file of the target application, parsing the project object model file, determining the initial dependency data, and listening to changes in the construction process, capturing the change-dependent data in real time. The initial and change-dependent data processing is processed as the target dependent data, and uploaded to the target database to query and display data in response to query messages.
Real-time collection and automated upload of dependent data is realized, combined with centralized database storage and efficient query mechanism, the efficiency of dependent data query is greatly improved, the problem of low dependent data query efficiency is solved, and the automation and visualization of dependent data management is realized.
Smart Images

Figure CN119645482A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a data processing method and device, a storage medium, and an electronic device. Background Art
[0002] In the existing dependency management system, dependency data is often stored in local or remote warehouses of various projects. There is a lack of a unified, centralized platform to integrate and manage dependency data. This decentralized storage method requires searching each project or warehouse one by one when querying dependencies. Therefore, there is a technical problem of low query efficiency of dependency data in related technologies.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a data processing method and device, a storage medium, and an electronic device to at least solve the technical problem of low efficiency of queries that rely on data.
[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, comprising: creating a dependency acquisition plug-in under a build node in a project object model file of a target application, parsing the project object model file through the dependency acquisition plug-in, and determining initial dependency data of the target application, wherein the target application is set to be deployed on at least two platforms with different platform identifiers; monitoring different stages of the build process of the target application to determine changed dependency data of the target application; processing the initial dependency data and the changed dependency data into target dependency data, and uploading the target dependency data to a target database; and querying and displaying the target dependency data from the target database in response to a target query message.
[0006] According to another aspect of an embodiment of the present application, a data processing device is also provided, including: a determination module, used to create a dependency collection plug-in under a build node in a project object model file of a target application, and to parse the project object model file through the dependency collection plug-in to determine the initial dependency data of the target application, wherein the target application is set to be deployed on at least two platforms with different platform identifiers; a monitoring module, used to monitor different stages of the build process of the target application and determine the changed dependency data of the target application; a transmission module, used to process the initial dependency data and the changed dependency data into target dependency data, and upload the target dependency data to a target database; a processing module, used to query and display the target dependency data from the target database in response to a target query message.
[0007] Optionally, the device is also used to: add a standard remote private server configuration in the global configuration file of the target application to control the target application to obtain various dependent artifacts required by the target application; add a dependency collection plug-in in the project object model file, wherein the dependency collection plug-in is used to obtain the initial dependency data and the changed dependency data.
[0008] Optionally, the device is also used to: define a target data interface for connecting the dependency acquisition plug-in and a data acquisition platform; and use the target data interface to obtain the initial dependency data and the changed dependency data collected by the dependency acquisition plug-in.
[0009] Optionally, the device is also used to: build the target application in response to a target build command; parse the dependency artifact data in the project object model file using a dependency parser in the dependency collection plug-in to obtain the initial dependency data; detect the build status of the target application using a real-time monitor in the dependency collection plug-in; and obtain the changed dependency data when the build status of the target application changes.
[0010] Optionally, the device is also used to: store the target dependency data in a target database according to the coordinate information and version information of each dependent artifact of the target application; when the query type is an artifact dependency query type, query the target database according to the coordinate information and version information of the first dependent artifact to obtain the first artifact dependency data corresponding to the first dependent artifact; when the query type is a directed dependency query type, query the target database according to the coordinate information of the second dependent artifact to obtain the second artifact version information corresponding to the second dependent artifact.
[0011] Optionally, the device is used to store the target dependency data in a target database according to the coordinate information and version information of each dependent artifact of the target application in the following manner: parse the target dependency data to obtain the dependency group number, dependency item number and dependency artifact version of each dependent artifact, wherein the dependency group number is used to indicate the layer to which the dependent artifact belongs in the target application, and the dependency item number is used to indicate the dependent artifact itself; determine the coordinate information of each dependent artifact according to the dependency group number and dependency item number, and determine the version information of each dependent artifact according to the dependency artifact version; store the target dependency data in the target database according to the coordinate information and version information of each dependent artifact.
[0012] Optionally, the device is also used to: display the first product dependency data when the first product dependency data is found in the target database; and display a prompt message indicating query failure when the first product dependency data is not found in the target database.
[0013] Optionally, the device is also used to: determine a target dependent artifact version from the second artifact version information in response to a target interaction operation; and obtain multiple artifact dependency data associated with the target dependent artifact version from the target database, wherein the multiple artifact dependency data include the target dependency data.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned data processing method when running.
[0015] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above data processing method.
[0016] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the data processing method through the computer program.
[0017] In an embodiment of the present application, a dependency collection plug-in is created under the build node in the project object model (POM) file of the target application. The POM file is parsed by the dependency collection plug-in to determine the initial dependency data of the target application when it is deployed on at least two platforms with different platform identifiers. At the same time, the plug-in monitors multiple key stages in the target application build process in real time, such as compilation, testing, packaging, etc., to determine the changed dependency data of the target application.
[0018] Thus, the initial dependency data and the changed dependency data are merged and processed to form accurate target dependency data, and these data are uploaded to the target database using an automated mechanism, effectively improving the timeliness and accuracy of the data. Furthermore, when a target query message is received, the acquisition platform can quickly query and display the target dependency data from the target database, providing users with an efficient and intuitive display of dependency relationships. That is, through real-time data collection and automated upload, combined with centralized database storage and an efficient query mechanism, the purpose of greatly improving the query efficiency of dependency data is achieved, thereby realizing the automation and visualization of dependency management, and effectively solving the technical problem of low query efficiency of dependency data. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a schematic diagram of an application environment of an optional data processing method according to an embodiment of the present application;
[0021] Figure 2 is a flowchart of an optional data processing method according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of an architecture of an optional data processing method according to an embodiment of the present application;
[0023] Figure 4 is a module schematic diagram of an optional data processing method according to an embodiment of the present application;
[0024] Figure 5 is a data interaction diagram of an optional data processing method according to an embodiment of the present application;
[0025] Figure 6 is a schematic structural diagram of an optional data processing device according to an embodiment of the present application;
[0026] Figure 7 is a schematic diagram of the structure of an optional data processing product according to an embodiment of the present application;
[0027] Figure 8 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] The present application is described below in conjunction with embodiments:
[0031] According to one aspect of an embodiment of the present application, a data processing method is provided. Optionally, in this embodiment, the data processing method can be applied to Figure 1 In the hardware environment composed of the server 101 and the terminal device 103 shown in FIG. Figure 1As shown, the server 101 is connected to the terminal 103 via a network, and can be used to provide services for the terminal device or an application 107 installed on the terminal device. The application can be a video application, an instant messaging application, a browser application, an educational application, a game application, etc. A database 105 may be set up on the server or independently of the server to provide data storage services for the server 101, for example, a game data storage server. The above-mentioned network may include, but is not limited to, a wired network and a wireless network, wherein the wired network includes, for example, a local area network, a metropolitan area network, and a wide area network; the wireless network includes, for example, Bluetooth, WIFI, and other networks that implement wireless communication; the terminal device 103 may be a terminal configured with an application program, and may include, but is not limited to, at least one of the following: a mobile phone (such as an Android phone, an iOS phone, etc.), a laptop computer, a tablet computer, a PDA, a MID (Mobile Internet Devices), a PAD, a desktop computer, a smart TV, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a mixed reality (MR) terminal, and other computer devices; the above-mentioned server may be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0032] Combination Figure 1 As shown, the above data processing method can be executed by an electronic device, which can be a terminal device or a server. The above data processing method can be implemented by the terminal device or the server respectively, or by the terminal device and the server together.
[0033] The above is only an example and is not specifically limited in this embodiment.
[0034] Optionally, as an optional implementation, as Figure 2 As shown, the above data processing method includes:
[0035] S202, creating a dependency collection plug-in under a build node in a project object model file of a target application, parsing the project object model file through the dependency collection plug-in, and determining initial dependency data of the target application, wherein the target application is set to be deployed on at least two platforms with different platform identifiers;
[0036] Optionally, in an embodiment of the present application, the above-mentioned target application refers to a software project, including but not limited to Java applications, Web applications or other types of software projects, which are designed to be deployed across multiple platforms, each platform having its own unique identifier, such as an on-cloud environment and an off-cloud environment, to adapt to the operating requirements of different scenarios.
[0037] Optionally, in an embodiment of the present application, the above-mentioned project object model file refers to the pom.xml file in the Maven project, which contains key configurations such as project construction, dependency management, and project information, and is the core configuration file of the Maven build process.
[0038] Optionally, in the embodiment of the present application, the dependency collection plug-in under the above-mentioned build node refers to the dependency collection plug-in in the pom.xml file <build>The main function of the custom plug-in configured under the node is to capture and parse dependencies in real time during the build process, determine the initial dependency data of the project at the beginning of the build, and also monitor dependency changes during the build process to update dependency information in real time. This plug-in can adapt to the characteristics of multi-platform deployment, ensuring that the dependency information of the target application in different platform environments can be correctly parsed and collected.
[0039] S204, monitoring different stages of the target application's construction process, and determining change dependency data of the target application;
[0040] Optionally, in an embodiment of the present application, the above-mentioned monitoring of the build process of the target application refers to real-time monitoring of the dependencies of the target application at different stages of the Maven build life cycle, such as verification, compilation, testing, packaging, integration testing, verification testing, deployment, etc., which may include but are not limited to the validate, compile, test, package and other stages.
[0041] S206, processing the initial dependency data and the changed dependency data into target dependency data, and uploading the target dependency data to the target database;
[0042] Optionally, in an embodiment of the present application, the above-mentioned initial dependency data refers to the original dependency information of the target application parsed from the project object model file by the dependency collection plug-in at the beginning of the build process, including but not limited to the libraries, frameworks and their version numbers that the project directly depends on.
[0043] Optionally, in an embodiment of the present application, the above-mentioned changed dependency data refers to dependency change information caused by code modification, version update, etc. during the construction process, including but not limited to newly added dependencies, version upgraded dependencies or removed dependencies, etc.
[0044] Optionally, in an embodiment of the present application, target dependency data refers to the final dependency list after integrating and processing the initial dependency data and the changed dependency data, which contains dependency information that is valid for the target application within a specific build cycle, including but not limited to groupId, artifactId, version number, dependency scope, etc., as well as data related to the deployment platform identifier, to ensure the comprehensiveness and accuracy of the dependency information.
[0045] Optionally, in an embodiment of the present application, the target database refers to a database system used to centrally store and manage target dependency data, including but not limited to relational databases (such as MySQL, PostgreSQL) or non-relational databases (such as MongoDB, Redis), which are used to provide efficient data query and retrieval services and support the project team's real-time monitoring and analysis of dependency relationships.
[0046] S208, in response to the target query message, query and display target dependent data from the target database.
[0047] Optionally, in an embodiment of the present application, the above-mentioned target query message refers to a request initiated by a user through an interactive interface (such as a web page, API call), which is used to query detailed dependency information of a specific project or dependent artifact, including but not limited to querying dependent artifacts with specific groupId, artifactId and version number, as well as the deployment status and change history of these artifacts on different platforms.
[0048] Optionally, in an embodiment of the present application, the above-mentioned process of querying and displaying target dependency data from the target database refers to that after the acquisition platform receives the target query message, it uses a database query language (such as SQL) to search the target database, extracts dependency data that matches the query conditions, and then presents the query results to the user in a clear and intuitive manner through a data display mechanism, such as a Web service, a graphical user interface (GUI) or an API response, including but not limited to displaying dependency relationships in the form of tables, charts or tree structures, and providing detailed information queries on dependent artifact versions, packaging types, dependency scopes, etc.
[0049] It should be noted that the dependency collection plug-in under the above-mentioned build node can be flexibly configured to adapt to the specific needs of different projects. For example, the listening phase of the plug-in can be adjusted, the logging level can be increased, or specific filtering rules can be set. This application does not limit this.
[0050] Exemplarily, after parsing the project object model file (POM), the dependency collection plug-in determines the initial dependency data, then listens to and determines the changed dependency data at different stages of the build process (such as compile, test, package, etc.), merges the two into complete target dependency data through the data processing mechanism, and then uploads it to the target database, and finally responds to query messages to quickly retrieve and display the target dependency data.
[0051] In an exemplary embodiment, taking the application scenario of a target application of a large financial software as an example, the development team configured a dependency collection plug-in in the pom.xml file of the code project. When the Jenkins pipeline triggers the build, the plug-in begins to parse the pom file, determine and record the initial dependency data. Subsequently, the plug-in continues to listen during the compilation, testing and other construction phases to collect dependency changes caused by code modifications and form change dependency data. After the build is completed, the plug-in automatically merges the initial dependency data and the change dependency data to form the target dependency data, and uploads it to the dedicated collection platform database through the network interface. When the project manager needs to check the dependency relationship, he only needs to enter specific coordinate information in the visual query interface, and the system will query and display the target dependency data in real time from the database, including detailed information such as the version of the product, packaging type, and dependency range.
[0052] Through the embodiment of the present application, a dependency collection plug-in is created under the build node in the project object model (POM) file of the target application. The POM file is parsed by the dependency collection plug-in to determine the initial dependency data of the target application when it is deployed on at least two platforms with different platform identifiers. At the same time, the plug-in will monitor multiple key stages in the target application construction process in real time, such as compilation, testing, packaging, etc., to determine the changed dependency data of the target application.
[0053] Thus, the initial dependency data and the changed dependency data are merged and processed to form accurate target dependency data, and these data are uploaded to the target database using an automated mechanism, effectively improving the timeliness and accuracy of the data. Furthermore, when a target query message is received, the acquisition platform can quickly query and display the target dependency data from the target database, providing users with an efficient and intuitive display of dependency relationships. That is, through real-time data collection and automated upload, combined with centralized database storage and an efficient query mechanism, the purpose of greatly improving the query efficiency of dependency data is achieved, thereby realizing the automation and visualization of dependency management, and effectively solving the technical problem of low query efficiency of dependency data.
[0054] As an optional solution, the above method also includes: adding a standard remote private server configuration in the global configuration file of the above target application to control the above target application to obtain the various dependent artifacts required by the target application; adding a dependency collection plug-in in the above project object model file, wherein the above dependency collection plug-in is used to obtain the above initial dependency data and the above changed dependency data.
[0055] Optionally, in an embodiment of the present application, the global configuration file of the above-mentioned target application refers to the settings.xml file of the Maven environment, which is used to configure the global behavior of Maven, including but not limited to defining the address, authentication information and mirror settings of the remote warehouse, so as to control the target application to access and download the required dependent artifacts during construction; the above-mentioned standard remote private server configuration refers to the configuration information of the private remote warehouse added in settings.xml, ensuring that the target application can preferentially search for dependencies from the private warehouse during the construction process, which includes but is not limited to specifying the URL of the private warehouse, access credentials, etc., so as to achieve efficient and secure acquisition of dependent artifacts.
[0056] In an exemplary embodiment, taking the application scenario of a software project in the financial industry as an example, the developer first added the standard remote private server configuration in the global configuration file settings.xml to ensure that the dependent artifacts can be obtained from the internal private warehouse first during the build process, improving the security and efficiency of the build. Then, the developer added the standard remote private server configuration in the project object model file pom.xml. <build>A dependency collection plug-in is added to the node, and the plug-in's monitoring build phase and data processing logic are configured. When the Jenkins pipeline triggers a build, the dependency collection plug-in begins parsing pom.xml, determines the initial dependency data, and monitors dependency changes throughout the build process to capture changed dependency data in real time. After the build is completed, the plug-in processes this data into target dependency data and automatically uploads it to the database of the collection platform through the preset data interface.
[0057] Through the embodiments of the present application, a solution of introducing a dependency collection plug-in in the pom file and setting a standard remote private server in the Maven global configuration is adopted to achieve the technical effect of real-time, automated collection of dependency information and efficient and secure acquisition of dependency artifacts, thereby achieving the purpose of improving the transparency, accuracy and efficiency of the software project build process, while reducing dependence on external open source repositories and enhancing the security and controllability of the project.
[0058] As an optional solution, the method further includes: defining a target data interface for connecting the dependency acquisition plug-in and the data acquisition platform; and using the target data interface to obtain the initial dependency data and the changed dependency data collected by the dependency acquisition plug-in.
[0059] Optionally, in an embodiment of the present application, the above-mentioned target data interface refers to a standardized communication protocol or API, which is used to transmit dependency data between the dependency collection plug-in and the data collection platform, including but not limited to communication mechanisms such as HTTP POST, WebSocket, AMQP (such as RabbitMQ) or gRPC, to ensure that the dependency information collected by the plug-in can be accurately and efficiently transmitted to the data collection platform.
[0060] Optionally, in an embodiment of the present application, the initial dependency data and changed dependency data collected by the above-mentioned dependency collection plug-in refer to the project dependency information captured and organized in real time by the plug-in at the beginning and during the build process, including the project's direct dependencies, indirect dependencies, dependency versions, and dependency changes that occurred during the build process, such as dependency additions, deletions, or version updates.
[0061] As an optional solution, the above method also includes: building the above target application in response to the target build command; using the dependency parser in the above dependency collection plug-in to parse the above dependency artifact data in the above project object model file to obtain the above initial dependency data; using the real-time monitor in the above dependency collection plug-in to detect the build status of the above target application; when the build status of the above target application changes, obtaining the above changed dependency data.
[0062] Optionally, in an embodiment of the present application, the above-mentioned target build command refers to a command executed by a project build tool such as Maven, which is used to trigger the build process of the target application, including but not limited to mvn clean install, mvn package or mvn compile, etc. These commands will start the Maven build life cycle, process project source code, manage dependencies, and generate deployable software products.
[0063] Optionally, in an embodiment of the present application, the above-mentioned dependency parser refers to a functional module in a dependency collection plug-in, which is used to parse the dependency information in the project object model file (pom.xml), including but not limited to groupId, artifactId, version number and dependency range, so as to obtain the initial dependency data of the target application at the beginning of the build.
[0064] Optionally, in an embodiment of the present application, the above-mentioned real-time monitor is another key module in the dependency collection plug-in, which is responsible for continuously monitoring the build status of the target application at various stages of the build process, such as validation, compilation, testing, etc., to capture possible dependency changes.
[0065] Optionally, in an embodiment of the present application, the above-mentioned change in build status refers to a dynamic change such as addition, removal or version update of the target application's dependencies at any stage of the Maven build lifecycle.
[0066] It should be noted that the specific form of the target build command may vary according to project requirements and build tools. When the build state changes, the way to obtain the change dependency data may also vary due to differences in build tools or plug-in implementations. This application does not limit this, as long as it can achieve dynamic monitoring and capture of dependency changes during the build process.
[0067] For example, when a developer enters a target build command through a Jenkins pipeline or command line, the dependency parser in the dependency collection plug-in first parses the dependency information defined in the project object model file and collects the initial dependency data. Then, the real-time monitor continuously detects the state changes of the target application during the build process. Once a dependency change is found, the changed dependency data is obtained to ensure that the latest dependency list is obtained after each build.
[0068] Through the embodiment of the present application, the technical solution of integrating dependency parser and real-time monitor in Maven build cycle is adopted to achieve the technical effect of real-time tracking and updating of dependency information in the target application build process, and achieve the purpose of improving the transparency, accuracy and efficiency of software project dependency management. This not only automates dependency management, but also reduces errors caused by human intervention and improves the reliability of the build process.
[0069] As an optional solution, the above method also includes: storing the above target dependency data in a target database according to the coordinate information and version information of each dependent artifact of the above target application; when the query type is a product dependency query type, querying the above target database according to the coordinate information and version information of the first dependent artifact, and obtaining the first artifact dependency data corresponding to the above first dependent artifact; when the query type is a directed dependency query type, querying the above target database according to the coordinate information of the second dependent artifact, and obtaining the second artifact version information corresponding to the above second dependent artifact.
[0070] Optionally, in an embodiment of the present application, the above-mentioned coordinate information refers to the unique identifier of the project dependent artifact in the warehouse, including but not limited to groupId and artifactId, which is used to accurately locate and manage external dependencies in software projects.
[0071] Optionally, in an embodiment of the present application, the above-mentioned target dependency data refers to the comprehensive information about the target application and its product dependencies collected and processed by the dependency collection plug-in during the build process, including but not limited to the coordinate information, version information, dependency scope of each dependent product, and the association relationship with other products of the target application.
[0072] Optionally, in an embodiment of the present application, the above-mentioned target database refers to a database system used to store target application dependency information, including but not limited to relational databases (such as MySQL, PostgreSQL) or non-relational databases (such as MongoDB, Cassandra), used to provide query and analysis services for dependency data.
[0073] Optionally, in an embodiment of the present application, the above-mentioned product dependency query type and directed dependency query type refer to two different query methods, wherein the product dependency query type queries the full dependency information of the product based on the coordinate information and version information of the specific dependent product; while the directed dependency query type queries all projects using the product and their corresponding product version information based on the coordinate information of the specific dependent product.
[0074] It should be noted that in actual operation, the specific implementation of the target database may vary according to the amount of data, query frequency and performance requirements. For example, for the storage and query of large-scale dependent data, a distributed database or a database system with high concurrent query capabilities may be required. In addition, the specific implementation of query types, such as the query logic and algorithm of product-dependent queries and directional-dependent queries, may also vary due to differences in database structure and data design. This application does not limit this.
[0075] For example, when the build process is completed, the dependency collection plug-in will organize the dependency artifact information of the target application and store it in the target database. For artifact dependency queries, the system will retrieve the relevant artifact dependencies in the target database based on the coordinate information and version information of the specific dependency artifact entered by the user, and generate a detailed dependency analysis report. For targeted dependency queries, the system will find all projects that use the dependency artifact based on the coordinate information, and further extract the artifact version information of these projects to help users understand the usage and version distribution of the dependency artifact in different projects.
[0076] In an exemplary embodiment, taking the product dependency management of a large financial software project as an example, the project manager configures the dependency collection plug-in in the project object model file pom.xml. The plug-in collects all the dependent product data of the target application during the build process, including direct dependencies and indirect dependencies. After the build is completed, the plug-in uploads this dependency information to the target database through the data interface, and the database stores the target dependency data according to the product coordinates and version information.
[0077] On the one hand, when user A needs to query artifact dependencies, the target database is queried based on the coordinate information and version information of a specific artifact, providing the full dependency information of the artifact, including a list of all directly and indirectly dependent artifacts and their version numbers;
[0078] On the other hand, when user B performs a targeted dependency query, all projects that use a product and their respective product version information are queried and displayed based on the coordinate information of a product, helping user B quickly understand the usage of the product in different projects to facilitate version management and vulnerability detection.
[0079] Through the embodiments of the present application, a target database is used to centrally store target dependency data, and a design that supports artifact dependency queries and directed dependency queries is used to achieve the technical effect of efficient storage and retrieval of target application dependency artifact information, thereby achieving the purpose of improving the transparency, accuracy and response speed of dependency management.
[0080] As an optional solution, storing the target dependency data into a target database according to the coordinate information and version information of each dependent artifact of the target application includes: parsing the target dependency data to obtain the dependency group number, dependency item number and dependency artifact version of each dependent artifact, wherein the dependency group number is used to indicate the level to which the dependent artifact belongs in the target application, and the dependency item number is used to indicate the dependent artifact itself; determining the coordinate information of each dependent artifact according to the dependency group number and dependency number, and determining the version information of each dependent artifact according to the dependency artifact version; storing the target dependency data into the target database according to the coordinate information and version information of each dependent artifact.
[0081] Optionally, in an embodiment of the present application, the above-mentioned dependency group number and dependency item number refer to codes used to identify the position and properties of dependent artifacts in the target application dependency tree, wherein the dependency group number corresponds to groupId, which is used to indicate the context level of the dependent artifact in the target application or the project group to which it belongs; the dependency item number corresponds to artifactId, which is used to uniquely identify each dependent artifact itself.
[0082] Optionally, in an embodiment of the present application, the above-mentioned coordinate information refers to a location identifier of a dependent artifact in a Maven repository, which is composed of a dependency group number and a dependency item number and is used to accurately locate the dependent artifact in the repository.
[0083] In an exemplary embodiment, taking the artifact dependency management application scenario of a software engineering project as an example, when the Maven build process is completed, the dependency collection plug-in will organize all dependency artifact information of the target application, first parse the target dependency data, and extract the dependency group number, dependency item number and dependency artifact version of each dependency artifact. This information is then used to determine the coordinate information and version information of each dependency artifact, that is, the position of the dependency artifact is located by the dependency group number and dependency number, and the specific version number is confirmed by the dependency artifact version; finally, based on the parsed coordinate information and version information, the target dependency data is stored in the target database to ensure that the information of each dependency artifact can be accurately recorded and queried.
[0084] Through the embodiments of the present application, a multi-dimensional parsing mechanism of dependency group number, dependency item number and dependency artifact version is adopted to achieve the technical effect of refined storage and management of target application dependency artifact information, thereby achieving the purpose of improving the accuracy of dependency data storage and retrieval efficiency.
[0085] As an optional solution, the above method also includes: when the above-mentioned first product dependency data is queried in the above-mentioned target database, displaying the above-mentioned first product dependency data; when the above-mentioned first product dependency data is not queried in the above-mentioned target database, displaying a prompt message indicating that the query failed.
[0086] Optionally, in an embodiment of the present application, the above-mentioned first artifact dependency data refers to a data set of all dependent artifacts associated with the dependent artifact retrieved from the target database under the artifact dependency query type based on the specific dependent artifact coordinate information and version information input by the user, including but not limited to the list of directly and indirectly dependent artifacts, version numbers and dependency ranges.
[0087] It should be noted that the query efficiency and accuracy of the target database may be affected by many factors, such as the database index design, query algorithm optimization, storage structure selection, etc. In different query scenarios, such as when the query frequency is high and the amount of data is large, it may be necessary to adopt a more efficient data retrieval mechanism, such as full-text retrieval, cache preloading, etc., to improve the user experience. In addition, the prompt message indicating the query failure can be a user-friendly interface prompt, error log or system alarm. The specific form can be customized according to the implementation method of the front-end display platform and user needs, and this application does not limit this.
[0088] Optionally, in an embodiment of the present application, the above-mentioned display of the first product dependency data or the display of a prompt message indicating query failure refers to a process in which the front-end display module presents the query results to the user through a web page or a graphical interface, including but not limited to displaying detailed information of the dependent products in the form of tables, graphs or reports, and when the query results are empty, informing the user through an interface prompt message that no relevant dependent product data is found.
[0089] It should be noted that the implementation method of the front-end display module may vary according to specific needs. For example, a more concise and intuitive display method may be designed on mobile devices, while richer data display and analysis functions may be provided in desktop applications. In addition, the specific design of the prompt message, such as color, font, position, etc., may also be adjusted according to the principles of user experience design to improve the efficiency of information transmission. This application does not limit the specific implementation details of the display method and prompt message, as long as the query results or status can be clearly and accurately fed back to the user.
[0090] Through the embodiments of the present application, the target database is used as a centralized storage and query platform for dependent artifact data, combined with the feedback mechanism of the front-end display module, to achieve the technical effect of efficient query and user-friendly display of dependent artifact information, thereby achieving the purpose of improving the transparency and response speed of dependency management. It not only provides instant dependent artifact status query capabilities, but also helps users understand query results through a clear feedback mechanism, thereby improving the overall efficiency of dependency management and user experience.
[0091] As an optional solution, the above method also includes: in response to the target interaction operation, determining the target dependent product version from the above second product version information; obtaining multiple product dependency data associated with the above target dependent product version from the above target database, wherein the above multiple product dependency data include the above target dependency data.
[0092] In an exemplary embodiment, taking the artifact dependency management application scenario of a software R&D center as an example, assuming that the developer selects a specific second-dependent artifact coordinate when performing a targeted dependency query, the system automatically determines the target dependency artifact version from the second artifact version information in response to this target interaction operation, including a version number parsing, comparison, and selection mechanism to ensure that the selected version number is the latest or meets specific filtering criteria.
[0093] Then, based on the determined target dependency artifact version, all artifact dependency data associated with it is obtained from the target database. This data not only includes information about the target application's direct dependency on the artifact, but also covers indirect dependencies and even cross-project artifact dependencies.
[0094] Through the embodiments of the present application, a mechanism is adopted in which a target database is used to store and associate multiple artifact dependency data, and a strategy is used to dynamically determine the target dependency artifact version when responding to target interaction operations. This achieves the technical effect of in-depth mining and display of the usage of targeted dependency artifacts, thereby achieving the purpose of improving the transparency of software project dependencies and decision-making support capabilities.
[0095] In an exemplary embodiment, in the current software development and post-maintenance process, dependency management is a key link to ensure the smooth construction, operation and vulnerability troubleshooting of the project. However, the existing dependency management tools and methods have the following technical problems: Manually recording dependencies is inaccurate. In the traditional way, developers need to manually maintain a dependency list to track the external libraries and their versions used in the project. This method is not only time-consuming, but also prone to errors, and it is difficult to ensure the integrity and accuracy of the dependency list; lack of real-time performance. In most cases, dependency management is checked before the project is built or deployed, which means that if the dependency changes, it may not be discovered and updated immediately, which may cause the build to fail or introduce security risks; lack of automated integration. Although there are some tools that can generate dependency reports for projects, these tools usually need to be executed separately and are not automatically integrated into the continuous integration / continuous deployment process, so they cannot reflect the latest dependencies of the project in real time; lack of data visualization capabilities. The visualization and data analysis functions provided by the existing dependency management solutions are lacking, and cannot effectively support the centralized display of dependencies.
[0096] Therefore, in order to solve the above technical problems, the embodiment of the present application implements a real-time dependency collection solution based on a Maven plug-in to solve the defects in the prior art, which may include but is not limited to:
[0097] S1, realize automatic dependency list collection: by introducing a custom plug-in in the pom file, the full list of project dependencies can be automatically obtained when the software code project is built.
[0098] S2, enhance real-time and accuracy: By integrating dependency management into the integration / deployment process, we ensure that the most accurate dependency list can be obtained in real time during each build, reducing manual intervention and improving efficiency.
[0099] S3, establish a unified dependency management platform: Create a centralized collection platform to register the full information of all projects and their dependent artifacts, including version control, so as to provide a unified view to manage and monitor the dependencies of the entire organization.
[0100] S4, improve the visualization capabilities of dependency management: provide a management visualization interface to help developers and managers quickly understand the project dependencies and discover potential problems such as security vulnerabilities and version conflicts.
[0101] First, some terms in the art involved in the embodiments of the present application are explained:
[0102] groupId, artifactId: collectively referred to as project "coordinates".
[0103] groupId (organization logo): used to uniquely identify the organization or team to which the project belongs, ensuring the global uniqueness of the project.
[0104] artifactId (project identifier): used to uniquely identify the project itself, usually the project name.
[0105] version: Used to identify the version of the project so that proper version control can be performed during build and dependency management.
[0106] Artifact dependency: the artifact dependency library built within the department (the above-mentioned target database).
[0107] Directed dependency: query the dependencies in the collection list based on groupId, artifactId coordinates, and version number.
[0108] It should be noted that a custom plug-in is integrated into the Maven build lifecycle. The plug-in is responsible for capturing all parsed and used dependencies during the build process and sending this information to a designated data collection platform. The data collection platform is responsible for receiving this information, processing and collating it, and finally storing it in a centralized database for subsequent query and analysis. Its implementation steps include but are not limited to:
[0109] S1, Custom Maven plugin development: First, you need to develop a custom Maven plugin that can monitor specific events in the Maven build process, such as dependency resolution and execution phases. The custom plugin uses Maven's API to access and collect all dependency information used in the project build process.
[0110] S2, dependency information capture and sending: When Maven starts to build a project, the custom plug-in intercepts and records each resolved dependency information, including coordinate information, version number and other properties. Then, the plug-in sends this information to the data collection platform through HTTP POST request or other communication protocols.
[0111] S3, data collection platform construction: The data collection platform is usually composed of a series of microservices, including but not limited to message queues, data processing services, and database services. After receiving the dependency information from the custom plug-in, the platform will first undergo a series of preprocessing operations, such as format conversion and verification, and then store the data in the database.
[0112] S4, data visualization display: Provides a user-friendly website page that displays dependencies in detail, making it easier to understand the project dependency structure.
[0113] Specifically, Maven plugin development is used to collect all the dependent artifacts of the project; data collection and processing are used to process dependency information to ensure efficient data transmission and reliability; data persistence is used to select appropriate relational or non-relational databases to store dependency information; data visualization is used to design website interfaces to display dependency information.
[0114] The embodiment of the present application solves the problem of how to collect and record the full list of dependent artifacts of a project in real time and accurately during the software development process, especially when using Maven as a construction tool. By designing a real-time dependency collection mechanism based on the Maven plug-in, the dependencies of the current project can be automatically obtained during project construction, and this information can be pushed to a dedicated collection platform for unified management, and finally displayed in the form of a web page for project team members to view and analyze.
[0115] In an exemplary embodiment, the dependency collection system designed by the embodiment of the present application has core components including but not limited to:
[0116] S1, Maven plug-in: implemented in the software compilation and construction phase, used to capture the structured and unstructured dependency information of the project in real time during the Maven construction process; collection platform: receives data push from the Maven plug-in, responsible for processing, storing and displaying this dependency information; data interface: used to connect the data interaction between the Maven plug-in and the collection platform; visual query interface: used to query and display directional dependencies and product dependencies.
[0117] Figure 3 is a schematic diagram of an optional data processing method according to an embodiment of the present application, which relies on the overall architecture of the acquisition system as shown in FIG. Figure 3 As shown, the Maven plug-in communicates with the collection platform through the data interface and pushes the real-time captured dependency information to the collection platform. The collection platform uses the database to store this information and displays the dependency information to users through Web services.
[0118] S2 is implemented as a Maven plug-in. Its functional modules include dependency parser: responsible for parsing POM files and extracting direct and indirect dependency information of the project; real-time monitor: listening to and capturing dependency changes in different stages of Maven construction (such as validate, compile, test, etc.); data encapsulation module: converting the captured dependency information into a standard format for easy transmission to the collection platform; network sender: using the HTTP protocol to push dependency information to the collection platform through the data interface.
[0119] Figure 4 is a module diagram of an optional data processing method according to an embodiment of the present application, such as Figure 4 As shown in the figure, it includes the main functional modules of the Maven plug-in and their interrelationships. The "Dependency Parser" parses the dependency information from the POM file, the "Real-time Monitor" tracks the changes during the Maven build process, the "Data Encapsulation Module" organizes the dependency information into a standard format, and the "Network Sender" is responsible for pushing this information to the collection platform. The process is as follows:
[0120] First, add the standard remote private server configuration to the Maven global configuration file setting.xml of the packager.
[0121] Next, add a dependency collection plug-in under the build-plugins node in the pom.xml file of the code project, and allocate different TOKENs on and off the cloud and other different platforms to collect and verify dependencies on different platforms.
[0122] Furthermore, the Jenkins packaging command pushes the pom file and host information to the dependency collection application platform through a POST request.
[0123] Finally, the collection platform stores the dependency information in the database in the form of structured and unstructured data (unstructured data is unprocessed dependency data, and structured data is processed data in the artif table and depd_rel table).
[0124] For example, the code engineering configuration includes: the deployment of the provident fund application project includes two platforms, one on the cloud and one off the cloud. The two platforms are deployed on different hosts and belong to two different isolated areas, the standard area and the self-use area. The project manager obtains the TOKEN of different platforms through the dependency collection plug-in project team to verify the deployment host information of different platforms. If the TOKEN on the cloud is jenkins and the TOKEN off the cloud is jenkins_down, the TOKEN field is integrated and added to the dependency collection plug-in configuration, and the plug-in is added under the build-plugins node in the pom.xml file of the code engineering production branch.
[0125] Furthermore, after executing the production pipeline or manually executing the production branch, if the execution log simultaneously displays: "Unstructured data registration successful" and "Structured data registration successful", it means that the dependency collection is successful.
[0126] S3 is implemented as a collection platform. Its core functions include receiving port: processing data requests from Maven plugins to ensure data security and efficient transmission; data processing engine: parsing received dependency information, performing verification, conversion, deduplication and other operations to ensure data accuracy; database management: storing processed dependency information in the database to support fast query and update; front-end display module: organizing dependency information in the database into highly readable tables for user access through Web services. Data is first received by the "receiving port", cleaned and sorted by the "data processing engine", and then stored in the database by the "database management" component. Finally, the "front-end display module" extracts data from the database, generates a visual report, and presents it to users through Web services.
[0127] S4, Visual query interface, Maven build trigger: Developers start Maven build command, start software compilation, testing and other workflows; Dependency parsing and real-time monitoring: The "Dependency Parser" in the Maven plugin starts working, parsing the dependency information in the POM file. The "Real-time Monitor" synchronously monitors the status of the Maven build and captures any dependency changes. Data packaging and push: The captured dependency information is sorted by the "Data Packaging Module" and pushed to the collection platform by the "Network Sender" using the data interface; Data processing and storage: After the collection platform receives the dependency information, it forwards it to the "Data Processing Engine" through the "Receiving Port", and after a series of processing (such as verification, conversion, and deduplication), it is stored in the database.
[0128] S5, display and access: The processed dependency information is generated into a visual table by the "front-end display module" and provided to developers through Web services. Figure 5 is a data interaction diagram of an optional data processing method according to an embodiment of the present application, such as Figure 5 As shown, it includes the data interaction process between the front-end and back-end of the collection platform, and clearly shows the process of the collection platform from front-end query to display.
[0129] It should be noted that the database tables involved in the embodiments of the present application include: artifact table: storing a single piece of data information; depd_rel table: storing dependencies; rgst_plain_detail: storing full historical data; rgst_auth: storing verification information, Jenkins on-cloud / off-cloud IP and host name, fields token, IP, hostname.
[0130] For example, click "Artifact Dependency Query" in the main menu of the front-end display interface, enter the coordinate information of the artifact package (GroupID, AritifactID and Version), and click "Submit" to display all dependency information; the background logic is that the front-end initiates a request to the back-end collection platform, obtains the baseId through the GroupID, obtains the depdId list from the depd_rel table, and obtains the introduced dependent package from the artifact table.
[0131] For example, if you need to query third-party dependencies with security issues, click "Directed Dependency Query" in the main menu, enter the binary coordinates of the third-party dependency (GroupID, AritifactID), and click "Submit" to display all version numbers of the dependency collected by the collection platform database. Select the version number you want to query and click "Query" to display all artifacts that depend on the problematic package. The backend logic is that the frontend selects the version to be queried and initiates a request to the backend collection platform. The backend obtains the depdId through the GroupID, obtains the baseId list from the depd_rel table, and obtains the package that introduces the problematic artifact from the artifact table.
[0132] It should also be noted that in order to collect and record the full list of dependent artifacts of the project in real time and accurately during the software development process, in addition to the above-mentioned Maven plug-in-based solution, you can also explore the following alternative solutions or adjustment strategies, including but not limited to:
[0133] S1. If the software project is not based on Maven but uses Gradle as the build tool, then a similar Gradle plug-in can be designed to replace the Maven plug-in. This plug-in can also capture dependency information in real time during the project build, and then push the data to the collection platform through the HTTP interface or API.
[0134] S2, integrated CI / CD pipeline. If all software projects use continuous integration / continuous deployment (CI / CD) pipelines, you can modify or extend existing CI / CD tools (such as Jenkins, GitLab CI / CD, etc.) and add custom scripts or plug-ins to the build script to capture dependency information and pass this information directly to the collection platform in the build step.
[0135] S3, using Docker image analysis tools, for applications running in containerized mode, you can use Dockerfile and Docker image analysis tools to capture dependency information. For example, by analyzing the Docker image, you can get all the software packages and version numbers that the project depends on, and then send this information to the data collection platform through automated scripts.
[0136] S4, the log analysis solution, does not directly add additional plug-ins or scripts during the build process, but extracts dependency information by analyzing the build log, so it requires customized log parsing logic and powerful log processing and analysis capabilities. The information about dependency downloads contained in the log can be extracted through specific parsing rules and then sent to the data collection platform.
[0137] It is understandable that the specific solution to be chosen depends on the specific project environment, requirements, and resource availability. For example, if the project already uses a mature CI / CD pipeline, then integrating the CI / CD pipeline may be the most natural choice. If the project is highly dependent on Docker containers, using Docker image analysis tools may be more appropriate, and this application does not limit this.
[0138] In summary, the embodiment of the present application provides an efficient and real-time dependency collection solution. Through the close cooperation between the Maven plug-in and the collection platform, the comprehensive management and visual display of the dependency relationship in the software project are realized, which greatly improves the transparency and efficiency of project management. Specifically, the Maven plug-in can instantly obtain the full list of dependent artifacts when the software code project is built to ensure the accuracy and timeliness of the dependency information; create a centralized collection platform to automatically record and manage the dependency relationship between the project and the artifact, improve information integration and management efficiency; collect and count dependency information through automated processes, reduce manual participation, reduce error rates, and improve efficiency; provide user-friendly website pages, display dependency relationships in detail, facilitate understanding of the project dependency structure, and facilitate management and decision-making. Through a more efficient and automated dependency management solution, the technical problems existing in the prior art are solved, the efficiency and quality of software development are improved, maintenance costs are reduced, and project security is guaranteed.
[0139] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0140] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0141] According to another aspect of the embodiment of the present application, a data processing device for implementing the above data processing method is also provided. Figure 6 As shown, the device comprises:
[0142] A determination module 602 is used to create a dependency collection plug-in under a build node in a project object model file of a target application, and to parse the project object model file through the dependency collection plug-in to determine initial dependency data of the target application, wherein the target application is set to be deployed on at least two platforms with different platform identifiers;
[0143] A monitoring module 604 is used to monitor different stages of the target application's construction process and determine the target application's change dependency data;
[0144] A transmission module 606, configured to process the initial dependency data and the changed dependency data into target dependency data, and upload the target dependency data to a target database;
[0145] The processing module 608 is used to query and display the target dependency data from the target database in response to the target query message.
[0146] As an optional solution, the above-mentioned device is also used to: add a standard remote private server configuration in the global configuration file of the target application to control the target application to obtain the various dependent artifacts required by the target application; add a dependency collection plug-in in the project object model file, wherein the dependency collection plug-in is used to obtain initial dependency data and change dependency data.
[0147] As an optional solution, the above device is also used to: define a target data interface for connecting the dependency acquisition plug-in and the data acquisition platform; and use the target data interface to obtain the initial dependency data and changed dependency data collected by the dependency acquisition plug-in.
[0148] As an optional solution, the above-mentioned device is also used to: build a target application in response to a target build command; use a dependency parser in a dependency collection plug-in to parse dependency artifact data in a project object model file to obtain initial dependency data; use a real-time monitor in a dependency collection plug-in to detect the build status of the target application; and obtain changed dependency data when the build status of the target application changes.
[0149] As an optional solution, the above-mentioned device is also used to: store the target dependency data in the target database according to the coordinate information and version information of each dependent artifact of the target application; when the query type is a product dependency query type, query the target database according to the coordinate information and version information of the first dependent artifact to obtain the first product dependency data corresponding to the first dependent artifact; when the query type is a directed dependency query type, query the target database according to the coordinate information of the second dependent artifact to obtain the second product version information corresponding to the second dependent artifact.
[0150] As an optional solution, the above-mentioned device is used to store the target dependency data in the target database according to the coordinate information and version information of each dependent artifact of the target application in the following manner: parse the target dependency data to obtain the dependency group number, dependency item number and dependency artifact version of each dependent artifact, wherein the dependency group number is used to indicate the level to which the dependent artifact belongs in the target application, and the dependency item number is used to indicate the dependent artifact itself; determine the coordinate information of each dependent artifact according to the dependency group number and the dependency item number, and determine the version information of each dependent artifact according to the dependency artifact version; store the target dependency data in the target database according to the coordinate information and version information of each dependent artifact.
[0151] As an optional solution, the above-mentioned device is also used to: display the first product dependency data when the first product dependency data is queried in the target database; and display a prompt message indicating query failure when the first product dependency data is not queried in the target database.
[0152] As an optional solution, the above-mentioned device is also used to: determine the target dependent product version from the second product version information in response to the target interaction operation; obtain multiple product dependency data associated with the target dependent product version from the target database, wherein the multiple product dependency data include the target dependency data.
[0153] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0154] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0155] According to one aspect of the present application, a computer program product is provided. The computer program product includes a computer program.
[0156] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0157] Figure 7 The structure block diagram of a computer system for implementing an electronic device according to an embodiment of the present application is schematically shown.
[0158] It should be noted that Figure 7 The computer system 700 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0159] like Figure 7 As shown, the computer system 700 includes a central processing unit 701 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 702 (ROM) or the program loaded from the storage part 708 to the random access memory 703 (RAM). Various programs and data required for system operation are also stored in the random access memory 703. The central processing unit 701, the read-only memory 702 and the random access memory 703 are connected to each other through a bus 704. An input / output interface 705 (Input / Output interface, i.e., I / O interface) is also connected to the bus 704.
[0160] The following components are connected to the input / output interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.
[0161] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processor 701, various functions defined in the system of the present application are executed.
[0162] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processor 701, various functions provided by the embodiment of the present application are performed.
[0163] According to another aspect of the embodiment of the present application, an electronic device for implementing the above data processing method is also provided. The electronic device may be Figure 1 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments through the computer program.
[0164] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0165] Optionally, in this embodiment, the above-mentioned processor can be configured to execute the methods in each embodiment of the present application through a computer program.
[0166] Alternatively, a person skilled in the art may understand that: Figure 8 The structure shown is for illustration only. Figure 8 The structure of the electronic device is not limited. Figure 8 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 8 Different configurations shown.
[0167] Among them, the memory 802 can be used to store software programs and modules, such as program instructions / modules corresponding to the data processing method and device in the embodiments of the present application. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, that is, realizing the above-mentioned data processing method. The memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include a memory remotely located relative to the processor 804, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 802 can be specifically, but not limited to, used to store information such as target dependent data. As an example, such as Figure 8 As shown, the memory 802 may include but is not limited to the determination module 602, the monitoring module 604, the transmission module 606 and the processing module 608 in the data processing device. In addition, other module units in the data processing device may also be included but are not limited to, which will not be repeated in this example.
[0168] Optionally, the transmission device 806 is used to receive or send data via a network. Specific examples of the network may include wired networks and wireless networks. In one example, the transmission device 806 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 806 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0169] In addition, the electronic device further comprises: a display 808 for displaying the target dependency data; and a connection bus 810 for connecting various module components in the electronic device.
[0170] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. The nodes may form a peer-to-peer network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0171] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the data processing method provided in various optional implementations of the above-mentioned data processing aspects.
[0172] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be configured to store data for executing the methods in various embodiments of the present application.
[0173] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0174] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0175] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for one or more electronic devices to execute all or part of the steps of the methods described in each embodiment of the present application.
[0176] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0177] In the several embodiments provided in the present application, it should be understood that the disclosed application can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0178] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0179] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0180] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.< / build> < / build>
Claims
1. A data processing method, characterized in that: include: Creating a dependency collection plug-in under a build node in a project object model file of a target application, parsing the project object model file through the dependency collection plug-in to determine initial dependency data of the target application, wherein the target application is configured to be deployed on at least two platforms with different platform identifiers; Monitoring different stages of the construction process of the target application to determine the change dependency data of the target application; Processing the initial dependency data and the changed dependency data into target dependency data, and uploading the target dependency data to a target database; In response to the target query message, the target dependent data is queried from the target database and displayed.
2. The method according to claim 1, characterized in that: The method further comprises: Adding a standard remote private server configuration to the global configuration file of the target application to control the target application to obtain various dependent artifacts required by the target application; A dependency acquisition plug-in is added to the project object model file, wherein the dependency acquisition plug-in is used to obtain the initial dependency data and the changed dependency data.
3. The method according to claim 2, characterized in that The method further comprises: Define a target data interface for connecting the dependency acquisition plug-in and the data acquisition platform; The target data interface is used to obtain the initial dependency data and the changed dependency data collected by the dependency collection plug-in.
4. The method according to claim 2, characterized in that: The method further comprises: In response to the target building command, building the target application; Utilizing the dependency parser in the dependency collection plug-in to parse the dependency artifact data in the project object model file to obtain the initial dependency data; Using the real-time monitor in the dependency collection plug-in to detect the build status of the target application; When the build status of the target application changes, the change dependency data is obtained.
5. The method according to claim 1, characterized in that The method further comprises: Storing the target dependency data into a target database according to the coordinate information and version information of each dependent artifact of the target application; In the case where the query type is a product dependency query type, querying the target database according to the coordinate information and version information of the first dependent product to obtain first product dependency data corresponding to the first dependent product; In case the query type is a directed dependency query type, the target database is queried according to the coordinate information of the second dependent artifact to obtain the second artifact version information corresponding to the second dependent artifact.
6. The method according to claim 5, characterized in that The storing the target dependency data into the target database according to the coordinate information and version information of each dependent artifact of the target application includes: Parsing the target dependency data to obtain a dependency group number, a dependency item number, and a dependency item version of each dependency artifact, wherein the dependency group number is used to indicate the level to which the dependency artifact belongs in the target application, and the dependency number is used to indicate the dependency artifact itself; Determine the coordinate information of each dependent artifact according to the dependency group number and the dependency item number, and determine the version information of each dependent artifact according to the dependent artifact version; The target dependency data is stored in a target database according to the coordinate information and version information of each dependent artifact.
7. The method according to claim 5, characterized in that The method further comprises: In a case where the first product dependency data is found in the target database, displaying the first product dependency data; When the first product dependency data is not found in the target database, a prompt message indicating that the query failed is displayed.
8. The method according to claim 5, characterized in that The method further comprises: In response to the target interaction operation, determining a target dependent artifact version from the second artifact version information; A plurality of artifact dependency data associated with the target-dependent artifact version is obtained from the target database, wherein the plurality of artifact dependency data includes the target dependency data.
9. A data processing device, characterized in that: include: A determination module, configured to create a dependency acquisition plug-in under a build node in a project object model file of a target application, and to parse the project object model file through the dependency acquisition plug-in to determine initial dependency data of the target application, wherein the target application is configured to be deployed on at least two platforms having different platform identifiers; A monitoring module, used to monitor different stages of the construction process of the target application and determine the change dependency data of the target application; A transmission module, used for processing the initial dependency data and the changed dependency data into target dependency data, and uploading the target dependency data to a target database; The processing module is used to query and display the target dependency data from the target database in response to the target query message.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 8.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.
Citation Information
Cited By
Intelligent notification method and system based on Maven dependency change
CN120085908A
Intelligent notification method and system based on Maven dependency changes
CN120085908B
Project information collection method and system based on plug-in technology
CN120631870A
Project information collection method and system based on plug-in technology
CN120631870B