CN111309379A - Project generation method and device, computer equipment and storage medium - Google Patents

Project generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111309379A
CN111309379A CN202010125183.5A CN202010125183A CN111309379A CN 111309379 A CN111309379 A CN 111309379A CN 202010125183 A CN202010125183 A CN 202010125183A CN 111309379 A CN111309379 A CN 111309379A
Authority
CN
China
Prior art keywords
project
public module
module
starting
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010125183.5A
Other languages
Chinese (zh)
Inventor
张友玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Health Insurance Company of China Ltd
Original Assignee
Ping An Health Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Health Insurance Company of China Ltd filed Critical Ping An Health Insurance Company of China Ltd
Priority to CN202010125183.5A priority Critical patent/CN111309379A/en
Publication of CN111309379A publication Critical patent/CN111309379A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to research and development management and provides a project generation method, a project generation device, computer equipment and a storage medium. The method comprises the following steps: receiving a project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated; acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information; when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification; and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information. By adopting the method, the memory overflow can be avoided.

Description

Project generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a project generation method and apparatus, a computer device, and a storage medium.
Background
With the development of internet technology, the front end becomes more and more important, and at present, for the development of a front end project, the front end project is usually developed in a modularization mode. And modular development is usually one page which is a file, and each front-end project has a plurality of project files. When a plurality of front-end projects are developed, files of the plurality of front-end projects need to be stored, and memory overflow is easily caused.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a project generation method, a project generation apparatus, a computer device, and a storage medium capable of preventing overflow of a front-end memory.
A method of project generation, the method comprising:
receiving a project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated;
acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information;
when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification;
and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
In one embodiment, before receiving the item generation instruction, obtaining the call command line according to the item generation instruction, and analyzing the call command line to obtain each item identifier to be generated, the method further includes:
receiving a starting instruction of the project public module, acquiring a starting command line according to the starting instruction of the project public module, and analyzing the starting command line to obtain the identification of each public module to be started;
and acquiring corresponding public module files to be started according to the public module identifiers to be started, and sending public module starting requests to the proxy server, so that the proxy server acquires the public module files to be started according to the public module starting requests and stores the public module files to be started.
In one embodiment, detecting that the item common module has been launched comprises:
receiving a starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, calling a starting detection script according to the starting detection script identifier, wherein the starting detection script is used for detecting whether the public module is stored in the proxy server or not;
and compiling the start detection script to obtain start detection byte code information, and executing the start detection byte code information to obtain a detection result.
In one embodiment, after obtaining each corresponding item information configuration file according to each item identifier to be generated, and analyzing the item information configuration files to obtain each item configuration information, the method further includes:
and when detecting that the project public module is not started, acquiring a public module file corresponding to the public module identifier in the project configuration information from the modular standard database through a preset label.
In one embodiment, after obtaining the public module file corresponding to each to-be-generated item identifier returned by the proxy server, and generating an item corresponding to each to-be-generated item identifier according to the public module file and the item configuration information, the method further includes:
receiving a project issuing instruction, and acquiring a project corresponding to each to-be-generated project identifier according to the project issuing instruction;
and packaging the projects by using a packaging tool to obtain each project packaging file, and deploying each project packaging file into the webpage server.
An item generation apparatus, the apparatus comprising:
the analysis module is used for receiving the project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated;
the information obtaining module is used for obtaining corresponding project information configuration files according to the project identifications to be generated, analyzing the project information configuration files and obtaining project configuration information;
the searching module is used for sending a public module calling instruction to the proxy server according to the public module identifier in each item configuration information when detecting that the item public module is started, so that the proxy server searches the corresponding public module file according to the public module identifier;
and the generating module is used for acquiring the public module file corresponding to each to-be-generated project identifier returned by the proxy server and generating the project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
In one embodiment, the apparatus further comprises:
the identification obtaining module is used for receiving the starting instruction of the project public module, obtaining a starting command line according to the starting instruction of the project public module, and analyzing the starting command line to obtain the identification of each public module to be started;
and the starting module is used for acquiring the corresponding public module file to be started according to each public module identifier to be started, and sending a public module starting request to the proxy server, so that the proxy server acquires the public module file to be started according to the public module starting request and stores the public module file to be started.
In one embodiment, the lookup module includes:
the script calling module is used for receiving the starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, calling a starting detection script according to the starting detection script identifier, and detecting whether the public module is stored in the proxy server or not by the starting detection script;
and the detection module is used for compiling the start detection script to obtain start detection byte code information, and executing the start detection byte code information to obtain a detection result.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated;
acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information;
when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification;
and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated;
acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information;
when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification;
and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
According to the project generation method, the project generation device, the computer equipment and the storage medium, the project generation instruction is received, the call command line is acquired according to the project generation instruction, and the call command line is analyzed to obtain each project identifier to be generated; acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information; when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification; and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information. The method comprises the steps of storing the public module of each project in a proxy server, searching the public module file corresponding to each project from the proxy server according to a calling command line when a plurality of projects are generated, and generating the project corresponding to each project identifier to be generated by using the public module file and project configuration information, so that page module files in the terminal are reduced, and the problem of memory overflow is avoided.
Drawings
FIG. 1 is a diagram of an application scenario of a project generation method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for generating a project according to one embodiment;
FIG. 3 is a flow diagram illustrating storage of common modules to be started in one embodiment;
FIG. 4 is a schematic diagram of a process for obtaining a test result according to an embodiment;
FIG. 5 is a flow diagram that illustrates the deployment of a generated project, in one embodiment;
FIG. 6 is a block diagram showing the construction of an item creating apparatus according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The project generation method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the proxy server 104 via a network. The terminal 102 receives the item generation instruction, acquires a calling command line according to the item generation instruction, and analyzes the calling command line to obtain each item identifier to be generated; the terminal 102 acquires corresponding project information configuration files according to the project identifications to be generated, analyzes the project information configuration files and obtains project configuration information; when detecting that the project public module is started, the terminal 102 sends a public module calling instruction to the proxy server 104 according to the public module identifier in each project configuration information, so that the proxy server 104 finds the corresponding public module file according to the public module identifier; the terminal 102 acquires the public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generates a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the proxy server 104 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a project generation method is provided, which is described by taking the application of the method to the terminal in fig. 1 as an example, and includes the following steps:
s202, receiving the item generation instruction, acquiring a calling command line according to the item generation instruction, and analyzing the calling command line to obtain each item identifier to be generated.
Wherein the call command line is used for calling files required for generating a plurality of projects. The to-be-generated item identifiers are used for identifying all items. The project is a front-end project, and the front-end project is an internet product which interacts with a user through a front-end interface such as a web (world Wide web) page or an APP (application) (mobile phone software).
Specifically, the terminal receives an item generation instruction, acquires a call command line input by a user according to the item generation instruction, and executes the call command line, that is, analyzes the call command line to obtain each item identifier to be generated.
And S204, acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain the project configuration information.
The project information configuration file is a file in which project configuration information is configured in advance, and project information such as a project name, a version, a license, and common module information on which projects depend is configured in the file.
Specifically, the terminal obtains corresponding item information configuration files according to the analyzed to-be-generated item identifiers, and analyzes the item information configuration files to obtain item configuration information corresponding to the items. For example, the following steps are carried out: and calling the command line to point to a start file, and analyzing the command line parameters by the start file through an argpart module of python to obtain a packjson.
S206, when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identifier in each project configuration information, so that the proxy server can find the corresponding public module file according to the public module identifier.
Here, the item common module refers to an item module that can be used by a plurality of items, that is, the item module can be reused. The item common module has been started means that the common module of the item has been stored in the proxy server. The proxy server is a common module for storing items, for example, a node server may be used. The public module identification is used for uniquely identifying the corresponding public module. The public module file refers to a file storing public module original code information.
Specifically, the terminal detects whether a public module of an item is started, when the item public module is detected to be started, a public module calling instruction is sent to the proxy server according to a port address stored in the proxy server by a public module identifier in each item configuration information, the proxy server receives the public module calling instruction sent by the terminal through the port address, the public module identifier corresponding to each item is obtained according to the public module calling instruction, a corresponding public module file is found according to the public module identifier corresponding to each item, the found public module file corresponding to each item is returned to the terminal, and the public module files corresponding to each item may be the same or different.
And S208, acquiring the public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
Specifically, the terminal acquires a public module file corresponding to each to-be-generated item identifier returned by the proxy server, at this time, the terminal acquires a difference module file corresponding to each to-be-generated item identifier, and packages the public module file and the difference module file corresponding to each to-be-generated item identifier according to the item configuration information, for example, the public module file and the difference module file can be packaged by a pythonbuild.
According to the project generation method, a project generation instruction is received, a call command line is obtained according to the project generation instruction, and the call command line is analyzed to obtain each project identifier to be generated; acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information; when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification; and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information. The method comprises the steps of storing the public module of each project in a proxy server, searching the public module file corresponding to each project from the proxy server according to a calling command line when a plurality of projects are generated, and generating the project corresponding to each project identifier to be generated by using the public module file and project configuration information, so that page module files in the terminal are reduced, and the problem of memory overflow is avoided.
In one embodiment, before step S202, that is, before receiving the item generation instruction, obtaining the call command line according to the item generation instruction, and analyzing the call command line to obtain each item identifier to be generated, the method further includes the steps of:
s302, receiving a starting instruction of the project public module, acquiring a starting command line according to the starting instruction of the project public module, and analyzing the starting command line to obtain the identifier of each public module to be started.
Wherein the start command line is used to store the respective common modules in the proxy server. The common module is obtained by processing a plurality of modules of history items and can be reused. The public module identifier to be started is used for uniquely identifying the public module which needs to be stored in the proxy server.
Specifically, the terminal receives a starting instruction of the project public module, acquires a starting command line input by a user according to the starting instruction of the project public module, and executes the starting command line, namely the terminal analyzes the starting command line to obtain the identification of each public module to be started.
S304, acquiring the corresponding public module file to be started according to each public module identifier to be started, and sending a public module starting request to the proxy server, so that the proxy server acquires the public module file to be started according to the public module starting request and stores the public module file to be started.
The public module file to be started is a source code file of the public module.
Specifically, the terminal acquires corresponding public module files to be started according to the public module identifiers to be started, and sends a public module starting request to the proxy server, wherein the public module starting request carries the public module identifiers to be started and the corresponding public module files to be started. The proxy server receives the public module starting request, analyzes the public module starting request to obtain each public module to be started identifier and each corresponding public module to be started file, stores each public module to be started identifier and each corresponding public module to be started file in the public module database in a correlation mode, and returns the prompt information of completion of starting to the terminal.
In the embodiment, the common module file is stored in the proxy server, so that modules of all projects are not required to be stored in the terminal, and the problem of memory overflow of the terminal is avoided.
In one embodiment, the step S206 of detecting that the item common module has been started comprises the steps of:
s402, receiving a starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, calling a starting detection script according to the starting detection script identifier, wherein the starting detection script is used for detecting whether the public module is stored in the proxy server or not.
Wherein the start detection command line is used to invoke a start detection script. The start detection script identifier is used for uniquely identifying the start detection script.
Specifically, the terminal receives a start detection instruction, acquires a start detection command line input by a user according to the start detection instruction, executes the start detection command line, namely analyzes the start detection command line to obtain a start detection script identifier, and calls a preset start detection script according to the start detection script identifier.
S406, compiling the start detection script to obtain start detection byte code information, and executing the start detection byte code information to obtain a detection result.
The start detection byte code information is a binary file preprocessed by a compiler and is the existence form of an execution file. The source program needs to be compiled into a bytecode file and then interpreted into machine code for execution.
Specifically, the terminal compiles a start detection script to obtain start detection byte code information, and executes the start detection byte code information to obtain a detection result. Wherein the detection result comprises that the item common module is started and the item common module is not started.
In the embodiment, whether the project common model is stored in the proxy server is detected through the preset starting detection script, so that the efficiency can be improved.
In one embodiment, after step S204, that is, after obtaining corresponding item information configuration files according to the to-be-generated item identifiers, and analyzing the item information configuration files to obtain the item configuration information, the method further includes the steps of:
and when detecting that the project public module is not started, acquiring a public module file corresponding to the public module identifier in the project configuration information from the modular standard database through a preset label.
The preset label is used for acquiring a public module file corresponding to the public module identifier in each item configuration information. The preset tag may be a < script > tag, where the < script > tag is used to define a client script, and a script element may include a script statement or point to an external script file through an src attribute.
Specifically, when detecting that the project public module is not started, the terminal may obtain, from the modular standard database, a public module file corresponding to the public module identifier in each project configuration information through a preset tag. Js under the core file under the dist folder is introduced, for example, by the script </script > tag. The dist folder is used for storing the compressed common module file. The core file is the corresponding common module file. Js is the front-end source code file. And then generating the items corresponding to the item identifications to be generated through the acquired public module files and the item configuration information. The public module file acquired through the preset label is convenient for subsequent use.
In an embodiment, as shown in fig. 5, after step S208, that is, after acquiring the public module file corresponding to each to-be-generated item identifier returned by the proxy server, and generating an item corresponding to each to-be-generated item identifier according to the public module file and the item configuration information, the method further includes the steps of:
and S502, receiving an item issuing instruction, and acquiring an item corresponding to each item identifier to be generated according to the item issuing instruction.
S504, packaging the projects by using a packaging tool to obtain each project packaging file, and deploying each project packaging file into the webpage server.
The packaging tool can package the front-end module into front-end resources which are in accordance with the deployment of the generation environment according to the dependence and the rule. Such as the Webpack tool.
Specifically, the terminal receives the item issuing instruction, acquires the items corresponding to the item identifiers to be generated according to the item issuing instruction, and then packs the items corresponding to the item identifiers to be generated by using a packing tool to obtain the item packing files. And sending each project packaging file to a webpage server, receiving each project packaging file by the webpage server, analyzing and executing the project packaging files, and deploying each project into the webpage server. The user can send a project display instruction to the webpage server through the user terminal, the execution result of the project packed file is returned to the user terminal according to the project display instruction, and the user terminal displays the project according to the execution result. In the embodiment, the generated project can be deployed in the webpage server for use, and the method is convenient and quick.
In a specific embodiment, a user enters a command line interface through a terminal, inputs a call command line through the command line interface, and the terminal executes the call command line, specifically: the terminal analyzes the call command line to obtain an item 1 and an item 2, acquires a corresponding item 1 configuration file and an item 2 configuration file according to the item 1 and the item 2, analyzes the item 1 configuration file and the item 2 configuration file, and obtains a public module identifier configured by the item 1 and a public module identifier configured by the item 2. And the storage path of the common module, the storage port information and the like. And at the moment, detecting whether the project public module is started, and when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identifier of the project 1, the public module identifier of the project 2, the storage path, the storage port and the like so that the proxy server can find the corresponding public module file according to the public module identifier. And the terminal receives the public module file of the item 1 and the public module file of the item 2 returned by the proxy server. At this time, the terminal acquires the other module file of item 1 and the other module file of item 2. And the terminal generates a project 1 packaged file by using a packaging tool according to the common module file and other module files of the project 1. And simultaneously generating a project 2 packaged file by using a packaging tool according to the common module file and other module files of the project 2. The project 1 and project 2 packaged files are then deployed into a nginx server (high performance web server).
It should be understood that although the various steps in the flow charts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in FIG. 6, there is provided a project generation apparatus 600 comprising: an analysis module 602, an information obtaining module 604, a search module 606, and a generation module 608, wherein:
the analysis module 602 is configured to receive a project generation instruction, obtain a call command line according to the project generation instruction, and analyze the call command line to obtain each to-be-generated project identifier;
an information obtaining module 604, configured to obtain each corresponding item information configuration file according to each item identifier to be generated, and analyze the item information configuration file to obtain each item configuration information;
the searching module 606 is configured to, when it is detected that the project public module is started, send a public module calling instruction to the proxy server according to the public module identifier in each project configuration information, so that the proxy server searches for a corresponding public module file according to the public module identifier;
the generating module 608 is configured to obtain a public module file corresponding to each to-be-generated item identifier returned by the proxy server, and generate an item corresponding to each to-be-generated item identifier according to the public module file and the item configuration information.
In one embodiment, the item generation apparatus 600 further includes:
the identification obtaining module is used for receiving the starting instruction of the project public module, obtaining a starting command line according to the starting instruction of the project public module, and analyzing the starting command line to obtain the identification of each public module to be started;
and the starting module is used for acquiring the corresponding public module file to be started according to each public module identifier to be started, and sending a public module starting request to the proxy server, so that the proxy server acquires the public module file to be started according to the public module starting request and stores the public module file to be started.
In one embodiment, the lookup module 606 includes:
and the script calling unit is used for receiving the starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, calling a starting detection script according to the starting detection script identifier, and detecting whether the public module is stored in the proxy server or not by using the starting detection script.
And the detection unit is used for compiling the start detection script to obtain start detection byte code information, and executing the start detection byte code information to obtain a detection result.
In one embodiment, the item generation apparatus 600 further includes:
and the file acquisition module is used for acquiring a public module file corresponding to the public module identifier in each item configuration information from the modular standard database through a preset label when the item public module is detected not to be started.
In one embodiment, the item generation apparatus 600 further includes:
the project acquisition module is used for receiving a project issuing instruction and acquiring a project corresponding to each to-be-generated project identifier according to the project issuing instruction;
a project deployment module for packaging the projects by using a packaging tool to obtain each project packaging file, and deploying each project packaging file into the web server
For the specific definition of the project generating device, reference may be made to the above definition of the project generating method, which is not described herein again. The respective modules in the above-described item generating apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a project generation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated; acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information; when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification; and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving a starting instruction of the project public module, acquiring a starting command line according to the starting instruction of the project public module, and analyzing the starting command line to obtain the identification of each public module to be started; and acquiring corresponding public module files to be started according to the public module identifiers to be started, and sending public module starting requests to the proxy server, so that the proxy server acquires the public module files to be started according to the public module starting requests and stores the public module files to be started.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and receiving a starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, calling a starting detection script according to the starting detection script identifier, and detecting whether the public module is stored in the proxy server or not by the starting detection script. And compiling the start detection script to obtain start detection byte code information, and executing the start detection byte code information to obtain a detection result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when detecting that the project public module is not started, acquiring a public module file corresponding to the public module identifier in the project configuration information from the modular standard database through a preset label.
In one embodiment, the processor, when executing the computer program, further performs the steps of: receiving a project issuing instruction, and acquiring a project corresponding to each to-be-generated project identifier according to the project issuing instruction; and packaging the projects by using a packaging tool to obtain each project packaging file, and deploying each project packaging file into the webpage server.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated; acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information; when detecting that the project public module is started, sending a public module calling instruction to the proxy server according to the public module identification in each project configuration information, so that the proxy server searches the corresponding public module file according to the public module identification; and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a starting instruction of the project public module, acquiring a starting command line according to the starting instruction of the project public module, and analyzing the starting command line to obtain the identification of each public module to be started; and acquiring corresponding public module files to be started according to the public module identifiers to be started, and sending public module starting requests to the proxy server, so that the proxy server acquires the public module files to be started according to the public module starting requests and stores the public module files to be started.
In one embodiment, the computer program when executed by the processor further performs the steps of: and receiving a starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, calling a starting detection script according to the starting detection script identifier, and detecting whether the public module is stored in the proxy server or not by the starting detection script. And compiling the start detection script to obtain start detection byte code information, and executing the start detection byte code information to obtain a detection result.
In one embodiment, the computer program when executed by the processor further performs the steps of: and when detecting that the project public module is not started, acquiring a public module file corresponding to the public module identifier in the project configuration information from the modular standard database through a preset label.
In one embodiment, the computer program when executed by the processor further performs the steps of: receiving a project issuing instruction, and acquiring a project corresponding to each to-be-generated project identifier according to the project issuing instruction; and packaging the projects by using a packaging tool to obtain each project packaging file, and deploying each project packaging file into the webpage server.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of project generation, the method comprising:
receiving a project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated;
acquiring corresponding project information configuration files according to the to-be-generated project identifications, and analyzing the project information configuration files to obtain project configuration information;
when detecting that the project public module is started, sending a public module calling instruction to a proxy server according to the public module identification in each project configuration information, so that the proxy server finds the corresponding public module file according to the public module identification;
and acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server, and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
2. The method according to claim 1, wherein before the receiving the item generation instruction, obtaining a call command line according to the item generation instruction, and analyzing the call command line to obtain each item identifier to be generated, the method further comprises:
receiving a starting instruction of a project public module, acquiring a starting command line according to the starting instruction of the project public module, and analyzing the starting command line to obtain the identification of each public module to be started;
and acquiring corresponding public module files to be started according to the public module identifiers to be started, and sending a public module starting request to a proxy server, so that the proxy server acquires the public module files to be started according to the public module starting request and stores the public module files to be started.
3. The method of claim 1, wherein the detecting that an item common module has been launched comprises:
receiving a starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, and calling a starting detection script according to the starting detection script identifier, wherein the starting detection script is used for detecting whether a public module is stored in a proxy server or not;
compiling the start detection script to obtain start detection byte code information, and executing the start detection byte code information to obtain a detection result.
4. The method according to claim 1, wherein after obtaining corresponding project information configuration files according to the to-be-generated project identifiers, analyzing the project information configuration files, and obtaining project configuration information, the method further comprises:
and when detecting that the project public module is not started, acquiring a public module file corresponding to the public module identifier in the project configuration information from the modular standard database through a preset label.
5. The method according to claim 1, wherein after the obtaining of the public module file corresponding to each to-be-generated item identifier returned by the proxy server and the generating of the item corresponding to each to-be-generated item identifier according to the public module file and the item configuration information, further comprising:
receiving a project issuing instruction, and acquiring a project corresponding to each to-be-generated project identifier according to the project issuing instruction;
and packaging the projects by using a packaging tool to obtain each project packaging file, and deploying each project packaging file into a webpage server.
6. An apparatus for generating an item, the apparatus comprising:
the analysis module is used for receiving the project generation instruction, acquiring a calling command line according to the project generation instruction, and analyzing the calling command line to obtain each project identifier to be generated;
the information obtaining module is used for obtaining corresponding project information configuration files according to the project identifications to be generated, analyzing the project information configuration files and obtaining project configuration information;
the searching module is used for sending a public module calling instruction to the proxy server according to the public module identifier in each item configuration information when detecting that the item public module is started, so that the proxy server searches the corresponding public module file according to the public module identifier;
and the generating module is used for acquiring a public module file corresponding to each to-be-generated project identifier returned by the proxy server and generating a project corresponding to each to-be-generated project identifier according to the public module file and the project configuration information.
7. The apparatus of claim 6, further comprising:
the identification obtaining module is used for receiving a project public module starting instruction, obtaining a starting command line according to the project public module starting instruction, and analyzing the starting command line to obtain the identification of each public module to be started;
and the starting module is used for acquiring the corresponding public module file to be started according to each public module identifier to be started, and sending a public module starting request to the proxy server, so that the proxy server acquires the public module file to be started according to the public module starting request and stores the public module file to be started.
8. The apparatus of claim 6, wherein the lookup module comprises:
the script calling module is used for receiving a starting detection instruction, acquiring a starting detection command line according to the starting detection instruction, analyzing the starting detection command line to obtain a starting detection script identifier, and calling a starting detection script according to the starting detection script identifier, wherein the starting detection script is used for detecting whether the public module is stored in the proxy server or not;
and the detection module is used for compiling the start detection script to obtain start detection byte code information and executing the start detection byte code information to obtain a detection result.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010125183.5A 2020-02-27 2020-02-27 Project generation method and device, computer equipment and storage medium Pending CN111309379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010125183.5A CN111309379A (en) 2020-02-27 2020-02-27 Project generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010125183.5A CN111309379A (en) 2020-02-27 2020-02-27 Project generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111309379A true CN111309379A (en) 2020-06-19

Family

ID=71151588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010125183.5A Pending CN111309379A (en) 2020-02-27 2020-02-27 Project generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111309379A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416425A (en) * 2020-11-20 2021-02-26 微医云(杭州)控股有限公司 APP construction method and device, computer equipment and storage medium
CN112486497A (en) * 2020-11-26 2021-03-12 北京自如信息科技有限公司 Compiling configuration file generation method and device, electronic equipment and storage medium
CN113110869A (en) * 2021-04-13 2021-07-13 深圳市合信自动化技术有限公司 Management system for remote downloading program and simultaneously writing agent identification
CN113467823A (en) * 2021-06-21 2021-10-01 北京达佳互联信息技术有限公司 Configuration information acquisition method, device, system and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112416425A (en) * 2020-11-20 2021-02-26 微医云(杭州)控股有限公司 APP construction method and device, computer equipment and storage medium
CN112486497A (en) * 2020-11-26 2021-03-12 北京自如信息科技有限公司 Compiling configuration file generation method and device, electronic equipment and storage medium
CN113110869A (en) * 2021-04-13 2021-07-13 深圳市合信自动化技术有限公司 Management system for remote downloading program and simultaneously writing agent identification
CN113467823A (en) * 2021-06-21 2021-10-01 北京达佳互联信息技术有限公司 Configuration information acquisition method, device, system and storage medium
CN113467823B (en) * 2021-06-21 2024-03-01 北京达佳互联信息技术有限公司 Configuration information acquisition method, device, system and storage medium

Similar Documents

Publication Publication Date Title
CN108446116B (en) Application program page generation method and device, computer equipment and storage medium
CN111309379A (en) Project generation method and device, computer equipment and storage medium
CN109460527B (en) Product data configuration method, device, computer equipment and storage medium
CN109766124B (en) Service development method, device, computer equipment and storage medium
CN110866198B (en) Static resource caching method, system, device, computer equipment and storage medium
CN110290212B (en) Service call recording method, device, computer equipment and storage medium
WO2020253061A1 (en) Page generating method and apparatus, computer device, and storage medium
CN110908778B (en) Task deployment method, system and storage medium
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
CN108959384B (en) Webpage data acquisition method and device, computer equipment and storage medium
CN109361628B (en) Message assembling method and device, computer equipment and storage medium
CN112527357A (en) Service hot loading updating method and device, computer equipment and storage medium
CN110489138B (en) Application updating method, device and storage medium
CN110362341B (en) Business management method, device, equipment and storage medium based on micro-service architecture
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN112637008B (en) Link simulation test method, device, system, computer equipment and storage medium
CN109254765B (en) Timing task management method, device, computer equipment and storage medium
CN108241516B (en) Embedded system program loading method and device, computer equipment and storage medium
CN112882769A (en) Skill pack data processing method, skill pack data processing device, computer equipment and storage medium
CN108255509B (en) Application deployment method, device, equipment and readable storage medium
CN108667919B (en) Data processing method, data processing device, computer equipment and storage medium
CN112860457A (en) Software development kit calling method and device, computer equipment and storage medium
CN111190609A (en) Service processing method, device, equipment and storage medium
CN112084403A (en) Data query method and device, computer equipment and storage medium
CN110516172B (en) Resource calling method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40024126

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination