CN115599748A - Constant file management method and device - Google Patents

Constant file management method and device Download PDF

Info

Publication number
CN115599748A
CN115599748A CN202110774226.7A CN202110774226A CN115599748A CN 115599748 A CN115599748 A CN 115599748A CN 202110774226 A CN202110774226 A CN 202110774226A CN 115599748 A CN115599748 A CN 115599748A
Authority
CN
China
Prior art keywords
information
file
configuration
constant
static resource
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
CN202110774226.7A
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202110774226.7A priority Critical patent/CN115599748A/en
Publication of CN115599748A publication Critical patent/CN115599748A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • 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/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a management method and a device of a constant file, wherein the management method of the constant file receives a management instruction of the constant file to be managed; determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generating prompt information; the prompt information is used for indicating a user to input the required operation information; then, receiving feedback information aiming at the prompt information; wherein the feedback information is the required operation information input by the user; and finally, processing the constant file to be managed according to the feedback information, so that manual operation is avoided, the possibility of misoperation is reduced, manual adjustment of local codes in the prior art is not needed, and the constant file to be managed is subjected to a series of processes of testing, acceptance and online, so that the management efficiency is improved.

Description

Constant file management method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for managing constant files.
Background
The constant file is a js file at the front end and is used for storing some data which cannot be changed frequently, wherein js refers to an extension of a JavaScript language file.
At present, each time a constant file has a part of files or constant adjustment, a business department needs to provide requirements for a product department, local codes are adjusted through evaluation of the product department and a development department, and then the local codes are tested, accepted and checked, and online.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for managing constant files, which can directly manage and maintain the constant files, and do not need to manually adjust local codes, and then perform testing, acceptance and online processes, so that the efficiency is improved, and meanwhile, the possibility of misoperation is reduced.
A first aspect of the present application provides a method for managing cache data, including:
receiving a management instruction of a constant file to be managed;
determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generating prompt information; the prompt information is used for indicating a user to input the required operation information;
receiving feedback information aiming at the prompt information; wherein the feedback information is the required operation information input by the user;
and processing the constant file to be managed according to the feedback information.
Optionally, the file type is a project file; the management type information is newly added information, the required operation information is determined according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and prompt information is generated, and the method includes:
inquiring operation information required when newly adding information to the project file in the system, and generating prompt information; the required operation information is the project name, the project introduction, the environment configuration of the project and the configuration file of the project file of the newly added information;
wherein, the processing the constant file to be managed according to the feedback information includes:
generating a newly added project file according to the project name, the project introduction, the environment configuration of the project and the configuration file of the newly added project file;
and saving the newly added project file to a project list.
Optionally, the constant file is a project file; the management type information is information for modifying a project file, the required operation information is determined according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and prompt information is generated, and the method includes:
inquiring operation information required when the information of the project file is modified for the project file in the system, and generating prompt information; the required operation information is the project name of the project file to be modified, the project information to be modified and modification information;
wherein, the processing the constant file to be managed according to the feedback information includes:
selecting the project files to be modified according to the project names of the project files to be modified;
modifying the project information to be modified according to the modification information to obtain a modified project file;
and saving the modified project file to the project list.
Optionally, the constant file is configured for an environment; the method for generating the prompt information includes that the management type information is configuration information configured for a newly added environment, the required operation information is determined according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and the method includes:
inquiring operation information required when configuration information for newly adding environment configuration is inquired in the system, and generating prompt information; the required operation information is environment identification, environment name and environment introduction configured by the newly added environment;
wherein, the processing the constant file to be managed according to the feedback information includes:
generating a newly added environment configuration according to the environment identifier, the environment name and the environment introduction of the newly added environment configuration;
and saving the newly added environment configuration to an environment list.
Optionally, the determining, by the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, the required operation information and generating the prompt information includes:
inquiring operation information required when the information for modifying the environment configuration for the environment configuration is inquired in the system, and generating prompt information; the information for modifying the environment configuration comprises an environment name of the environment configuration to be modified, configuration information to be modified and modification information;
wherein, the processing the constant file to be managed according to the feedback information includes:
selecting the environment configuration to be modified according to the environment name of the environment configuration to be modified;
modifying the configuration information to be modified according to the modification information to obtain modified environment configuration;
saving the modified environment configuration to the environment list.
Optionally, the determining the required operation information and generating the prompt information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed includes:
inquiring operation information required when newly adding configuration information on the first target static resource file in the system, and generating prompt information; the required operation information comprises an attribute type, an attribute key value, an attribute corresponding value, an affiliated project file and an affiliated environment configuration of a newly added attribute;
wherein, the processing the constant file to be managed according to the feedback information includes:
reading the first target static resource file;
adding the newly added attribute to the first target static resource file to obtain a newly added static resource file;
uploading the newly added static resource file to the static resource server, and recording the address information of the newly added static resource file in the static resource server;
and associating the address information with the project file to which the added attribute belongs and the environment configuration to which the added attribute belongs.
Optionally, the management type information is information for modifying a configuration in a second target static resource file; the determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed and generating prompt information includes:
inquiring operation information required by information for modifying the configuration in the second target static resource file in the system, and generating prompt information; the required operation information is attribute key values of the configuration to be modified and modification target values of corresponding values of the attributes of the configuration to be modified;
wherein, the processing the constant file to be managed according to the feedback information includes:
acquiring address information of the second target static resource file;
reading the second target static resource file in the static resource server according to the address information, and analyzing the second target static resource file to obtain all data information of the second target static resource file;
according to the attribute key value of the configuration to be modified, finding the configuration to be modified in all data information of the second target static resource file, and setting the configuration to be modified into an editable state;
and modifying the attribute corresponding value of the configuration to be modified into the modification target value to obtain a modified second target static resource file.
Optionally, the step of determining required operation information and generating prompt information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, where the management type information is information configured to synchronize the static resource file to be synchronized to a target environment, includes:
acquiring address information of the static resource file to be synchronized;
reading the static resource file to be synchronized in the static resource server according to the address information, and analyzing the static resource file to be synchronized to obtain all data information of the static resource file to be synchronized;
and synchronizing all data information of the static resource files to be synchronized to the target environment configuration.
Optionally, the deleting the configuration in the third target static resource file is performed by the management type information, and the processing the constant file to be managed according to the operation information for the constant file to be managed includes:
inquiring operation information required when the information for deleting the configuration in the third target static resource file is inquired in the system, and generating prompt information; the required operation information is an attribute key value of the information to be deleted;
wherein, the processing the constant file to be managed according to the feedback information includes:
inquiring in the third target static resource file according to the attribute key value of the information to be deleted to obtain the information to be deleted;
and deleting the information to be deleted.
A second aspect of the present application provides a constant file management apparatus, including:
the first receiving unit is used for receiving a management instruction of the constant file to be managed;
the generating unit is used for determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generating prompt information; the prompt information is used for indicating a user to input the required operation information;
a second receiving unit, configured to receive feedback information for the prompt information; wherein the feedback information is the required operation information input by the user;
and the processing unit is used for processing the constant file to be managed according to the feedback information.
Optionally, the file type is a project file; the management type information is newly added information, and the generating unit includes:
the first generation subunit is used for inquiring the operation information required when newly adding information to the project file in the system and generating prompt information; the required operation information is the project name, the project introduction, the environment configuration of the project and the configuration file of the project file of the newly added information;
wherein the processing unit comprises:
the first processing subunit is used for generating a newly added project file according to the project name, the project introduction, the environment configuration to which the project belongs and the configuration file of the newly added project file;
and the first storage unit is used for storing the newly added project file to a project list.
Optionally, the constant file is a project file; the management type information is information for modifying a project file, and the generating unit includes:
the second generation subunit is used for inquiring the operation information required when the information of the project file is modified for the project file in the system and generating the prompt information; the required operation information is the project name of the project file to be modified, the project information to be modified and modification information;
wherein the processing unit comprises:
the first selection unit is used for selecting the project files to be modified according to the project names of the project files to be modified;
the first modification unit is used for modifying the project information to be modified according to the modification information to obtain a modified project file;
and the second storage unit is used for storing the modified project file to the project list.
Optionally, the constant file is configured as an environment; the constant file is configured for the environment; the management type information is configuration information configured for a newly added environment, and the generating unit includes:
the third generation subunit is used for inquiring the operation information required when the configuration information for newly adding the environment configuration is inquired in the system and generating the prompt information; the required operation information is environment identification, environment name and environment introduction configured by the newly added environment;
wherein the processing unit comprises:
the second processing subunit is used for generating the newly added environment configuration according to the environment identifier, the environment name and the environment introduction of the newly added environment configuration;
and the third storage unit is used for storing the newly added environment configuration to the environment list.
Optionally, the constant file is configured to be an environment, the management type information is information for modifying the environment configuration, and the generating unit includes:
the fourth generation subunit is used for inquiring the operation information required when the information for modifying the environment configuration is inquired in the system and generating the prompt information; the information for modifying the environment configuration comprises an environment name of the environment configuration to be modified, configuration information to be modified and modification information;
wherein the processing unit comprises:
the second selection unit is used for selecting the environment configuration to be modified according to the environment name of the environment configuration to be modified;
the second modification unit is used for modifying the configuration information to be modified according to the modification information to obtain modified environment configuration;
a fourth saving unit, configured to save the modified environment configuration to the environment list.
Optionally, the constant file is a static resource file, the static resource file is a file in the project file and uploaded to a static resource server, and the management type information is information for newly adding configuration to the first target static resource file, where the generating unit includes:
the fifth generating subunit is configured to query, in the system, operation information required when newly adding configuration information to the first target static resource file, and generate prompt information; the required operation information comprises attribute types, attribute key values, attribute corresponding values, belonged project files and belonged environment configuration of newly added attributes;
wherein the processing unit comprises:
a reading unit, configured to read the first target static resource file;
an adding unit, configured to add the new attribute to the first target static resource file to obtain a new static resource file;
the uploading unit is used for uploading the newly added static resource file to the static resource server and recording the address information of the newly added static resource file in the static resource server;
and the association unit is used for associating the address information with the project file to which the added attribute belongs and the environment configuration to which the added attribute belongs.
Optionally, the management type information is information for modifying a configuration in a second target static resource file; the generation unit includes:
a sixth generating subunit, configured to query, in the system, operation information required for information for modifying the configuration in the second target static resource file, and generate prompt information; the required operation information is attribute key values of the configuration to be modified and modification target values of corresponding values of the attributes of the configuration to be modified;
wherein the processing unit comprises:
a first obtaining unit, configured to obtain address information of the second target static resource file;
a first analyzing unit, configured to read the second target static resource file in the static resource server according to the address information, and analyze the second target static resource file to obtain all data information of the second target static resource file;
the setting unit is used for finding the configuration to be modified in all the data information of the second target static resource file according to the attribute key value of the configuration to be modified and setting the configuration to be modified into an editable state;
and the third modification unit is used for modifying the attribute corresponding value of the configuration to be modified into the modification target value to obtain a modified second target static resource file.
Optionally, the management type information is information for synchronizing a static resource file to be synchronized to a target environment configuration, and the processing unit includes:
the second acquisition unit is used for acquiring the address information of the static resource file to be synchronized;
a second analyzing unit, configured to read the static resource file to be synchronized in the static resource server according to the address information, and analyze the static resource file to be synchronized to obtain all data information of the static resource file to be synchronized;
and the synchronization unit is used for synchronizing all data information of the static resource files to be synchronized to the target environment configuration.
Optionally, the management type information is information for deleting a configuration in a third target static resource file, and the generating unit includes:
a seventh generating subunit, configured to query, in the system, operation information required when deleting the configuration in the third target static resource file, and generate prompt information; the required operation information is an attribute key value of the information to be deleted;
wherein the processing unit comprises:
the query unit is used for querying the third target static resource file according to the attribute key value of the information to be deleted to obtain the information to be deleted;
and the deleting unit is used for deleting the information to be deleted.
A third aspect of the present application provides a server comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for managing constant files according to any one of the first aspect.
A fourth aspect of the present application provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for managing constant files according to any one of the first aspects.
According to the scheme, the constant file management method and the constant file management device are provided, and the constant file management method comprises the steps of receiving a management instruction of a constant file to be managed; determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generating prompt information; the prompt information is used for indicating a user to input the required operation information; then, receiving feedback information aiming at the prompt information; wherein the feedback information is the required operation information input by the user; and finally, processing the constant file to be managed according to the feedback information, so that manual operation is avoided, the possibility of misoperation is reduced, manual adjustment of local codes in the prior art is not needed, and the constant file to be managed is subjected to a series of processes of testing, acceptance and online, so that the management efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a specific flowchart of a method for managing a constant file according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of an additional project file according to another embodiment of the present application;
FIG. 3 is a flow chart of modifying a project file according to another embodiment of the present application;
FIG. 4 is a flowchart illustrating a new add environment configuration according to another embodiment of the present application;
FIG. 5 is a flow chart of modifying an environment configuration according to another embodiment of the present application;
FIG. 6 is a flowchart illustrating configuration in a newly added target static resource file according to another embodiment of the present application;
FIG. 7 is a flowchart of modifying a configuration in a target static resource file according to another embodiment of the present application;
FIG. 8 is a flowchart illustrating a process for synchronizing a target static resource file to a target environment configuration according to another embodiment of the present application;
FIG. 9 is a flowchart illustrating a method for deleting information in a target static resource file according to another embodiment of the present application;
fig. 10 is a schematic diagram of a device for managing constant files according to another embodiment of the present application;
fig. 11 is a schematic diagram of a server implementing a constant file method according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first", "second", and the like in this application are only used for distinguishing different apparatuses, modules or units, and are not used for limiting the order or interdependence of functions performed by these apparatuses, modules or units, and the terms "include", or any other variants thereof are intended to cover non-exclusive inclusions, so that a process, a method, an article or a device including a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such a process, a method, an article or a device. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
An embodiment of the present application provides a method for managing a constant file, which specifically includes the following steps, as shown in fig. 1:
s101, receiving a management instruction of the constant file to be managed.
Wherein, the management instruction of the constant file to be managed comprises: the constant file to be managed may be a project file, an environment configuration file, or a static resource file, which is not limited herein.
It should be noted that the user may input the management instruction on the management page of the management system. The management system may be, but is not limited to, installed on iPad, pc, etc., and is not limited herein.
S102, according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, determining required operation information and generating prompt information.
The prompt information is used for indicating the user to input the required operation information.
And S103, receiving feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
And S104, processing the constant file to be managed according to the feedback information.
When the constant files to be managed are project files, the project files can be checked, searched, modified, newly added and the like. When the constant files to be managed are environment configuration, the environment configuration can be checked, searched, modified, newly added and the like. When the constant file to be managed is a static resource file, the static resource file can be checked, uploaded, downloaded, newly added with configuration, modified with configuration, synchronized, deleted with configuration, stored, and the address information of the static resource file can be checked.
It should be noted that different project files need to be established for different systems, so as to implement independent maintenance and management of each system. And different environment configurations are associated in the project files so as to realize the isolation of the environment configurations in the different project files. It is necessary to distinguish development environment configuration, test environment configuration, pre-development environment configuration, and production environment configuration, and to isolate the same test and pre-development environment configuration and update, manage, and maintain the files under the environment configuration when multiple functions are developed in parallel.
When the constant file to be managed is a project file, the management type information is added information, and an embodiment of the management method for the constant file, as shown in fig. 2, specifically includes:
s201, receiving a management instruction of the constant file to be managed.
S202, inquiring operation information required when newly adding information for the project file in the system, and generating prompt information.
The required operation information is the project name, the project introduction, the environment configuration of the project and the configuration file of the project file of the new information.
And S203, receiving feedback information aiming at the prompt information.
The feedback information is required operation information input by a user;
and S204, generating a newly added project file according to the project name, the project introduction, the environment configuration of the project and the configuration file of the newly added project file.
The manner of implementing step S204 may be, but is not limited to, generating a new project file from the configuration file according to a preset format, and labeling the new project file with a project name, a project introduction, and an environment configuration to which the project belongs, which is very diverse, and is not limited herein.
And S205, saving the newly added project file to a project list.
It should be noted that the saving operation here refers to generating a js or json file from all constants of the page of the newly added project file according to a certain format, then uploading the js or json file to the static resource server, and saving the generated file address.
When the constant file to be managed is a project file, the management type information is information for modifying the project file, and an embodiment of the management method for the constant file, as shown in fig. 3, specifically includes:
s301, receiving a management instruction of the constant file to be managed.
S302, operation information needed when the information of the project file is modified for the project file is inquired in the system, and prompt information is generated.
The required operation information is the project name of the project file to be modified, the project information to be modified and the modification information.
And S303, receiving feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
S304, selecting the project file to be modified according to the project name of the project file to be modified.
S305, modifying the project information to be modified according to the modification information to obtain a modified project file.
S306, saving the modified project file to a project list.
It should be noted that the saving operation here refers to generating a js or json file from all the constants of the page of the modified project file according to a certain format, then uploading the js or json file to the static resource server, and saving the generated file address.
When the constant file to be managed is configured to the environment, the management type information is configuration information configured to a newly added environment, and an embodiment of the method for managing the constant file, as shown in fig. 4, specifically includes:
s401, receiving a management instruction of the constant file to be managed.
S402, inquiring the operation information needed when the configuration information for newly adding the environment configuration is inquired in the system, and generating the prompt information.
The required operation information is the environment identification, the environment name and the environment introduction configured by the newly added environment.
And S403, receiving feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
S404, generating the newly added environment configuration according to the environment identifier, the environment name and the environment introduction of the newly added environment configuration.
S405, storing the newly added environment configuration to an environment list.
It should be noted that the saving operation here refers to generating a js or json file from all constants of the page to which the newly added environment configuration belongs according to a certain format, then uploading the js or json file to the static resource server, and saving the generated file address.
When the constant file to be managed is configured to the environment, the management type information is information for modifying the environment configuration, and as shown in fig. 5, an embodiment of the constant file management method specifically includes:
and S501, receiving a management instruction of the constant file to be managed.
S502, inquiring operation information required when the information for modifying the environment configuration is inquired in the system, and generating prompt information.
The information for modifying the environment configuration comprises an environment name of the environment configuration to be modified, configuration information to be modified and modification information.
S503, receiving feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
S504, selecting the environment configuration to be modified according to the environment name of the environment configuration to be modified.
And S505, modifying the configuration information to be modified according to the modification information to obtain the modified environment configuration.
S506, saving the modified environment configuration to an environment list.
It should be noted that the saving operation here refers to generating a js or json file from all the constants of the page to which the modified environment configuration belongs according to a certain format, then uploading the js or json file to the static resource server, and saving the generated file address.
When the constant files to be managed are static resource files, the existing static resource files in the existing project can be uploaded to a static resource server for maintenance, so that manual entry is avoided, and labor cost is increased.
Because some static resource files between different terminals (a PC, a mobile terminal, an APP, an applet and the like) of the same service line can be reused, the static resource files can be downloaded and then imported into another project, and different parts of data can be changed, so that repeated manual entry operation can be avoided.
Different environments correspond to a configuration file, namely environment configuration, after the environment configuration is selected, the configuration file can be clicked to enter file details, file address information can also be selected to be checked, and address copying information is copied into items for reference.
When the constant file to be managed is a static resource file, the static resource file is a file in the project file and uploaded to the static resource server, the management type information is information for newly configuring the first target static resource file, and an embodiment of the management method for the constant file specifically includes, as shown in fig. 6:
s601, receiving a management instruction of the constant file to be managed.
S602, operation information required when newly adding configuration information to the first target static resource file is inquired in the system, and prompt information is generated.
The required operation information includes attribute type, attribute key value, attribute corresponding value, belonged project file and belonged environment configuration of the newly added attribute.
And S603, receiving feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
S604, reading the first target static resource file.
And S605, adding a new attribute in the first target static resource file to obtain a new added static resource file.
The attribute types include, but are not limited to int, string, borolean, object, list, etc., and are not limited herein.
It should be noted that the newly added static resource file is a js file as in the first target static resource file.
S606, uploading the newly added static resource file to a static resource server, and recording the address information of the newly added static resource file in the static resource server.
S607, the address information is associated with the project file to which the added attribute belongs and the environment configuration to which the added attribute belongs.
It should be noted that after the address information is associated with the project file to which the added attribute belongs and the environment configuration to which the added attribute belongs, the information that needs to be associated is uploaded to the static resource server, and the generated file address is saved.
After the project is on line, operating and modifying certain static resource constants at the later stage, and directly modifying the resource constants in the development stage; when a user edits a page entering a modified configuration, all constants are not changeable, a modified button is arranged behind each constant, and only when the user clicks the modified button of a certain constant, the text box of the constant can be changed into an editable state, so that the risk caused by misoperation of the user is reduced. Therefore, when the constant file to be managed is a static resource file, the management type information is information for modifying the configuration in the second target static resource file, and an embodiment of the management method for the constant file, as shown in fig. 7, specifically includes:
s701, receiving a management instruction of the constant file to be managed.
S702, operation information required by the information for modifying the configuration in the second target static resource file is inquired in the system, and prompt information is generated.
The required operation information is an attribute key value of the configuration to be modified and a modification target value of a corresponding value of the attribute of the configuration to be modified.
And S703, receiving feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
S704, address information of the second target static resource file is obtained.
S705, reading the second target static resource file in the static resource server according to the address information, and analyzing the second target static resource file to obtain all data information of the second target static resource file.
S706, finding the configuration to be modified in all the data information of the second target static resource file according to the attribute key value of the configuration to be modified, and setting the configuration to be modified to be in an editable state.
S707, modifying the attribute corresponding value of the configuration to be modified into a modification target value to obtain a modified second target static resource file.
It should be noted that after the modified second target static resource file is obtained, the modified second target static resource file is also uploaded to the static resource server, and the file address of the modified second target static resource file is saved.
When the constant file to be managed is a static resource file, the operation information for the constant file to be managed is information for synchronizing the static resource file to be synchronized to the target environment configuration, and an implementation manner of step S104, as shown in fig. 8, specifically includes:
s801, obtaining address information of the static resource file to be synchronized.
S802, reading the static resource file to be synchronized in the static resource server according to the address information, and analyzing the static resource file to be synchronized to obtain all data information of the static resource file to be synchronized.
And S803, synchronizing all data information of the static resource file to be synchronized to the target environment configuration.
It should be noted that, all data information of the static resource files to be synchronized is synchronized to the selected target environment configuration, and the static resource files configured in the target environment are covered, so that the configuration files are synchronized at different project nodes in the same project, and bugs generated due to different configuration files are avoided.
When the constant file to be managed is a static resource file, the management type information is information for deleting the configuration in the third target static resource file, and an embodiment of the management method for the constant file, as shown in fig. 9, specifically includes:
s901, receiving a management instruction of the constant file to be managed.
S902, operation information needed when the information for deleting the configuration in the third target static resource file is inquired in the system, and prompt information is generated.
The required operation information is an attribute key value of the information to be deleted.
And S903, receiving feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
And S904, inquiring the third target static resource file according to the attribute key value of the information to be deleted to obtain the information to be deleted.
And S905, deleting the information to be deleted.
According to the scheme, the constant file management method comprises the following steps: after receiving a management instruction of a constant file to be managed; determining required operation information according to management type information in a management instruction of the constant file to be managed and the file type of the constant file to be managed, and generating prompt information; the prompt information is used for indicating a user to input required operation information; then, receiving feedback information aiming at the prompt information; the feedback information is required operation information input by a user; and finally, the constant files to be managed are processed according to the feedback information, so that manual operation is avoided, the possibility of misoperation is reduced, the local codes do not need to be adjusted manually in the prior art, and then the constant files are tested, accepted and uploaded, so that the management efficiency is improved.
Another embodiment of the present application provides a management apparatus for a constant file, as shown in fig. 10, specifically including:
the first receiving unit 1001 is configured to receive a management instruction of a constant file to be managed.
The generating unit 1002 is configured to determine required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generate prompt information.
The prompt information is used for indicating the user to input the required operation information.
A second receiving unit 1003, configured to receive feedback information for the hint information.
The feedback information is the required operation information input by the user.
And the processing unit 1004 is configured to process the constant file to be managed according to the feedback information.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 1, which is not described herein again.
Optionally, in another embodiment of the present application, the constant file is a project file; the management type information is newly added information, and one embodiment of the management device of the constant file comprises the following steps:
the first receiving unit is used for receiving a management instruction of the constant file to be managed.
The first generating subunit is used for inquiring the operation information required when newly adding information to the project file in the system and generating the prompt information.
The required operation information is the project name, the project introduction, the environment configuration of the project and the configuration file of the project file of the new information.
And the second receiving unit is used for receiving the feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
And the first processing subunit is used for generating the newly added project file according to the project name, the project introduction, the environment configuration to which the project belongs and the configuration file of the newly added project file.
And the first saving unit is used for saving the newly added project file to the project list.
For the specific working process of the units disclosed in the above embodiments of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 2, which is not described herein again.
Optionally, in another embodiment of the present application, the constant file is a project file; the management type information is information for modifying the project file, and one embodiment of the management device of the constant file comprises the following steps:
the first receiving unit is used for receiving a management instruction of the constant file to be managed.
And the second generation subunit is used for inquiring the operation information required when the information of the project file is modified for the project file in the system and generating the prompt information.
The required operation information is the project name of the project file to be modified, the project information to be modified and the modification information.
And the second receiving unit is used for receiving the feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
The first selection unit is used for selecting the project file to be modified according to the project name of the project file to be modified.
And the first modification unit is used for modifying the project information to be modified according to the modification information to obtain a modified project file.
And the second saving unit is used for saving the modified project file to the project list.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 3, which is not described herein again.
Optionally, in another embodiment of the present application, the constant file is configured as an environment; the management type information is configuration information configured for a new adding environment, and one embodiment of the management device for the constant file comprises the following steps:
the first receiving unit is used for receiving a management instruction of the constant file to be managed.
And the third generation subunit is used for inquiring the operation information required when the configuration information for newly adding the environment configuration is inquired in the system and generating the prompt information.
The required operation information is environment identification, environment name and environment profile configured by the newly added environment.
The prompt information is used for indicating the user to input the required operation information.
And the second receiving unit is used for receiving the feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
And the second processing subunit is used for generating the newly added environment configuration according to the environment identifier, the environment name and the environment introduction of the newly added environment configuration.
And the third storage unit is used for storing the configuration of the newly added environment to the environment list.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 4, which is not described herein again.
Optionally, in another embodiment of the present application, the constant file is an environment configuration, the management type information is information for modifying the environment configuration, and an implementation manner of the management apparatus for the constant file includes:
the first receiving unit is used for receiving a management instruction of the constant file to be managed.
And the fourth generation subunit is used for inquiring the operation information required when the information for modifying the environment configuration is carried out on the environment configuration in the system and generating the prompt information.
The information for modifying the environment configuration comprises an environment name of the environment configuration to be modified, configuration information to be modified and modification information.
And the second receiving unit is used for receiving the feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
And the second selection unit is used for selecting the environment configuration to be modified according to the environment name of the environment configuration to be modified.
And the second modification unit is used for modifying the configuration information to be modified according to the modification information to obtain the modified environment configuration.
And the fourth saving unit is used for saving the modified environment configuration to the environment list.
For the specific working process of the units disclosed in the above embodiments of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 5, which is not described herein again.
Optionally, in another embodiment of the present application, the constant file is a static resource file, the static resource file is a file in the project file and uploaded to the static resource server, the management type information is information for newly configuring the first target static resource file, and an implementation manner of the management apparatus for the constant file includes:
the first receiving unit is used for receiving a management instruction of the constant file to be managed.
And the fifth generating subunit is used for inquiring the operation information required when newly adding configuration information is carried out on the first target static resource file in the system and generating the prompt information.
The required operation information includes attribute type, attribute key value, attribute corresponding value, belonging project file and belonging environment configuration of the newly added attribute.
And the second receiving unit is used for receiving the feedback information aiming at the prompt information.
The feedback information is required operation information input by a user.
And the reading unit is used for reading the first target static resource file.
And the adding unit is used for adding the added attribute in the first target static resource file to obtain the added static resource file.
And the uploading unit is used for uploading the newly added static resource file to the static resource server and recording the address information of the newly added static resource file in the static resource server.
And the association unit is used for associating the address information with the project file to which the added attribute belongs and the environment configuration to which the added attribute belongs.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 6, which is not described herein again.
Optionally, in another embodiment of the present application, the management type information is information for modifying a configuration in the second target static resource file, and an implementation manner of the management apparatus for the constant file includes:
the first receiving unit is used for receiving a management instruction of the constant file to be managed.
And the sixth generating subunit is used for inquiring the operation information required by the information for modifying the configuration in the second target static resource file in the system and generating the prompt information.
The required operation information is an attribute key value of the configuration to be modified and a modification target value of a corresponding value of the attribute of the configuration to be modified.
And the second receiving unit is used for receiving the feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
And the first acquisition unit is used for acquiring the address information of the second target static resource file.
And the first analysis unit is used for reading the second target static resource file in the static resource server according to the address information and analyzing the second target static resource file to obtain all data information of the second target static resource file.
And the setting unit is used for finding the configuration to be modified in all the data information of the second target static resource file according to the attribute key value of the configuration to be modified and setting the configuration to be modified into an editable state.
And the third modification unit is used for modifying the attribute corresponding value of the configuration to be modified into a modification target value to obtain a modified second target static resource file.
For the specific working process of the units disclosed in the above embodiments of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 7, which is not described herein again.
Optionally, in another embodiment of the present application, for that the operation information of the constant file to be managed is information for synchronizing a static resource file to be synchronized to a target environment configuration, an implementation manner of the processing unit 1002 includes:
and the second acquisition unit is used for acquiring the address information of the static resource file to be synchronized.
And the second analysis unit is used for reading the static resource file to be synchronized in the static resource server according to the address information and analyzing the static resource file to be synchronized to obtain all data information of the static resource file to be synchronized.
And the synchronization unit is used for synchronizing all data information of the static resource files to be synchronized to the target environment configuration.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 8, which is not described herein again.
Optionally, in another embodiment of the present application, the management type information is information for deleting a configuration in the third target static resource file, and an implementation manner of the management apparatus for the constant file includes:
the first receiving unit is used for receiving a management instruction of the constant file to be managed.
And the seventh generating subunit is used for inquiring the operation information required when the information for deleting the configuration in the third target static resource file is inquired in the system and generating the prompt information.
The required operation information is an attribute key value of the information to be deleted.
And the second receiving unit is used for receiving the feedback information aiming at the prompt information.
The feedback information is the required operation information input by the user.
And the query unit is used for querying the third target static resource file according to the attribute key value of the information to be deleted to obtain the information to be deleted.
And the deleting unit is used for deleting the information to be deleted.
For a specific working process of the unit disclosed in the above embodiment of the present application, reference may be made to the content of the corresponding method embodiment, as shown in fig. 9, which is not described herein again.
As can be seen from the above, the present application provides a constant file management apparatus: after receiving a management instruction of a constant file to be managed by the first receiving unit 1001; the generating unit 1002 determines the required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generates the prompt information; the prompt information is used for indicating a user to input required operation information; then, the second receiving unit 1003 receives feedback information for the prompt information; the feedback information is required operation information input by a user; finally, the processing unit 1004 processes the constant file to be managed according to the feedback information, so that manual operation is avoided, the possibility of misoperation is reduced, manual adjustment of local codes in the prior art is not needed, and the constant file is subjected to a series of processes of testing, acceptance and online, so that the management efficiency is improved.
Another embodiment of the present application provides a server, as shown in fig. 11, including:
one or more processors 1101.
Storage 1102, on which one or more programs are stored.
When the one or more programs are executed by the one or more processors 1101, the one or more processors 1101 are caused to implement the method for managing a constant file as described in any one of the above embodiments.
Another embodiment of the present application provides a computer storage medium, on which a computer program is stored, wherein when being executed by a processor, the computer program implements the method for managing constant files according to any one of the above embodiments.
In the above embodiments disclosed in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present disclosure may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part. The functions may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solutions of the present disclosure, which are essential or part of the technical solutions contributing to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a live broadcast device, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for managing constant files is characterized by comprising the following steps:
receiving a management instruction of a constant file to be managed;
determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generating prompt information; the prompt information is used for indicating a user to input the required operation information;
receiving feedback information aiming at the prompt information; wherein the feedback information is the required operation information input by the user;
and processing the constant file to be managed according to the feedback information.
2. The management method according to claim 1, wherein the file type is a project file; the management type information is newly added information, the required operation information is determined according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and prompt information is generated, and the method includes:
inquiring operation information required when newly adding information for the project file in the system, and generating prompt information; the required operation information is the project name, the project introduction, the environment configuration of the project and the configuration file of the project file of the newly added information;
wherein, the processing the constant file to be managed according to the feedback information includes:
generating a newly added project file according to the project name, the project introduction, the environment configuration of the project and the configuration file of the newly added project file;
and saving the newly added project file to a project list.
3. The management method according to claim 2, wherein the constant file is a project file; the management type information is information for modifying a project file, the required operation information is determined according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and prompt information is generated, and the method includes:
inquiring operation information required when modifying the information of the project file for the project file in the system, and generating prompt information; the required operation information is the project name of the project file to be modified, the project information to be modified and modification information;
wherein, the processing the constant file to be managed according to the feedback information includes:
selecting the project file to be modified according to the project name of the project file to be modified;
modifying the project information to be modified according to the modification information to obtain a modified project file;
and saving the modified project file to the project list.
4. The method of claim 1, wherein the constant file is an environment configuration; the method includes the steps of determining required operation information according to management type information in a management instruction of the constant file to be managed and a file type of the constant file to be managed, and generating prompt information, where the management type information is configuration information configured in a newly added environment, and the method includes:
inquiring operation information required when configuration information for newly adding environment configuration is inquired in the system, and generating prompt information; the required operation information is an environment identifier, an environment name and an environment introduction which are configured by the newly-added environment;
wherein, the processing the constant file to be managed according to the feedback information includes:
generating a newly added environment configuration according to the environment identification, the environment name and the environment introduction of the newly added environment configuration;
and saving the newly added environment configuration to an environment list.
5. The method according to claim 4, wherein the constant file is configured as an environment, the management type information is information for modifying the configuration as an environment, and the determining the required operation information and generating the prompt information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed comprises:
inquiring operation information required when the information for modifying the environment configuration for the environment configuration is inquired in the system, and generating prompt information; the information for modifying the environment configuration comprises an environment name of the environment configuration to be modified, configuration information to be modified and modification information;
wherein, the processing the constant file to be managed according to the feedback information includes:
selecting the environment configuration to be modified according to the environment name of the environment configuration to be modified;
modifying the configuration information to be modified according to the modification information to obtain modified environment configuration;
saving the modified environment configuration to the environment list.
6. The management method according to claim 1, wherein the constant file is a static resource file, the static resource file is a file in the project file and uploaded to a static resource server, the management type information is information for newly configuring a first target static resource file, and the determining required operation information and generating prompt information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed comprise:
inquiring operation information required when newly adding configuration information is carried out on the first target static resource file in the system, and generating prompt information; the required operation information comprises attribute types, attribute key values, attribute corresponding values, belonged project files and belonged environment configuration of newly added attributes;
wherein, the processing the constant file to be managed according to the feedback information includes:
reading the first target static resource file;
adding the newly added attribute to the first target static resource file to obtain a newly added static resource file;
uploading the newly added static resource file to the static resource server, and recording the address information of the newly added static resource file in the static resource server;
and associating the address information with the project file to which the added attribute belongs and the environment configuration to which the added attribute belongs.
7. The management method according to claim 6, wherein the management type information is information for modifying a configuration in the second target static resource file; the determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed and generating prompt information includes:
inquiring operation information required by information for modifying the configuration in the second target static resource file in the system, and generating prompt information; the required operation information is attribute key values of the configuration to be modified and modification target values of corresponding values of the attributes of the configuration to be modified;
wherein, the processing the constant file to be managed according to the feedback information includes:
acquiring address information of the second target static resource file;
reading the second target static resource file in the static resource server according to the address information, and analyzing the second target static resource file to obtain all data information of the second target static resource file;
according to the attribute key value of the configuration to be modified, finding the configuration to be modified in all data information of the second target static resource file, and setting the configuration to be modified into an editable state;
and modifying the attribute corresponding value of the configuration to be modified into the modification target value to obtain a modified second target static resource file.
8. The management method according to claim 7, wherein the management type information is information for synchronizing a static resource file to be synchronized to a target environment configuration, and the processing the constant file to be managed according to the feedback information includes:
acquiring address information of the static resource file to be synchronized;
reading the static resource file to be synchronized in the static resource server according to the address information, and analyzing the static resource file to be synchronized to obtain all data information of the static resource file to be synchronized;
and synchronizing all data information of the static resource files to be synchronized to the target environment configuration.
9. The method according to claim 8, wherein the management type information is information for deleting a configuration in a third target static resource file, and the determining, according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, the required operation information and generating the prompt information includes:
inquiring operation information required when the information for deleting the configuration in the third target static resource file is inquired in the system, and generating prompt information; the required operation information is an attribute key value of the information to be deleted;
wherein, the processing the constant file to be managed according to the feedback information includes:
inquiring in the third target static resource file according to the attribute key value of the information to be deleted to obtain the information to be deleted;
and deleting the information to be deleted.
10. An apparatus for managing constant files, comprising:
the first receiving unit is used for receiving a management instruction of the constant file to be managed;
the generating unit is used for determining required operation information according to the management type information in the management instruction of the constant file to be managed and the file type of the constant file to be managed, and generating prompt information; the prompt information is used for indicating a user to input the required operation information;
a second receiving unit, configured to receive feedback information for the prompt information; wherein the feedback information is the required operation information input by the user;
and the processing unit is used for processing the constant file to be managed according to the feedback information.
CN202110774226.7A 2021-07-08 2021-07-08 Constant file management method and device Pending CN115599748A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110774226.7A CN115599748A (en) 2021-07-08 2021-07-08 Constant file management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110774226.7A CN115599748A (en) 2021-07-08 2021-07-08 Constant file management method and device

Publications (1)

Publication Number Publication Date
CN115599748A true CN115599748A (en) 2023-01-13

Family

ID=84841419

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110774226.7A Pending CN115599748A (en) 2021-07-08 2021-07-08 Constant file management method and device

Country Status (1)

Country Link
CN (1) CN115599748A (en)

Similar Documents

Publication Publication Date Title
CN107908631B (en) Data processing method, data processing device, storage medium and computer equipment
CN111291024B (en) Data processing method, device, electronic equipment and storage medium
CN104391725A (en) Page display method and page display device
CN108958959B (en) Method and device for detecting hive data table
US20140075301A1 (en) Information processing apparatus, control method, and recording medium
CN105893075A (en) Update method and device of application
CN103841464A (en) Video information pushing method and device
CN110851209A (en) Data processing method and device, electronic equipment and storage medium
CN109672608B (en) Method for transmitting messages according to time
KR20160090245A (en) Delivery management server and delivery management method for delivering updated application
CN111813680A (en) Test script generation method and device, computer equipment and storage medium
CN112307318B (en) Content publishing method, system and device
CN113687825B (en) Method, device, equipment and storage medium for constructing software module
CN106557419B (en) Program testing method and device
US20150100868A1 (en) System and method for simulating dynamic content by automatically updating a static image with applicability to a virtual business card
CN104063432A (en) Information searching method and information searching device
CN108196921B (en) Document development method and device, computer equipment and storage medium
CN115599748A (en) Constant file management method and device
CN106648618B (en) Text information generation method and device for virtual application
CN108874856A (en) A kind of page generates system, method and server
CN111597452B (en) Method and device for adding tag, electronic equipment and readable storage medium
CN113641523A (en) Log processing method and device
US20190019054A1 (en) Contact Information Identification System
CN112286545B (en) Data updating method, device, equipment and storage medium
CN108875070B (en) Method, equipment and system for setting message-leaving type web page

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination