A file configuration method and device

By using pre-configured general configuration files to uniformly package and configure front-end projects and generating target files according to the program environment, the problem of dist package differences in different program environments in the existing technology is solved, and the development and maintenance efficiency of front-end projects is improved.

CN112612550BActive Publication Date: 2024-11-12BEIJING 21VIANET DATA CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011605637.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2024-11-12
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

The existing file configuration method causes different dist package and packaging configurations of front-end projects in different program environments, making it difficult for developers to troubleshoot vulnerabilities, and reduces development efficiency and maintenance efforts.

Method used

Provide a file configuration method and device, by receiving file configuration requests sent by the terminal, using pre-configured general configuration files to package and configure the initial program files of the front-end project, generate a general program file, and configure the file according to the request address of the program environment. Convert it into a target program file and send it to the terminal to realize unified packaging configuration in different environments.

Benefits of technology

It improves the development efficiency and maintenance of front-end projects, making the dist package consistent in different program environments, making it easier to detect vulnerabilities and maintain projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112612550B_ABST
    Figure CN112612550B_ABST
Patent Text Reader

Abstract

The present application discloses a file configuration method and device. The method is applied in servers corresponding to different program environments, including: receiving a file configuration request sent by a terminal, the file configuration request includes an initial program file of a front-end project and a pre-configured general configuration file; based on the file configuration request, using a general configuration file to package and configure the initial program file to obtain a general program file of the front-end project; obtaining a target program file of the front-end project according to a pre-configured request address configuration file and a general program file corresponding to the program environment to which it belongs; the request address configuration file includes an IP address corresponding to the corresponding program environment; and sending a file configuration response carrying indication information to the terminal, the indication information is used to indicate that the file configuration is complete. The method improves the development efficiency and project maintenance efforts of the front-end project.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a file configuration method and device. Background Art

[0002] At present, interface frameworks used to create Web user interaction interfaces mainly include VueJS, React, etc. These interface frameworks rely on their scaffolding tools and webpack configuration files or gulp configuration files to build front-end projects.

[0003] The front end of the terminal needs to configure different application program interface (API) request addresses according to different program environments, such as test environment, quasi-production environment, grayscale environment, production environment, etc., that is, configure the IP addresses or domain names corresponding to different program environments.

[0004] The existing file configuration method is to configure the API request addresses under different program environments and the different code file packaging configuration processes under different program environments in the front-end webpack configuration file. Webpack is a module packager for modern JavaScript applications that brings together all the resources required for front-end development (such as JavaScript, fonts, and images, etc.) in one place.

[0005] Then, the webpack configuration file and the initial code of the front-end project are sent to servers in different program environments. The servers in different program environments package the initial code of the front-end project through the packaging commands of the corresponding program environments, such as the packaging command of the test environment: npm runbuild:test; the packaging command of the quasi-production environment: npm run build:uat, etc., to generate program files for different program environments to be released, namely, dist packages, and then deploy the front-end project.

[0006] However, since the above method uses the webpack configuration file to perform packaging operations of different packaging process codes on the initial code of the front-end project according to the packaging commands of different program environments, the code (distribution, dist) packages of the to-be-released versions of different program environments are different, that is, the pictures displayed on the terminal interface in different program environments are different, which makes it difficult for front-end developers to detect vulnerabilities in different dist packages and / or packaging configuration process codes, reducing the development efficiency and project maintenance efforts of the front-end project. Summary of the invention

[0007] The embodiments of the present application provide a file configuration method and device, which solve the above-mentioned problems existing in the prior art and improve the development efficiency and project maintenance strength of the front-end project.

[0008] In a first aspect, a file configuration method is provided, the method being applied in servers corresponding to different program environments, and the method may include:

[0009] A file configuration request sent by a receiving terminal includes an initial program file of a front-end project and a pre-configured general configuration file; the general configuration file is used to execute the same packaging configuration process for program files of different application program environments;

[0010] Based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain a general program file of the front-end project;

[0011] According to the pre-configured request address configuration file corresponding to the program environment to which it belongs and the general program file, the target program file of the front-end project is obtained; the request address configuration file includes the IP address corresponding to the corresponding program environment, and the target program file is the program file of the version to be released;

[0012] A file configuration response carrying indication information is sent to the terminal, where the indication information is used to indicate that the file configuration is completed.

[0013] In a possible implementation, based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain the general program file of the front-end project, including:

[0014] Based on the file configuration request, obtaining a pre-configured general packaging instruction;

[0015] Based on the general packaging instruction, the general configuration file is used to package and configure the initial program file to obtain a general program file for the front-end project.

[0016] In a possible implementation, obtaining the target program file of the front-end project based on the pre-configured request address configuration file corresponding to the program environment to which the front-end project belongs and the general program file includes:

[0017] The request address configuration file is added into the general program file to obtain the target program file of the front-end project.

[0018] In a possible implementation, the general program file includes an entry file and a static file;

[0019] In the directory structure of the target program file, the directory level of the request address configuration file, the directory level of the entry file, and the directory level of the static file are the same.

[0020] In a possible implementation, the request address configuration file includes a correspondence between address parameters in the initial program file and address parameters of an IP address corresponding to a corresponding program environment.

[0021] In one possible implementation, the method further includes:

[0022] Obtaining an IP address modification request corresponding to the corresponding program environment; the IP address modification request includes a new IP address;

[0023] The IP address in the request address configuration file is modified to the new IP address.

[0024] In a second aspect, a file configuration device is provided, the device is applied in servers corresponding to different program environments, and the device may include: a receiving unit, a configuration unit, an acquisition unit, and a sending unit;

[0025] The receiving unit is used to receive a file configuration request sent by the terminal, wherein the file configuration request includes an initial program file of the front-end project and a pre-configured general configuration file; the general configuration file is used to execute the same packaging configuration process for program files applying different program environments;

[0026] The configuration unit is used to package and configure the initial program file based on the file configuration request and adopt the general configuration file to obtain the general program file of the front-end project;

[0027] The acquisition unit is used to acquire the target program file of the front-end project according to the pre-configured request address configuration file corresponding to the program environment to which it belongs and the general program file; the request address configuration file includes an IP address corresponding to the corresponding program environment, and the target program file is a program file of a version to be released;

[0028] The sending unit is used to send a file configuration response carrying indication information to the terminal, where the indication information is used to indicate that the file configuration is completed.

[0029] In a possible implementation, the acquisition unit is further configured to acquire a pre-configured general packaging instruction based on the file configuration request;

[0030] The configuration unit is specifically used to package and configure the initial program file based on the general packaging instruction and using the general configuration file to obtain the general program file of the front-end project.

[0031] In a possible implementation, the acquisition unit is specifically configured to add the request address configuration file into the general program file to obtain the target program file of the front-end project.

[0032] In a possible implementation, the general program file includes an entry file and a static file;

[0033] In the directory structure of the target program file, the directory level of the request address configuration file, the directory level of the entry file, and the directory level of the static file are the same.

[0034] In a possible implementation, the request address configuration file includes a correspondence between address parameters in the initial program file and address parameters of an IP address corresponding to a corresponding program environment.

[0035] In a possible implementation, the apparatus further includes a modification unit;

[0036] The acquisition unit is further used to acquire an IP address modification request corresponding to the corresponding program environment; the IP address modification request includes a new IP address;

[0037] The modifying unit is used to modify the IP address in the request address configuration file to the new IP address.

[0038] In a third aspect, a file configuration device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:

[0039] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform any method step described in the first aspect above.

[0040] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0041] In a fifth aspect, a computer program product is provided. When the computer program product is called and executed by a file configuration device, the file configuration device can execute any method step described in the first aspect.

[0042] The file configuration method provided by the embodiment of the present invention is applied in the server corresponding to different program environments, including: receiving a file configuration request sent by a terminal, the file configuration request includes the initial program file of the front-end project and a pre-configured general configuration file; the general configuration file is used to execute the same packaging configuration process for program files of different program environments; based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain the general program file of the front-end project; according to the pre-configured request address configuration file and the general program file corresponding to the program environment to which it belongs, the target program file of the front-end project is obtained; the request address configuration file includes the IP address corresponding to the corresponding program environment, and the target program file is the program file of the version to be released; and a file configuration response carrying indication information is sent to the terminal, and the indication information is used to indicate that the file configuration is completed. This method improves the development efficiency and project maintenance strength of the front-end project. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 A system architecture diagram of an application file configuration method provided by an embodiment of the present invention;

[0044] Figure 2 A flowchart of a file configuration method provided by an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of the structure of a file configuration device provided by an embodiment of the present invention;

[0046] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] For ease of understanding, the terms involved in the embodiments of the present invention are explained below:

[0049] The program environment may include: test environment, quasi-production environment, grayscale environment, production environment, etc. Among them:

[0050] Production environment: referred to as pro environment, an environment for external users, a formal environment that can be accessed by connecting to the Internet.

[0051] Grayscale environment: referred to as pre environment, which is accessible to external users, but the server configuration is relatively low, and the rest is the same as the production environment.

[0052] Test environment: referred to as test environment, which is inaccessible to external users and is specifically used by testers. The version is relatively stable.

[0053] Development environment: referred to as dev environment, which is inaccessible to external users and is used by developers. The version of program files changes greatly.

[0054] The file configuration method provided by the embodiment of the present invention can be applied to Figure 1 In the system architecture shown, the system may include: servers and terminals corresponding to different program environments. The servers are in communication connection with the terminals.

[0055] The server may be an application server or a cloud server. It may include, for example, a test environment server, a quasi-production environment server, a grayscale environment server, and a production environment server. The terminal may be a user equipment (UE) such as a mobile phone with a display screen, a smart phone, a laptop, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device or other processing device connected to a wireless modem, a mobile station (MS), a mobile terminal, etc.

[0056] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention. In addition, the embodiments in the present application and the features in the embodiments may be combined with each other if there is no conflict.

[0057] The file configuration method provided in the embodiment of the present invention can be applied to servers corresponding to different program environments, and is described in detail below using a server as an example.

[0058] Figure 2 A flowchart of a file configuration method provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method may include:

[0059] Step 210: Receive a file configuration request sent by a terminal.

[0060] The current server receives a file configuration request sent by the terminal. The file configuration request may include the initial program file of the front-end project, that is, the page display code, and a pre-configured general configuration file; the general configuration file is used to perform the same packaging configuration process on program files of different application program environments.

[0061] Optionally, the file configuration request may also include a pre-configured general packaging instruction, which may be a pre-configured packaging configuration command, such as an npm run build program command.

[0062] The universal configuration file can be a webpack configuration file. What is different from the webpack configuration file in the prior art is that the webpack configuration file in the embodiment of the present application does not contain API request addresses of different program environments, that is, it does not include IP addresses or domain names corresponding to different program environments, and includes a unified packaging configuration process corresponding to different program environments.

[0063] In some examples, the file configuration request may not include a pre-configured general packaging instruction. After the server receives the file configuration request, the general packaging instruction may prompt the technician to manually input the pre-configured general packaging instruction into the server so that the server obtains the general packaging instruction; alternatively, the general packaging instruction may be pre-stored in the server and the acquisition may be triggered by the file configuration request sent by the terminal, etc. The embodiment of the present invention does not limit the manner in which the server obtains the pre-configured general packaging instruction.

[0064] Step 220: Based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain a general program file of the front-end project.

[0065] The current server obtains a pre-configured general packaging instruction based on the file configuration request;

[0066] In a specific implementation, if the file configuration request includes a pre-configured general packaging instruction, the current server parses the file configuration request and directly obtains the general packaging instruction;

[0067] If the pre-configured general packaging instruction is pre-stored in the current server, the current server reads the general packaging instruction from its own memory to obtain the general packaging instruction;

[0068] If the pre-configured universal packaging instruction is not in the server or the file configuration request, the current server outputs a file configuration prompt to instruct the technician to manually input the universal packaging instruction to obtain the universal packaging instruction.

[0069] Furthermore, the current server uses a common configuration file based on the common packaging instruction to package and configure the initial program file to obtain a common program file of the front-end project.

[0070] In the specific implementation, the current server starts the file packaging configuration process based on the general packaging instruction, and then uses the unified packaging configuration process in the general configuration file to package and configure the initial program file to obtain the general program file of the front-end project, that is, the dist package of the initial version to be released.

[0071] Among them, the general program files may include entry files, such as index.html files, and static files, such as static files.

[0072] The entry file is the file for accessing the front-end project homepage, and the static file is the file that stores all the resources required for front-end project development, such as JavaScript, fonts, and images.

[0073] In the directory structure of common program files, the directory level of the entry file is the same as the directory level of the static file.

[0074] From this, we can conclude that the same front-end project has the same dist package after being packaged and configured in servers in different program environments, which makes it convenient for technical personnel to conduct vulnerability investigations on the dist packages and / or packaging configuration process codes corresponding to different program environments, thereby improving the development efficiency and project maintenance efforts of the front-end project.

[0075] Step 230: Obtain the target program file of the front-end project according to the pre-configured request address configuration file and the common program file corresponding to the program environment to which the front-end project belongs.

[0076] The request address configuration file corresponding to the program environment to which the current server is pre-configured. The request address configuration file can be a custom file, such as a config.js file.

[0077] The request address configuration file may include an IP address corresponding to a corresponding program environment to which the current server belongs, so the API request address of the corresponding program environment is stored and maintained by the request address configuration file.

[0078] Furthermore, in order to associate and match the request address configuration file with the initial program file of the front-end project, it is necessary to ensure that the address parameters in the initial program file of the front-end project are the same as the address parameters corresponding to the IP address in the request address configuration file. In other words, the request address configuration file includes the correspondence between the address parameters in the initial program file and the address parameters of the IP address corresponding to the corresponding program environment.

[0079] The current server can add the request address configuration file into the general program file to obtain the target program file of the front-end project. In this way, the current server adds the IP address corresponding to the corresponding program environment in the request address configuration file into the general program file to obtain the program file of the version to be released, and then the current server deploys the front-end project.

[0080] Among them, in the directory structure of the target program file, the directory level of the request address configuration file, the directory level of the entry file, and the directory level of the static file are the same.

[0081] Step 240: Send a file configuration response carrying indication information indicating that the file configuration is completed to the terminal.

[0082] In a possible implementation, if it is necessary to modify the API request address of the corresponding program environment, that is, to modify the IP address corresponding to the corresponding program environment, according to business requirements, the current server obtains an IP address modification request corresponding to the corresponding program environment, and the IP address modification request includes a new IP address;

[0083] Change the IP address in the request address configuration file to the new IP address, and then deploy the front-end project.

[0084] In the prior art, if the API request address of the corresponding program environment needs to be modified according to business needs, the IP address corresponding to the corresponding program environment in the front-end webpack file needs to be modified, that is, the program code in the front-end webpack file needs to be modified, and then the configuration needs to be repackaged, which is relatively cumbersome.

[0085] Compared with the prior art, the embodiment of the present invention does not need to modify the front-end webpack file, but only needs to modify the IP address in the request address configuration file in the current server. There is no need to re-execute the packaging configuration, which provides convenience for project maintenance and iteration.

[0086] The file configuration method provided by the embodiment of the present invention is applied in the server corresponding to different program environments, including: receiving a file configuration request sent by a terminal, the file configuration request includes the initial program file of the front-end project and a pre-configured general configuration file; the general configuration file is used to execute the same packaging configuration process for program files of different program environments; based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain the general program file of the front-end project; according to the pre-configured request address configuration file and the general program file corresponding to the program environment to which it belongs, the target program file of the front-end project is obtained; the request address configuration file includes the IP address corresponding to the corresponding program environment, and the target program file is the program file of the version to be released; and a file configuration response carrying indication information is sent to the terminal, and the indication information is used to indicate that the file configuration is completed. This method improves the development efficiency and project maintenance strength of the front-end project.

[0087] Corresponding to the above method, an embodiment of the present invention further provides a file configuration device, which is applied in servers corresponding to different program environments, such as Figure 3 As shown, the file configuration device includes: a receiving unit 310, a configuration unit 320, an acquisition unit 330 and a sending unit 340;

[0088] The receiving unit 310 is used to receive a file configuration request sent by a terminal, wherein the file configuration request includes an initial program file of a front-end project and a pre-configured common configuration file; the common configuration file is used to execute the same packaging configuration process for program files of different application program environments;

[0089] A configuration unit 320 is used to package and configure the initial program file based on the file configuration request and adopt the general configuration file to obtain a general program file of the front-end project;

[0090] The acquisition unit 330 is used to acquire the target program file of the front-end project according to the pre-configured request address configuration file corresponding to the program environment to which the front-end project belongs and the general program file; the request address configuration file includes an IP address corresponding to the corresponding program environment, and the target program file is a program file of a version to be released;

[0091] The sending unit 340 is used to send a file configuration response carrying indication information to the terminal, where the indication information is used to indicate that the file configuration is completed.

[0092] In a possible implementation, the acquisition unit 330 is further configured to acquire a pre-configured general packaging instruction based on the file configuration request;

[0093] The configuration unit 320 is specifically configured to package and configure the initial program file based on the general packaging instruction and using the general configuration file to obtain a general program file of the front-end project.

[0094] In a possible implementation, the acquisition unit 330 is specifically configured to add the request address configuration file into the general program file to obtain the target program file of the front-end project.

[0095] In a possible implementation, the general program file includes an entry file and a static file;

[0096] In the directory structure of the target program file, the directory level of the request address configuration file, the directory level of the entry file, and the directory level of the static file are the same.

[0097] In a possible implementation, the request address configuration file includes a correspondence between address parameters in the initial program file and address parameters of an IP address corresponding to a corresponding program environment.

[0098] In a possible implementation, the apparatus further includes a modification unit 350;

[0099] The acquisition unit 330 is further configured to acquire an IP address modification request corresponding to the corresponding program environment; the IP address modification request includes a new IP address;

[0100] The modifying unit 350 is used to modify the IP address in the request address configuration file to the new IP address.

[0101] The functions of the functional units of the file configuration device provided in the above embodiment of the present invention can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the file configuration device provided in the embodiment of the present invention are not repeated here.

[0102] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, it includes a processor 410 , a communication interface 420 , a memory 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other via the communication bus 440 .

[0103] Memory 430, for storing computer programs;

[0104] The processor 410 is used to execute the program stored in the memory 430 to implement the following steps:

[0105] A file configuration request sent by a receiving terminal includes an initial program file of a front-end project and a pre-configured general configuration file; the general configuration file is used to execute the same packaging configuration process for program files of different application program environments;

[0106] Based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain a general program file of the front-end project;

[0107] According to the pre-configured request address configuration file corresponding to the program environment to which it belongs and the general program file, the target program file of the front-end project is obtained; the request address configuration file includes the IP address corresponding to the corresponding program environment, and the target program file is the program file of the version to be released;

[0108] A file configuration response carrying indication information is sent to the terminal, where the indication information is used to indicate that the file configuration is completed.

[0109] In a possible implementation, based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain the general program file of the front-end project, including:

[0110] Based on the file configuration request, obtaining a pre-configured general packaging instruction;

[0111] Based on the general packaging instruction, the general configuration file is used to package and configure the initial program file to obtain a general program file for the front-end project.

[0112] In a possible implementation, obtaining the target program file of the front-end project based on the pre-configured request address configuration file corresponding to the program environment to which the front-end project belongs and the general program file includes:

[0113] The request address configuration file is added into the general program file to obtain the target program file of the front-end project.

[0114] In a possible implementation, the general program file includes an entry file and a static file;

[0115] In the directory structure of the target program file, the directory level of the request address configuration file, the directory level of the entry file, and the directory level of the static file are the same.

[0116] In a possible implementation, the request address configuration file includes a correspondence between address parameters in the initial program file and address parameters of an IP address corresponding to a corresponding program environment.

[0117] In one possible implementation, the method further includes:

[0118] Obtaining an IP address modification request corresponding to the corresponding program environment; the IP address modification request includes a new IP address;

[0119] The IP address in the request address configuration file is modified to the new IP address.

[0120] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0121] The communication interface is used for communication between the above electronic device and other devices.

[0122] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0123] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0124] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 2 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present invention are not repeated here.

[0125] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the file configuration method described in any one of the above embodiments.

[0126] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the file configuration method described in any one of the above embodiments.

[0127] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0128] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.

[0131] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0132] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.

Claims

1. A file configuration method, characterized in that: The method is applied in servers corresponding to different program environments, and the method includes: A file configuration request sent by a receiving terminal includes an initial program file of a front-end project and a pre-configured general configuration file; the general configuration file is used to execute the same packaging configuration process for program files of different application program environments; Based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain a general program file of the front-end project; According to the pre-configured request address configuration file corresponding to the program environment to which the front-end project belongs and the general program file, the target program file of the front-end project is obtained, including: adding the request address configuration file into the general program file to obtain the target program file of the front-end project; the request address configuration file includes the IP address corresponding to the corresponding program environment, and the corresponding relationship between the address parameters in the initial program file and the address parameters of the IP address corresponding to the corresponding program environment, and the target program file is the program file of the version to be released; Sending a file configuration response carrying indication information to the terminal, where the indication information is used to indicate that the file configuration is completed; The method further comprises: Obtaining an IP address modification request corresponding to the corresponding program environment; the IP address modification request includes a new IP address; The IP address in the request address configuration file is modified to the new IP address.

2. The method according to claim 1, characterized in that Based on the file configuration request, the general configuration file is used to package and configure the initial program file to obtain the general program file of the front-end project, including: Based on the file configuration request, obtaining a pre-configured general packaging instruction; Based on the general packaging instruction, the general configuration file is used to package and configure the initial program file to obtain a general program file for the front-end project.

3. The method according to claim 1, characterized in that The general program files include entry files and static files; In the directory structure of the target program file, the directory level of the request address configuration file, the directory level of the entry file, and the directory level of the static file are the same.

4. A file configuration device, characterized in that: The device is applied in servers corresponding to different program environments, and comprises: a receiving unit, a configuration unit, an acquisition unit and a sending unit; The receiving unit is used to receive a file configuration request sent by the terminal, wherein the file configuration request includes an initial program file of the front-end project and a pre-configured general configuration file; the general configuration file is used to execute the same packaging configuration process for program files applying different program environments; The configuration unit is used to package and configure the initial program file based on the file configuration request and adopt the general configuration file to obtain the general program file of the front-end project; The acquisition unit is used to acquire the target program file of the front-end project according to the pre-configured request address configuration file corresponding to the program environment to which it belongs and the general program file; the request address configuration file includes the IP address corresponding to the corresponding program environment, and the corresponding relationship between the address parameters in the initial program file and the address parameters of the IP address corresponding to the corresponding program environment, and the target program file is the program file of the version to be released; The acquisition unit is specifically used to add the request address configuration file into the general program file to obtain the target program file of the front-end project; The sending unit is used to send a file configuration response carrying indication information to the terminal, where the indication information is used to indicate that the file configuration is completed; The device also includes a modification unit; The acquisition unit is further used to acquire an IP address modification request corresponding to the corresponding program environment; the IP address modification request includes a new IP address; The modifying unit is used to modify the IP address in the request address configuration file to the new IP address.

5. A file configuration device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 3 are implemented.

7. A computer program product, characterized in that When the computer program product is called and executed by a file configuration device, the file configuration device can execute the method steps described in any one of claims 1 to 3.