Component analysis method and device, server and storage medium

By determining the change information of the configuration file in the Devops pipeline, obtaining the file type and generating a target data model for analysis, the problem of insufficient accuracy and convenience in obtaining component information is solved, and fast and accurate acquisition of component information is achieved, which is suitable for Multiple build modes reduce pipeline load.

CN118778967APending Publication Date: 2024-10-15PICC INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410833832.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

The existing Devops pipeline has insufficient accuracy and convenience when obtaining component information. Especially when the configuration file is updated, the component information cannot be parsed in time. The scope of application is limited due to file type restrictions, and it requires plug-in analysis, which increases the pipeline load. .

Method used

By determining whether there is any change information in the built configuration file, obtain its file type, and use the corresponding template to generate the target data model, use the parser to parse the data model to obtain the component information collection, reduce file type restrictions, apply to different build modes, and avoid Improve the accuracy and convenience of component information acquisition through plug-in analysis.

Benefits of technology

It effectively reduces the failure to parse component information in time when updating configuration files, improves the accuracy and convenience of obtaining component information, is suitable for multiple build modes, reduces pipeline load, and expands the scope of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118778967A_ABST
    Figure CN118778967A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of technical architecture treatment, in particular to a component analysis method and device, a server and a storage medium. The component analysis method comprises the following steps: under the condition that a constructed configuration file is determined to be a file with change information, obtaining a file type corresponding to the configuration file; generating a target data model by adopting the configuration file and a template corresponding to the file type; and analyzing data in the target data model by adopting an analyzer corresponding to the target data model to obtain a target component information set. According to the invention, the accuracy and convenience of component information acquisition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of technical architecture governance, and in particular to a component parsing method, device, server and storage medium. Background Art

[0002] With the development of science and technology, the emergence of R&D products can continuously improve R&D capabilities. Among them, the R&D platform Devops can be a R&D platform based on continuous integration and continuous deployment. In the integrated development and operation, the build pipeline provided by Devops is based on process control. How to improve the convenience of obtaining component information of the Devops pipeline has become the focus of attention. Summary of the invention

[0003] The present disclosure provides a component parsing method, device, server and storage medium to improve the accuracy and convenience of component information acquisition. The technical solution of the present disclosure is as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, a component parsing method is provided, including:

[0005] When it is determined that the constructed configuration file is a file with change information, obtaining a file type corresponding to the configuration file;

[0006] Generate a target data model using the configuration file and a template corresponding to the file type;

[0007] The parser corresponding to the target data model is used to parse the data in the target data model to obtain a target component information set.

[0008] According to some embodiments, the method further comprises:

[0009] In the DevOps pipeline, a configuration file set is constructed by using a construction component, wherein the configuration file set includes component information;

[0010] The set of configuration files is stored in a target storage location using a pre-configured plug-in.

[0011] According to some embodiments, the method further comprises:

[0012] Obtaining first identification information corresponding to the configuration file;

[0013] Acquire a historical configuration file set corresponding to the configuration file, and acquire second identification information of each historical configuration file in the historical configuration file set;

[0014] When the first identification information and at least one second identification information are inconsistent, it is determined that the constructed configuration file is a file with change information.

[0015] According to some embodiments, the building components include at least one of the following: Maven, Ant, Npm, Gradle.

[0016] According to some embodiments, the step of using the configuration file and a template corresponding to the file type to generate a target data model includes:

[0017] In the template collection, obtain a target template corresponding to the file type;

[0018] Perform field comparison processing and type comparison processing on the configuration file and the target template to obtain the target data model.

[0019] According to some embodiments, performing field comparison processing and type comparison processing on the configuration file and the target template to obtain the target data model includes:

[0020] In the case where the building component is Maven, field comparison processing and type comparison processing are performed on the configuration file and the POM template to obtain the target data model, wherein the POM template is a template corresponding to the Maven.

[0021] According to some embodiments, the adopting a parser corresponding to the target data model to parse the data in the target data model to obtain a target component information set includes:

[0022] Acquire data information corresponding to each data in the target data model, wherein the data information includes at least one of a data label, a parameter, a value, and a reference information;

[0023] According to the data information, the data in the target data model is parsed using a parser corresponding to the target data model to obtain a target component information set.

[0024] According to a second aspect of an embodiment of the present disclosure, a component parsing device is provided, including:

[0025] A type acquisition unit, configured to acquire a file type corresponding to the configuration file when it is determined that the constructed configuration file is a file with change information;

[0026] A model generation unit, configured to generate a target data model using the configuration file and a template corresponding to the file type;

[0027] The set acquisition unit is used for the parser corresponding to the target data model to parse the data in the target data model to obtain a target component information set.

[0028] According to a third aspect of an embodiment of the present disclosure, a server is provided, including:

[0029] processor;

[0030] a memory for storing instructions executable by the processor;

[0031] The processor is configured to execute the instructions to implement the component parsing method described in any one of the aforementioned aspects.

[0032] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of a server, the server can execute the component parsing method described in any one of the preceding aspects.

[0033] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements any one of the methods described in the preceding aspects when executed by a processor.

[0034] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0035] In some or related embodiments, when it is determined that the constructed configuration file is a file with change information, the file type corresponding to the configuration file is obtained; the configuration file and the template corresponding to the file type are used to generate a target data model; the parser corresponding to the target data model is used to parse the data in the target data model to obtain a target component information set. Therefore, by detecting the configuration file, it is possible to reduce the situation where the component information cannot be parsed in time when the configuration file is updated, and the parsing time of the component information is reduced. By parsing with the template corresponding to the file type, the restrictions on the file type can be reduced, and it is suitable for different construction modes, thereby increasing the scope of application of the present solution, and there is no need to parse the component information through a plug-in, thereby reducing the load of the pipeline and improving the accuracy and convenience of obtaining component information.

[0036] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0038] Figure 1 is a flowchart of a component parsing method according to an exemplary embodiment;

[0039] Figure 2is a flowchart of a component parsing method according to an exemplary embodiment;

[0040] Figure 3 is an exemplary schematic diagram showing a component parsing method according to an exemplary embodiment;

[0041] Figure 4 is an exemplary schematic diagram of a component parsing system according to an exemplary embodiment;

[0042] Figure 5 is a block diagram of a component parsing device according to an exemplary embodiment;

[0043] Figure 6 It is a block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION

[0044] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0045] The embodiments of the present disclosure propose a component parsing method, device, server, and storage medium. In some embodiments, the component parsing method, information processing method, communication method, and other terms can be interchangeable, the component parsing device, information processing device, communication device, and other terms can be interchangeable, and the information processing system, communication system, and other terms can be interchangeable.

[0046] The embodiments of the present disclosure are not exhaustive, but are only illustrative of some embodiments, and are not intended to be a specific limitation on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment can be implemented as an independent embodiment, and the steps can be arbitrarily combined. For example, a solution after removing some steps in a certain embodiment can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment can be arbitrarily exchanged. In addition, the optional implementation methods in a certain embodiment can be arbitrarily combined; in addition, the embodiments can be arbitrarily combined, for example, some or all of the steps of different embodiments can be arbitrarily combined, and a certain embodiment can be arbitrarily combined with the optional implementation methods of other embodiments.

[0047] In each embodiment of the present disclosure, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form a new embodiment based on their internal logical relationships.

[0048] The terms used in the embodiments of the present disclosure are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0049] In the embodiments of the present disclosure, unless otherwise specified, elements expressed in the singular form, such as "a", "an", "the", "above", "said", "aforementioned", "this", etc., may mean "one and only one", or "one or more", "at least one", etc. For example, when using articles such as "a", "an", "the" in English in translation, the noun after the article may be understood as a singular expression or a plural expression.

[0050] In the embodiments of the present disclosure, “plurality” refers to two or more.

[0051] In some embodiments, the terms “at least one,” “one or more,” “a plurality of,” “multiple,” etc. may be used interchangeably.

[0052] In some embodiments, "at least one of A and B", "A and / or B", "A in one case, B in another case", "in response to one case A, in response to another case B", etc., may include the following technical solutions according to the situation: in some embodiments, A (A is executed independently of B); in some embodiments, B (B is executed independently of A); in some embodiments, execution is selected from A and B (A and B are selectively executed); in some embodiments, A and B (both A and B are executed). When there are more branches such as A, B, C, etc., the above is also similar.

[0053] In some embodiments, devices and equipment may be interpreted as physical or virtual, and their names are not limited to the names recorded in the embodiments. In some cases, they may also be understood as "equipment", "device", "circuit", "network element", "node", "function", "unit", "section", "system", "network", "chip", "chip system", "entity", "subject", etc.

[0054] In some embodiments, "terminal" or "terminal device" can be referred to as "user equipment (UE)", "user terminal" "mobile station (MS)", "mobile terminal (MT)", subscriber station, mobile unit, subscriber unit, wireless unit, remote unit, mobile device, wireless device, wireless communication device, remote device, mobile subscriber station, access terminal, mobile terminal, wireless terminal, remote terminal, handset, user agent, mobile client, client, etc.

[0055] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0057] Figure 1 is a flowchart of a component parsing method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:

[0058] In step S11, when it is determined that the constructed configuration file is a file with change information, the file type corresponding to the configuration file is obtained;

[0059] In some embodiments, the execution subject of the embodiments of the present disclosure may be, for example, a server. The server name is not limited. For example, the server may be a server cluster or a network device.

[0060] According to some embodiments, the configuration file may be, for example, a computer file, such as configuration parameters and initial settings for some computer programs. The configuration file does not specifically refer to a fixed file. For example, when the building component corresponding to the configuration file changes, the configuration file may also change accordingly. For example, when the file information corresponding to the configuration file changes, the configuration file may also change accordingly.

[0061] In some embodiments, the change information may be, for example, a situation where the contents of the files of the constructed configuration file and the historical configuration file are different. The change information does not specifically refer to a fixed information. For example, when the comparison information changes, the change information may also change accordingly. For example, when a certain information corresponding to the change information changes, the change information may also change accordingly.

[0062] In some embodiments, the file type can be used to indicate the type corresponding to the configuration file. The file type includes but is not limited to POM file type, Gadle file type, Npm file type, etc. The file type does not specifically refer to a fixed file type. For example, when the build component changes, the file type corresponding to the build file can also change accordingly.

[0063] According to some embodiments, in some embodiments, for example, when it is determined that the constructed configuration file is a file with change information, the file type corresponding to the configuration file may be obtained.

[0064] In step S12, the target data model is generated using the configuration file and a template corresponding to the file type;

[0065] According to some embodiments, the template may be used to generate a template of a data model corresponding to a configuration file, for example. Different file types may correspond to different templates, for example. The template may be pre-set, for example. The template does not specifically refer to a fixed template. For example, when a modification instruction for the template is received, the template may also change accordingly. For example, when a parameter corresponding to the template changes, the template may also change accordingly.

[0066] In some embodiments, the target data model may be, for example, a data model generated corresponding to a configuration file. The target data model does not specifically refer to a fixed template. For example, when the configuration file or template changes, the target data model may also change accordingly.

[0067] Optionally, when the file type is acquired, the configuration file and a template corresponding to the file type may be used to generate a target data model.

[0068] In step S13, the data in the target data model is parsed using a parser corresponding to the target data model to obtain a target component information set.

[0069] According to some embodiments, a parser may refer to, for example, a parser that is generally used to parse text data into a data structure, such as parsing text in XML, JSON, CSV, etc. formats into an object, array, dictionary, or other form of data structure. The parser of the disclosed embodiment may be, for example, a parser corresponding to a target data model. Different parsers are used to parse data in different models. The parser does not specifically refer to a fixed parser. For example, when the target data model changes, the parser may also change accordingly.

[0070] In some embodiments, the target component information set may be, for example, a collection of at least one component information. The target component information set does not specifically refer to a fixed set. For example, when the parser or the target data model changes, the target component information set may also change accordingly.

[0071] In some embodiments, a parser corresponding to the target data model may be used to parse the data in the target data model to obtain a target component information set.

[0072] In some or related embodiments, when it is determined that the constructed configuration file is a file with change information, the file type corresponding to the configuration file is obtained; the configuration file and the template corresponding to the file type are used to generate a target data model; the parser corresponding to the target data model is used to parse the data in the target data model to obtain a target component information set. Therefore, by detecting the configuration file, the situation where the component information cannot be parsed in time when the configuration file is updated can be reduced. By parsing with the template corresponding to the file type, the restrictions on the file type can be reduced, and it is applicable to different construction modes, thereby improving the scope of application of the present solution. There is no need to parse the component information through a plug-in, thereby reducing the load of the pipeline and improving the accuracy and convenience of obtaining component information.

[0073] Figure 2is a flowchart of a component parsing method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:

[0074] In step S21, in the DevOps pipeline, a configuration file set is constructed using a construction component, wherein the configuration file set includes component information;

[0075] The specific process is as described above and will not be repeated here.

[0076] According to some embodiments, the Devops pipeline can be used to indicate an automated software development process, for example. The Devops pipeline can include, for example, building, testing, deploying, and monitoring code. For example, when the function corresponding to the Devops pipeline changes, the Devops pipeline can also change accordingly. The Devops pipeline can reduce the software development cycle and improve the availability and performance of components.

[0077] In some embodiments, a component is a mode of implementing development by abstracting various graphical and non-graphical logics into a unified concept (component). A construction component may be, for example, a component for building a configuration file. The construction component includes, but is not limited to, Maven, Ant, Npm, Gradle, etc. Among them, Npm (Node Package Manager) is a NodeJS package management and distribution tool. Gradle is an open source tool for automated project construction based on the concepts of Apache and Apache Maven. It uses a domain-specific language (DSL) based on Groovy to declare project settings, and also adds a kotlin-based DSL based on the Kotlin language, abandoning various cumbersome XML-based configurations.

[0078] Optionally, in an embodiment of the present disclosure, the component information may be, for example, information of a component. The component information may be, for example, at least one. The component information does not specifically refer to a fixed information. For example, when the quantity corresponding to the component information changes, the component information may also change accordingly. For example, when the specific information of the component information changes, the component information may also change accordingly.

[0079] In some embodiments, Figure 3 is a flowchart of a component parsing method according to an exemplary embodiment. Figure 3As shown, in the Devops pipeline, a build component is used to build the configuration file set, wherein the configuration file set includes component information. For example, a certain build component may be used to build the configuration file. Different build components may build different configuration files. When building the configuration file, for example, the code of the corresponding branch may be pulled from the code repository. When the build component is used to build the configuration file set, for example, the build process may be invoked in the pipeline for construction.

[0080] According to some embodiments, the building components include at least one of the following: Maven, Ant, Npm, Gradle.

[0081] In step S22, the configuration file set is stored in a target storage location using a pre-configured plug-in;

[0082] The specific process is as described above and will not be repeated here.

[0083] In some embodiments, the pre-configured plug-in may be, for example, a plug-in configured before building a set of configuration files. The pre-configured plug-in may be used to archive all configuration files of this time under a directory of the product library.

[0084] According to some embodiments, the configuration file set may be, for example, a collection of at least one configuration file. The configuration file set does not specifically refer to a fixed set. For example, when the number of files corresponding to the configuration file set changes, the configuration file set may also change accordingly. For example, when a configuration file in the configuration file set changes, the configuration file set may also change accordingly.

[0085] In some embodiments, the target storage location may be, for example, a storage location pre-configured for the configuration file set. The storage location may also be referred to as a target directory. The target storage location does not specifically refer to a fixed location. The target storage location may be determined, for example, based on the number of files corresponding to the configuration file set.

[0086] In some embodiments, for example, a pre-configured plug-in may be used to store the set of configuration files in a target storage location.

[0087] According to some embodiments, the method further comprises:

[0088] Obtaining first identification information corresponding to the configuration file;

[0089] Acquire a historical configuration file set corresponding to the configuration file, and acquire second identification information of each historical configuration file in the historical configuration file set;

[0090] When the first identification information and at least one second identification information are inconsistent, the constructed configuration file is determined to be a file with change information. Determining the change information through the identification information can improve the accuracy of determining the change information and the accuracy of parsing the component information set.

[0091] In some embodiments, the identification information of this embodiment includes, but is not limited to, message digest algorithm MD5, message digest algorithm MD3, message digest algorithm MD2, file name, etc. This disclosure embodiment does not limit this.

[0092] In some embodiments, the first identification information and the second identification information may be, for example, identification information of the same type. The first in the first identification information is used to distinguish from the remaining identification information and does not specifically refer to a fixed identification information. For example, when the generation method of the first identification information changes, the first identification information may also change accordingly. For example, when the configuration file changes, the first identification information may also change accordingly.

[0093] In some embodiments, the historical configuration file set may be, for example, a collection of at least one historical configuration file. The historical configuration file set does not specifically refer to a fixed set. For example, when the number of historical configuration files corresponding to the historical configuration file set changes, the historical configuration file set may also change accordingly. For example, when a historical configuration file in the historical configuration file set changes, the historical configuration file set may also change accordingly.

[0094] In some embodiments, for example, the second identification information of the historical configuration file in the historical configuration file set that is most recently constructed may also be obtained. If the first identification information and the second identification information are inconsistent, the constructed configuration file is determined to be a configuration file with change information.

[0095] In step S23, when it is determined that the constructed configuration file is a file with change information, the file type corresponding to the configuration file is obtained;

[0096] The specific process is as described above and will not be repeated here.

[0097] In some embodiments, the application programming interface (API) layer of the server can obtain the names of all changed configuration files in the artifact library archive directory by calling the interface exposed by Devops, and then pull these files and save them in local storage.

[0098] In step S24, the target data model is generated using the configuration file and a template corresponding to the file type;

[0099] The specific process is as described above and will not be repeated here.

[0100] According to some embodiments, the step of using the configuration file and a template corresponding to the file type to generate a target data model includes:

[0101] In the template collection, obtain a target template corresponding to the file type;

[0102] The configuration file and the target template are subjected to field comparison and type comparison to obtain the target data model, thereby improving the matching of the target template and the text type and improving the accuracy of the target data model.

[0103] In some embodiments, the template set may be, for example, a collection of at least one template. The template set does not specifically refer to a fixed set. Different file types may correspond to different templates.

[0104] In some embodiments, the target template may be, for example, a template corresponding to a file type.

[0105] According to some embodiments, performing field comparison processing and type comparison processing on the configuration file and the target template to obtain the target data model includes:

[0106] In the case where the building component is Maven, field comparison processing and type comparison processing are performed on the configuration file and the POM template to obtain the target data model, wherein the POM template is a template corresponding to the Maven.

[0107] In step S25, the data in the target data model is parsed using a parser corresponding to the target data model to obtain a target component information set.

[0108] The specific process is as described above and will not be repeated here.

[0109] According to some embodiments, the adopting a parser corresponding to the target data model to parse the data in the target data model to obtain a target component information set includes:

[0110] Acquire data information corresponding to each data in the target data model, wherein the data information includes at least one of a data label, a parameter, a value, and a reference information;

[0111] According to the data information, the data in the target data model is parsed using a parser corresponding to the target data model to obtain a target component information set.

[0112] Different data models may correspond to different parsers, for example, one data model may correspond to one parser.

[0113] In some embodiments, when the target component information set is obtained, the target component information set may be stored and provided to a downstream system.

[0114] In some embodiments, Figure 4 is a flowchart of a component parsing system according to an exemplary embodiment. Figure 4 As shown, the system includes a data source layer and a parsing engine. The data source layer may include, for example, a DevOps pipeline and a code repository. The parsing engine may include, for example, an API layer, a permission module, a parser set, a template repository, and a data storage layer, wherein the introduction of each part is as described above and will not be repeated here. Among them, the template repository may also be referred to as a template set, for example.

[0115] In one or related embodiments, in the Devops pipeline, a build component is used to build a configuration file set, wherein the configuration file set includes component information; a pre-configured plug-in is used to store the configuration file set in a target storage location. Therefore, this solution can be applicable to a variety of build tools and different build modes. There is no need to scan all the code, and it can be refined to specific dependency packages, thereby reducing the interaction steps with the code repository, improving the scope of application of the solution, and eliminating the need to parse the component information through the plug-in, thereby reducing the load on the pipeline and improving the accuracy and convenience of obtaining component information.

[0116] Figure 5 is a block diagram of a component parsing device according to an exemplary embodiment. Figure 5 , the component parsing device 500 comprises:

[0117] The type acquisition unit 501 is used to acquire the file type corresponding to the configuration file when it is determined that the constructed configuration file is a file with change information;

[0118] A model generating unit 502, configured to generate a target data model using the configuration file and a template corresponding to the file type;

[0119] The set acquisition unit 503 is used for the parser corresponding to the target data model to parse the data in the target data model to obtain a target component information set.

[0120] According to some embodiments, the type acquisition unit 501 is further configured to:

[0121] In the DevOps pipeline, a configuration file set is constructed by using a construction component, wherein the configuration file set includes component information;

[0122] The set of configuration files is stored in a target storage location using a pre-configured plug-in.

[0123] According to some embodiments, the type acquisition unit 501 is further configured to:

[0124] Obtaining first identification information corresponding to the configuration file;

[0125] Acquire a historical configuration file set corresponding to the configuration file, and acquire second identification information of each historical configuration file in the historical configuration file set;

[0126] When the first identification information and at least one second identification information are inconsistent, it is determined that the constructed configuration file is a file with change information.

[0127] According to some embodiments, the building components include at least one of the following: Maven, Ant, Npm, Gradle.

[0128] According to some embodiments, the model generation unit 502 is used to generate a target data model using the configuration file and a template corresponding to the file type, specifically for:

[0129] In the template collection, obtain a target template corresponding to the file type;

[0130] Perform field comparison processing and type comparison processing on the configuration file and the target template to obtain the target data model.

[0131] According to some embodiments, the model generation unit 502 is used to perform field comparison processing and type comparison processing on the configuration file and the target template, and when obtaining the target data model, is specifically used to:

[0132] In the case where the building component is Maven, field comparison processing and type comparison processing are performed on the configuration file and the POM template to obtain the target data model, wherein the POM template is a template corresponding to the Maven.

[0133] According to some embodiments, the set acquisition unit 503 is used to parse the data in the target data model using a parser corresponding to the target data model to obtain the target component information set, specifically for:

[0134] Acquire data information corresponding to each data in the target data model, wherein the data information includes at least one of a data label, a parameter, a value, and a reference information;

[0135] According to the data information, the data in the target data model is parsed using a parser corresponding to the target data model to obtain a target component information set.

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

[0137] In some or related embodiments, a type acquisition unit is used to obtain the file type corresponding to the configuration file when it is determined that the constructed configuration file is a file with change information; a model generation unit is used to generate a target data model using the configuration file and a template corresponding to the file type; and a set acquisition unit is used for the parser corresponding to the target data model to parse the data in the target data model to obtain a target component information set. Therefore, by detecting the configuration file, the situation where the component information cannot be parsed in time when the configuration file is updated can be reduced. By parsing with the template corresponding to the file type, the limitation of the file type can be reduced, and it is applicable to different construction modes, thereby improving the scope of application of the present solution, and there is no need to parse the component information through a plug-in, thereby reducing the load of the pipeline and improving the accuracy and convenience of obtaining component information.

[0138] Figure 6 600 is a block diagram of a server 600 provided in an embodiment of the present disclosure. For example, the server 600 may be provided as a network side device. Figure 6 The server 600 includes a processing component 622, which further includes at least one processor, and a memory resource represented by a memory 632 for storing instructions executable by the processing component 622, such as an application. The application stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 622 is configured to execute instructions to perform any method of the aforementioned method applied to the network side device.

[0139] The server 600 may also include a power supply component 627 configured to perform power management of the server 600, a wired or wireless network interface 650 configured to connect the server 600 to a network, and an input / output (I / O) interface 658. The server 600 may operate based on an operating system stored in the memory 632, such as Windows Server TM, MacOS XTM, Unix TM, Linux TM, Free BSD TM or the like.

[0140] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0141] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable component parsing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0142] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0144] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0145] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0146] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0147] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A component parsing method, characterized in that: include: When it is determined that the constructed configuration file is a file with change information, obtaining a file type corresponding to the configuration file; Generate a target data model using the configuration file and a template corresponding to the file type; The parser corresponding to the target data model is used to parse the data in the target data model to obtain a target component information set.

2. The method according to claim 1, characterized in that: The method further comprises: In the DevOps pipeline, a configuration file set is constructed by using a construction component, wherein the configuration file set includes component information; The set of configuration files is stored in a target storage location using a pre-configured plug-in.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Obtaining first identification information corresponding to the configuration file; Acquire a historical configuration file set corresponding to the configuration file, and acquire second identification information of each historical configuration file in the historical configuration file set; When the first identification information and at least one second identification information are inconsistent, it is determined that the constructed configuration file is a file with change information.

4. The method according to claim 3, characterized in that: in, The construction components include at least one of the following: Maven, Ant, Npm, and Gradle.

5. The method according to claim 1, characterized in that: The step of using the configuration file and a template corresponding to the file type to generate a target data model includes: In the template collection, obtain a target template corresponding to the file type; Perform field comparison processing and type comparison processing on the configuration file and the target template to obtain the target data model.

6. The method according to claim 5, characterized in that The performing field comparison processing and type comparison processing on the configuration file and the target template to obtain the target data model includes: In the case where the building component is Maven, field comparison processing and type comparison processing are performed on the configuration file and the POM template to obtain the target data model, wherein the POM template is a template corresponding to the Maven.

7. The method according to claim 1, characterized in that The adopting a parser corresponding to the target data model to parse the data in the target data model to obtain a target component information set includes: Acquire data information corresponding to each data in the target data model, wherein the data information includes at least one of a data label, a parameter, a value, and a reference information; According to the data information, the data in the target data model is parsed using a parser corresponding to the target data model to obtain a target component information set.

8. A component analysis device, characterized in that: include: A type acquisition unit, configured to acquire a file type corresponding to the configuration file when it is determined that the constructed configuration file is a file with change information; A model generation unit, configured to generate a target data model using the configuration file and a template corresponding to the file type; The set acquisition unit is used for the parser corresponding to the target data model to parse the data in the target data model to obtain a target component information set.

9. A server, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the component parsing method as described in any one of claims 1 to 7.

10. A storage medium, when instructions in the storage medium are executed by a processor of a server, enables the server to execute the component parsing method according to any one of claims 1 to 7.