File generation method, device, electronic device, and computer-readable storage medium

By obtaining and integrating the pending parameter information of the pom.xml file, and using the dependency knowledge graph and building configuration templates to generate the pom.xml file, the problems of low writing efficiency and poor accuracy in the existing technology are solved, and efficient and accurate File generation.

CN112486494BActive Publication Date: 2024-11-22CHINA CITIC BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011278318.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-16
Publication Date
2024-11-22
Estimated Expiration
2040-11-16

AI Technical Summary

Technical Problem

In the prior art, the pom.xml file is low in writing efficiency and low in accuracy, and it is prone to information loss, redundancy or conflict.

Method used

By obtaining the pending parameter information, the pom.xml file is generated based on the preset file generation process, including dependency component keywords, basic configuration information and project information, query the dependency knowledge graph and build configuration and environment setting templates, and integrate and generate accurate generation pom.xml file.

Benefits of technology

It effectively improves the writing efficiency and accuracy of pom.xml file, and avoids information loss, redundancy or conflict.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112486494B_ABST
    Figure CN112486494B_ABST
Patent Text Reader

Abstract

The present application relates to the field of application software technology, and in particular to a file generation method, device, electronic device and computer-readable storage medium. The file generation method comprises: obtaining parameter information to be processed; performing file generation processing on the parameter information to be processed based on a preset file generation processing process, and generating a pom.xml file corresponding to the parameter information to be processed. In the present application, the writing and generation of the pom.xml file is realized, and the missing, redundancy or conflict of information in the pom.xml file is avoided. Compared with the existing pom.xml file generation method, the writing efficiency and accuracy of the pom.xml file are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application software technology, and in particular to a file generation method, device, electronic device and computer-readable storage medium. Background Art

[0002] POM (Project Object Model) is the basic working unit of Maven project. It is an XML file that contains project information and various configuration information used by Maven project to build projects, such as project dependencies, project developers, versions, plug-ins, organizational information, project authorization and project URL (uniform resource locator). In fact, in the world of Maven, a project can have no code, but must contain a pom.xml file. However, the current writing of pom.xml files mainly depends on the experience and level of software developers, which will lead to the following problems: the efficiency of writing pom.xml files is low, and the context information in pom.xml files (including basic configuration, dependency configuration, build configuration and environment settings, etc.) may be missing, redundant or conflicting, resulting in low accuracy of pom.xml files. Based on this, how to effectively improve the writing efficiency and accuracy of pom.xml files has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present application provides a file generation method, device, electronic device and computer-readable storage medium to effectively improve the writing efficiency and accuracy of pom.xml files.

[0004] In a first aspect, a method for generating a file is provided, comprising:

[0005] Get the parameter information to be processed;

[0006] The parameter information to be processed is subjected to file generation processing based on a preset file generation processing procedure to generate a pom.xml file corresponding to the parameter information to be processed.

[0007] In a possible implementation, the performing file generation processing on the parameter information to be processed based on a preset file generation processing process to generate a pom.xml file corresponding to the parameter information to be processed includes:

[0008] Obtaining dependent component keywords, basic configuration information and project information in the parameter information to be processed;

[0009] Based on the dependency component keywords, a preset dependency relationship knowledge graph is queried to generate corresponding dependency configuration information;

[0010] Generate corresponding build configuration and environment setting information based on the obtained compilation environment detection information and the preset build configuration and environment setting template;

[0011] The basic configuration information, project information, dependency configuration information, build configuration and environment setting information are integrated to obtain a corresponding pom.xml file.

[0012] In a possible implementation, before performing file generation processing on the parameter information to be processed based on a preset file generation processing process, the method further includes:

[0013] Build dependency knowledge graph and build configuration and environment setup templates.

[0014] In a possible implementation, constructing a dependency knowledge graph includes:

[0015] Get basic entity information and relationship information;

[0016] A dependency knowledge graph including vertices and edges is constructed according to the entity information and the association relationship information; wherein the vertices are the entity information and the edges are the association relationship information.

[0017] In a possible implementation, the build configuration and environment setting template includes:

[0018] Get pom.xml information;

[0019] Perform cluster analysis on the pom.xml information, and build a configuration and environment setting template based on the cluster analysis result.

[0020] In a second aspect, a file generation device is provided, comprising:

[0021] An acquisition module is used to obtain parameter information to be processed;

[0022] The processing module is used to perform file generation processing on the parameter information to be processed based on a preset file generation processing process, and generate a pom.xml file corresponding to the parameter information to be processed.

[0023] In one possible implementation, a processing module is used to obtain dependency component keywords, basic configuration information and project information in the parameter information to be processed; based on the dependency component keywords, a preset dependency knowledge graph is queried to generate corresponding dependency configuration information; based on the obtained compilation environment detection information and the preset build configuration and environment setting template, corresponding build configuration and environment setting information is generated; the basic configuration information, project information, dependency configuration information and build configuration and environment setting information are integrated to obtain a corresponding pom.xml file.

[0024] In a possible implementation, it also includes:

[0025] The building module is used to build dependency knowledge graphs and build configuration and environment setting templates.

[0026] In one possible implementation, a construction module is specifically used to obtain basic entity information and association relationship information; and to construct a dependency knowledge graph including vertices and edges based on the entity information and association relationship information; wherein the vertices are the entity information and the edges are the association relationship information.

[0027] In a possible implementation, the construction module is specifically used to obtain pom.xml information; perform cluster analysis on the pom.xml information, and construct a configuration and environment setting template based on the cluster analysis result.

[0028] In a third aspect, an electronic device is provided, comprising: a processor and a memory;

[0029] The memory is used to store computer programs;

[0030] The processor is used to execute the above-mentioned file generation method by calling the computer program.

[0031] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer storage medium is used to store a computer program, and when the computer program is run on a computer, the computer can execute the above-mentioned file generation method.

[0032] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:

[0033] In this application, the writing and generation of the pom.xml file is realized, and the missing, redundancy or conflict of information in the pom.xml file is avoided. Compared with the existing pom.xml file generation method, the writing efficiency and accuracy of the pom.xml file are effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the embodiments of the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0035] Figure 1 A flowchart of the file generation method provided for this application;

[0036] Figure 2A schematic diagram of a specific processing flow of a possible implementation of the file generation method provided in this application;

[0037] Figure 3 A schematic diagram of the structure of a file generation device provided by this application;

[0038] Figure 4 A schematic diagram of the structure of an electronic device for the file generation method provided in this application. DETAILED DESCRIPTION

[0039] The present application proposes a file generation method, device, electronic device and computer-readable storage medium. The specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings.

[0040] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0041] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements, and / or component frameworks, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, component frameworks, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0042] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0043] To make the purpose, technical solution and advantages of the present application clearer, the following will further describe the implementation methods of the present application in detail with reference to the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0044] like Figure 1 FIG. 1 is a flow chart of a method for generating a file provided by the present application, and the method comprises the following steps:

[0045] Step S101, obtaining parameter information to be processed;

[0046] Step S102: performing file generation processing on the parameter information to be processed based on a preset file generation processing procedure to generate a pom.xml file corresponding to the parameter information to be processed.

[0047] In this application, the writing and generation of the pom.xml file is realized, and the missing, redundancy or conflict of information in the pom.xml file is avoided. Compared with the existing pom.xml file generation method, the writing efficiency and accuracy of the pom.xml file are effectively improved.

[0048] Based on the technical solution provided by the present application, the technical solution is explained in detail below. Figure 2 As shown, it is a specific processing flow chart of a possible implementation of the file generation method provided by the present application.

[0049] In one possible implementation, before implementing the file generation process based on the file generation process, it is necessary to first construct the file generation process, and the construction process can be carried out in an electronic device. By obtaining a large amount of pom.xml information and saving it in a graph database, and then training and enriching the pom.xml information, the pom.xml file obtained when the file generation process is used to write and generate files can be more accurate, thereby improving the accuracy of file writing and generation.

[0050] This file generates a training build for the processing process, which can include the following processes:

[0051] S1. Get pom.xml information

[0052] By obtaining all pom.xml information in the software library and extracting the tag information corresponding to each pom.xml information, the following knowledge base and template are established based on this.

[0053] For the embodiment of the present application, before performing the file generation processing training construction, a large amount of sample data pom.xml information will be obtained first. The sample data pom.xml information can be manually input, or extracted from local storage, or obtained by sending a sample data acquisition request to the server. Of course, the way of obtaining the sample data is not limited to this.

[0054] S2. Training and construction process of file generation process

[0055] For the embodiments of the present application, new concepts and attributes are discovered through mining, and the knowledge base ontology is expanded to define knowledge entity information as the basis of the software project (including the project or organization, the common name of the project, the version of the project, the packaging mechanism, the name of the user describing the project, the official address of the development team, classification and other project information, compilation information and environment information, etc.) and its association relationship information (belonging, inclusion, plug-in, inheritance, aggregation and dependency relationships, etc.), and stored in the graph database in the form of vertices and edges, thereby constructing a basic dependency relationship knowledge graph; wherein the vertices in the graph are mainly entity information, and the edges are mainly association relationship information.

[0056] By performing cluster analysis on pom.xml information, the corresponding cluster analysis results are obtained, and then a suitable build configuration and environment setting template is generated according to the cluster analysis results.

[0057] For the present application, in a possible implementation, the processing of the aforementioned step S101 specifically includes the processing of the following step S201.

[0058] Step S201, obtaining parameter information to be processed.

[0059] In a possible implementation, the above-mentioned parameter information to be processed may be information directly received by the electronic device from the user, or information carried in a request uploaded by the receiving terminal, wherein the information includes dependent component keywords, basic configuration information and project information.

[0060] For the present application, in a possible implementation, the processing of the aforementioned step S102 specifically includes the processing of the following steps S202 to S204.

[0061] Step S202: Generate dependent configuration information based on the parameter information to be processed.

[0062] In a possible implementation, after obtaining the parameter information to be processed, the dependency component keywords carried therein are obtained, and the aforementioned preset dependency relationship knowledge graph is queried based on the dependency component keywords to find matching dependency configuration information.

[0063] Step S203: Generate construction configuration and environment setting information based on the parameter information to be processed.

[0064] In a possible implementation, after obtaining the parameter information to be processed, automatically obtain the compilation environment detection information of the project, including but not limited to user information, Maven version, address, Java version, platform encoding, OS name, version, arch, family, etc. Process the obtained compilation environment detection information and the aforementioned build configuration and environment setting template to generate corresponding build configuration and environment setting information.

[0065] Among them, for the above steps S202 to S203, the two can be processed in the current order, but it is not limited to this. The above two steps can also be processed in reverse order, or the above two steps can be processed in parallel.

[0066] Step S204, obtaining a pom.xml file based on the parameter information to be processed, the dependency configuration information, the build configuration and the environment setting information.

[0067] In a possible implementation, after the dependency configuration information, build configuration and environment setting information are obtained based on the aforementioned steps S202 to S203, information integration is performed based on the basic configuration information and project information in the aforementioned parameter information to be processed, thereby obtaining the corresponding required pom.xml file.

[0068] According to the embodiment of the present invention, the pom.xml information of the sample data in the file generation process is updated online by acquiring the pom.xml information for updating, and based on the acquired pom.xml information, the pom.xml information for updating may be all the pom.xml information received within a period of time.

[0069] According to the embodiment of the present invention, when the sample data in the file generation process is updated online based on the obtained pom.xml information, it can be divided into two situations:

[0070] Scenario 1: If the electronic device is a terminal device, the online update process includes:

[0071] a. Update the sample data in the generation process of the file online based on the locally stored pom.xml information.

[0072] In the processing, the pom.xml information for updating may be stored in the local storage. When updating is required, the corresponding data is directly extracted from the local storage for updating.

[0073] b. Perform online update on the sample data in the process of generating the file based on the sample data for updating sent by the server.

[0074] In this processing, the file generation processing is updated by receiving sample data for updating the file generation processing sent by the server.

[0075] Scenario 2: If the electronic device is a server, the online update process includes:

[0076] a. Update the sample data in the generation process of the file online based on the locally stored pom.xml information.

[0077] In the processing, the pom.xml information for updating may be stored in the local storage. When updating is required, the corresponding data is directly extracted from the local storage for updating.

[0078] b. Based on the pom.xml information for updating sent by the terminal, the sample data in the process of generating the file is updated online.

[0079] In the processing, the file generation process is updated by receiving pom.xml information for updating the file generation process sent by the terminal.

[0080] For the embodiments of the present application, whether the update process of the sample data in the file generation process is based on the locally stored pom.xml information, the sample data sent by the server, or the pom.xml information uploaded by the terminal, the update process can be actively initiated by the terminal device or the server.

[0081] In this application, the writing and generation of the pom.xml file is realized, and the missing, redundancy or conflict of information in the pom.xml file is avoided. Compared with the existing pom.xml file generation method, the writing efficiency and accuracy of the pom.xml file are effectively improved.

[0082] Based on the technical solution of the file generation method provided by the present application, the present application correspondingly provides a structural schematic diagram of a file generation device, such as Figure 3 As shown, the file generation device 30 of the present application may include:

[0083] An acquisition module 31 is used to acquire parameter information to be processed;

[0084] The processing module 32 is used to perform file generation processing on the parameter information to be processed based on a preset file generation processing procedure, and generate a pom.xml file corresponding to the parameter information to be processed.

[0085] In one possible implementation, the processing module 32 is used to obtain dependent component keywords, basic configuration information and project information in the parameter information to be processed; query the preset dependency relationship knowledge graph based on the dependent component keywords to generate corresponding dependency configuration information; generate corresponding build configuration and environment setting information based on the obtained compilation environment detection information and the preset build configuration and environment setting template; integrate the basic configuration information, project information, dependent configuration information, build configuration and environment setting information to obtain the corresponding pom.xml file.

[0086] In a possible implementation, it also includes:

[0087] The construction module 33 is used to construct a dependency knowledge graph and a construction configuration and environment setting template.

[0088] In one possible implementation, the construction module 33 is specifically used to obtain basic entity information and association relationship information; and to construct a dependency knowledge graph including vertices and edges based on the entity information and association relationship information; wherein the vertices are entity information and the edges are association relationship information.

[0089] In a possible implementation, the construction module 33 is specifically used to obtain pom.xml information; perform cluster analysis on the pom.xml information, and construct a configuration and environment setting template based on the cluster analysis result.

[0090] In this application, the writing and generation of the pom.xml file is realized, and the missing, redundancy or conflict of information in the pom.xml file is avoided. Compared with the existing pom.xml file generation method, the writing efficiency and accuracy of the pom.xml file are effectively improved.

[0091] Reference below Figure 4 , which shows an electronic device (eg Figure 1 The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0092] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0093] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0094] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart 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 includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present application are executed.

[0095] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0096] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0097] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains at least two Internet Protocol addresses; sends a node evaluation request including the at least two Internet Protocol addresses to a node evaluation device, wherein the node evaluation device selects an Internet Protocol address from the at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein the obtained Internet Protocol address indicates an edge node in a content distribution network.

[0098] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet Protocol addresses; selects an Internet Protocol address from the at least two Internet Protocol addresses; and returns the selected Internet Protocol address; wherein the received Internet Protocol address indicates an edge node in a content distribution network.

[0099] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or back-end server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0100] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0101] The units involved in the embodiments described in the present application may be implemented by software or hardware. The name of the unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0102] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

[0103] The electronic device provided in the present application is applicable to any embodiment of the above-mentioned file generation method, which will not be described in detail here.

[0104] In this application, the writing and generation of the pom.xml file is realized, and the missing, redundancy or conflict of information in the pom.xml file is avoided. Compared with the existing pom.xml file generation method, the writing efficiency and accuracy of the pom.xml file are effectively improved.

[0105] The present application provides a computer-readable storage medium, which stores a computer program, and the computer program enables a computer to execute the file generation method shown in the above embodiment.

[0106] The computer-readable storage medium provided in this application is applicable to any embodiment of the above-mentioned file generation method and will not be described in detail here.

[0107] In this application, the writing and generation of the pom.xml file is realized, and the missing, redundancy or conflict of information in the pom.xml file is avoided. Compared with the existing pom.xml file generation method, the writing efficiency and accuracy of the pom.xml file are effectively improved.

[0108] Those skilled in the art will appreciate that each block in these structure diagrams and / or block diagrams and / or flow charts and combinations of blocks in these structure diagrams and / or block diagrams and / or flow charts can be implemented using computer program instructions. Those skilled in the art will appreciate that these computer program instructions can be provided to a general-purpose computer, a professional computer, or a processor of other programmable data processing methods to implement, thereby executing the scheme specified in the block or multiple blocks of the structure diagrams and / or block diagrams and / or flow charts disclosed in this application through the processor of the computer or other programmable data processing method.

[0109] The modules of the device of the present application may be integrated into one or deployed separately. The modules may be combined into one module or further divided into multiple sub-modules.

[0110] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.

[0111] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the present embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.

[0112] The above serial numbers of this application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0113] The above disclosures are only a few specific embodiments of the present application; however, the present application is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present application.

Claims

1. A file generation method, characterized in that: include: Get the parameter information to be processed; Perform file generation processing on the parameter information to be processed based on a preset file generation processing process to generate a pom.xml file corresponding to the parameter information to be processed; The method of performing file generation processing on the parameter information to be processed based on a preset file generation processing process to generate a pom.xml file corresponding to the parameter information to be processed includes: Obtaining dependent component keywords, basic configuration information and project information in the parameter information to be processed; Based on the dependency component keywords, a preset dependency relationship knowledge graph is queried to generate corresponding dependency configuration information; Generate corresponding build configuration and environment setting information based on the obtained compilation environment detection information and the preset build configuration and environment setting template; The basic configuration information, project information, dependency configuration information, build configuration and environment setting information are integrated to obtain a corresponding pom.xml file.

2. The method according to claim 1, characterized in that Before performing file generation processing on the parameter information to be processed based on the preset file generation processing process, the method further includes: Build a preset file generation process; The file generation process includes building a dependency knowledge graph and generating a build configuration and environment setting template.

3. The method according to claim 2, characterized in that Build a dependency knowledge graph, including: Get basic entity information and relationship information; A dependency knowledge graph including vertices and edges is constructed according to the entity information and the association relationship information; wherein the vertices are the entity information and the edges are the association relationship information.

4. The method according to claim 2, characterized in that Generate build configuration and environment setting templates, including: Get pom.xml information; Cluster analysis is performed on the pom.xml information, and a build configuration and environment setting template is generated based on the cluster analysis result.

5. A file generating device, characterized in that: include: An acquisition module is used to obtain parameter information to be processed; A processing module, used for performing file generation processing on the parameter information to be processed based on a preset file generation processing process, and generating a pom.xml file corresponding to the parameter information to be processed; The processing module comprises: Obtaining dependent component keywords, basic configuration information and project information in the parameter information to be processed; Based on the dependency component keywords, a preset dependency relationship knowledge graph is queried to generate corresponding dependency configuration information; Generate corresponding build configuration and environment setting information based on the obtained compilation environment detection information and the preset build configuration and environment setting template; The basic configuration information, project information, dependency configuration information, build configuration and environment setting information are integrated to obtain a corresponding pom.xml file.

6. An electronic device, characterized in that: include: Processor and memory; The memory is used to store computer programs; The processor is used to execute the file generation method according to any one of claims 1 to 4 by calling the computer program.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer-readable storage medium is run on a computer, the computer is enabled to execute the file generation method according to any one of claims 1 to 4.