CN116719577A - Method, device, equipment and medium for guiding parameter modification - Google Patents

Method, device, equipment and medium for guiding parameter modification Download PDF

Info

Publication number
CN116719577A
CN116719577A CN202310700124.XA CN202310700124A CN116719577A CN 116719577 A CN116719577 A CN 116719577A CN 202310700124 A CN202310700124 A CN 202310700124A CN 116719577 A CN116719577 A CN 116719577A
Authority
CN
China
Prior art keywords
modified
storing
value
file
environment variable
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
CN202310700124.XA
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.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center 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 Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202310700124.XA priority Critical patent/CN116719577A/en
Publication of CN116719577A publication Critical patent/CN116719577A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method, a device, equipment and a medium for guiding parameter modification, wherein the method for guiding parameter modification comprises the following steps: simultaneously loading a configuration file and a file for storing environment variables into an application program; the name of the guide parameter to be modified and the modification value thereof are loaded into the configuration file through the application program; searching the current value of the guide parameter to be modified in the file storing the environment variable according to the name of the guide parameter to be modified; and comparing the length of the modified value with the length of the current value, and shifting the character array storing the current value in the file storing the environment variable according to the comparison result so as to store the modified value through the space of the shifted character data. The scheme disclosed by the application improves the efficiency of modifying the guide parameters of the system and reduces the maintenance cost of the system.

Description

Method, device, equipment and medium for guiding parameter modification
Technical Field
The present application relates to the field of software development, and in particular, to a method, an apparatus, a device, and a medium for guiding parameter modification.
Background
The Linux operating system is a clone system developed based on the UNIX operating system, and for the current embedded system, the kernel of the Linux operating system is generally booted by loading a boot program (u-boot program) of the Linux operating system. The environment variable in the boot of the Linux operating system is a global and initialized character data that is typically not modified when the boot is in memory and is modified when it is loaded into memory.
In the related art of modification of a boot parameter, a user interaction interface (shell) is generally called to execute a command to modify the value of the boot parameter, when the boot parameter is modified each time, the boot program needs to be compiled again, and when a plurality of different versions of products need different boot parameters and the boot parameter needs to be modified for a plurality of times, the boot program needs to be compiled for a plurality of times, so that maintenance cost is increased, and debugging efficiency of a system is reduced.
Disclosure of Invention
In view of this, the present application provides a method, apparatus, device and medium for modifying a boot parameter, which at least solves the problems that in the above related art for modifying a boot parameter, a user interaction interface (shell) is generally called to execute a command to modify a value of the boot parameter, when a boot program is modified each time, the boot program needs to be compiled again, when a plurality of different versions of products need different boot parameters and the boot parameter needs to be modified for a plurality of times, the boot program needs to be compiled for a plurality of times, thereby increasing maintenance cost and reducing debugging efficiency of a system.
Based on the above objects, an aspect of an embodiment of the present application provides a method of guiding parameter modification, including: simultaneously loading a configuration file and a file for storing environment variables into an application program; the name of the guide parameter to be modified and the modification value thereof are loaded into the configuration file through the application program; searching the current value of the guide parameter to be modified in the file storing the environment variable according to the name of the guide parameter to be modified; and comparing the length of the modified value with the length of the current value, and shifting the character array storing the current value in the file storing the environment variable according to the comparison result so as to store the modified value through the space of the shifted character data.
In some embodiments, the step of shifting the character array storing the current value in the file storing the environment variable according to the comparison result to store the modified value through the space of the shifted character data includes: in response to the length of the current value being smaller than the length of the modified value, sequentially shifting the character array storing the current value back by a space of a difference value between the two lengths in the file storing the environment variable, so as to store the modified value through the space of the shifted character data; writing the modified value to a character array storing the current value in response to the length of the current value being equal to the length of the modified value; and in response to the length of the current value being greater than the length of the modified value, sequentially shifting the character array storing the current value forward by the space of the difference value of the length of the character array storing the current value and the length of the character array storing the environment variable in the file storing the environment variable, so as to store the modified value through the space of the shifted character data.
In some embodiments, the step of simultaneously loading the configuration file and the file storing the environment variable into the application program comprises: and in response to the fact that a plurality of guide parameters needing to be modified exist at the same time, simultaneously loading configuration files and files storing environment variables, which correspond to the guide parameters needing to be modified, into the application program.
In some embodiments, the step of simultaneously loading the configuration file and the file storing the environment variable into the application program further comprises: and loading the configuration file and the encrypted file for storing the environment variables into the application program simultaneously.
In some embodiments, the step of searching the file storing the environment variable for the current value of the boot parameter to be modified according to the name of the boot parameter to be modified includes: obtaining a public key from a memory; decrypting the encrypted file storing the environment variable according to the public key to obtain the file storing the environment variable; and comparing the character array of the file storing the environment variable with the name of the guide parameter to be modified to obtain the guide parameter consistent with the name of the guide parameter to be modified and the current value thereof.
In some embodiments, the method further comprises: invoking a verification rule of the file storing the environment variable to the parameter value through the application program; checking the modification value according to the checking rule; and in response to the modification value conforming to the verification rule, updating and outputting the file of the storage environment variable written in the modification value through the application program.
In some embodiments, the method further comprises: and burning the updated file storing the environment variable into a memory to start a kernel of the operating system through the updated file storing the environment variable.
In another aspect of the embodiment of the present application, there is also provided an apparatus for guiding parameter modification, including: the first module is used for loading the configuration file and the file for storing the environment variable into the application program at the same time; the second module is used for loading the names of the guide parameters needing to be modified and the modification values thereof into the configuration file through the application program; a third module, configured to search, according to the name of the guide parameter to be modified, for a current value of the guide parameter to be modified in the file storing the environment variable; and a fourth module, configured to compare the modified value with the length of the current value, and shift the character array storing the current value in the file storing the environment variable according to the comparison result, so as to store the modified value through the space of the shifted character data.
In another aspect of the embodiment of the present application, there is also provided an electronic device including at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of the method described above.
In another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method steps as described above.
The application has at least the following beneficial effects: the method for modifying the guide parameters provides configuration files for parameter modification, the configuration files and files for storing environment variables are simultaneously loaded into an application program, names of guide parameters to be modified and modification values thereof are introduced through the configuration files, character arrays of the files for storing the environment variables are compared with the names, the modification values are written into positions of the character arrays to be modified, the modification process of the guide parameters is independent from the compiling process of the guide program and is used as a precondition for normal compiling of the guide program, therefore, the guide program does not need to be recompiled when the parameter values of the starting parameters are modified each time, the efficiency of modifying the guide parameters of the system is improved, and the maintenance cost of the system is reduced.
Further, judging the lengths of the current value and the modified value to be written, and determining whether the character position of the modified value is required to be correspondingly adjusted when the modified value is written into the character position of the current value according to the length, so that the modified value is smoothly written into the character position, data coverage or vacancy of other character positions is avoided, smooth progress of a program compiling process is ensured, and storage resource waste is avoided.
Furthermore, by loading a plurality of different configuration files into the application program, the simultaneous modification of the parameter values of a plurality of different guide parameters according to the user requirements can be realized, the efficiency of modifying the guide parameters by the system is improved, and the method is simple and easy to use and expand.
Furthermore, the security of the files storing the environment variables in the process of modifying the guide parameters can be improved by encrypting the files storing the environment variables and then loading the files into the application program.
Further, after the modified value is written into the character array position of the current value of the file storing the environment variable, the modified value is checked to judge whether the modified value meets the requirement of the environment variable on the character array, and the new file storing the environment variable can be exported only when the modified value meets the requirement of the character array, so that the accuracy of the modified value for being applicable to a starting program can be improved, and errors generated in the compiling process of a subsequent bootstrap program are avoided.
Drawings
In order to more clearly illustrate the embodiments of the application or the solutions of the prior art, the drawings which are necessary for the description of the embodiments or the prior art will be briefly described, it being evident that the drawings in the following description are only some embodiments of the application and that other embodiments can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for guiding parameter modification according to an embodiment of the present application;
FIG. 2 is another flow chart of a method for guiding parameter modification provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of an apparatus for guiding parameter modification according to an embodiment of the present application;
fig. 4 shows a schematic diagram of an electronic device according to an embodiment of the present application;
fig. 5 shows a schematic diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below. However, it is to be understood that the disclosed embodiments are merely examples and that other embodiments may take various alternative forms.
Furthermore, it should be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
One or more embodiments of the present application will be described below with reference to the accompanying drawings.
Based on the above object, a first aspect of the embodiments of the present application proposes an embodiment of a method of guiding parameter modification. Fig. 1 is a flowchart of a method for modifying a guiding parameter according to an embodiment of the present application, and as shown in fig. 1, a method for modifying a guiding parameter includes:
s1, loading a configuration file and a file for storing environment variables into an application program at the same time;
s2, loading the names of the guide parameters to be modified and the modification values thereof into the configuration file through the application program;
s3, searching the current value of the guide parameter to be modified in the file storing the environment variable according to the name of the guide parameter to be modified;
s4, comparing the modified value with the length of the current value, and shifting the character array storing the current value in the file storing the environment variable according to the comparison result so as to store the modified value through the space of the shifted character data.
According to several embodiments of the present application, the step of shifting the character array storing the current value in the file storing the environment variable according to the comparison result to store the modified value through the space of the shifted character data includes: sequentially shifting the character array storing the current value backwards by the space of the difference value of the two lengths in the file storing the environment variable in response to the length of the current value being smaller than the length of the modified value, so as to store the modified value through the space of the shifted character data; writing the modified value to a character array storing the current value in response to the length of the current value being equal to the length of the modified value; and in response to the length of the current value being greater than the length of the modified value, sequentially shifting the character array storing the current value forward by the space of the difference between the length of the character array storing the current value and the length of the file storing the environment variable, so as to store the modified value through the space of the shifted character data.
According to several embodiments of the present application, the step of simultaneously loading a configuration file and a file storing an environment variable into an application program includes: and in response to the fact that a plurality of guide parameters needing to be modified exist at the same time, the configuration files and the files storing environment variables corresponding to the guide parameters needing to be modified are simultaneously loaded into the application program.
According to several embodiments of the present application, the step of simultaneously loading the configuration file and the file storing the environment variable into the application program further comprises: the configuration file and the encrypted file storing the environment variables are simultaneously loaded into the application program.
According to several embodiments of the present application, the step of searching the file storing the environment variable for the current value of the boot parameter to be modified according to the name of the boot parameter to be modified includes: obtaining a public key from a memory; decrypting the encrypted file storing the environment variable according to the public key to obtain the file storing the environment variable; and comparing the character array of the file storing the environment variable with the name of the guide parameter to be modified to obtain the guide parameter consistent with the name of the guide parameter to be modified and the current value thereof.
According to several embodiments of the application, the method further comprises: calling a verification rule of a file storing environment variables to parameter values through an application program; checking the modified value according to the checking rule; and in response to the modified value conforming to the verification rule, updating and outputting the file of the storage environment variable written with the modified value by the application program.
According to several embodiments of the application, the method further comprises: and burning the updated file storing the environment variable into a memory so as to start the kernel of the operating system.
The following is another embodiment of a method for guiding parameter modification.
For the kernel of the Linux operating system, a starting program needs to be called for starting, and starting parameters corresponding to different products are generally different. Fig. 2 is another flowchart of a method for modifying boot parameters, which is provided in an embodiment of the present application, as shown in fig. 2, when a boot parameter of an environment variable of a boot program is modified, kernel information such as a location where a kernel of a Linux operating system is located is read to obtain a corresponding file storing the environment variable, where parameters in the file storing the environment variable exist in the form of a character array, including the boot parameter for the boot program, and the file storing the environment variable is loaded into a preset executable application program, and at the same time, a configuration file for modifying the parameters is also loaded into the application program, where the configuration file also exists in the form of a character array, and at least includes a parameter name and a parameter value on different character arrays. For a particular program implementation, the configuration file and the file storing the environment variables may be packaged together and then loaded into the application at the same time.
Initializing a configuration environment, and reading the names of the guide parameters to be modified and the corresponding modification values thereof into a character array of a configuration file through an application program, wherein the read names of the guide parameters to be modified and the corresponding modification values thereof are stored in the form of the character array, and preferably, the character type of the configuration file is consistent with the character type of the file storing the environment variables. Comparing the character array of the file storing the environment variable with the name of the guide parameter to be modified, finding a character position consistent with the name of the guide parameter to be modified from the character array of the file storing the environment variable, and reading the current value from the character position to write the modified value of the guide parameter to be modified into the character position so as to complete modification of the guide parameter and replacement of the starting parameter in the original environment variable. Specifically, before writing the modified value of the guide parameter to be modified into the character position, it is necessary to determine whether the modified value can be directly written into the character position, determine the length of the current value and the modified value, and determine whether to translate the character array of the file storing the environment variable backward from the character position according to the determination result, so as to write the modified value into the character position. When the length of the current value is smaller than that of the modified value, sequentially shifting a character array of a file storing the environment variable backwards from a character position by a space with the difference value between the current value and the length of the modified value so as to write the modified value into the character position; writing the modified value to the character position when the length of the current value is equal to the length of the modified value; when the length of the current value is larger than that of the modified value, the modified value is written into the character position, and then the space with the difference value of the length between the current value and the modified value is sequentially shifted forward from the next character position of the character position, so that the address space of the character array storing the file of the environment variable is prevented from being wasted. After the judgment is completed, the to-be-written modified value can be written into the corresponding character position of the character array of the file storing the environment variable according to the corresponding writing mode, a new environment variable array is obtained, the new character array needs to be checked, whether the written character array of the modified value meets the requirement of the environment variable on the character array is checked, and the written character array of the modified value can be exported into the new file storing the environment variable through an application program only after the written character array of the modified value meets the requirement of the environment variable on the character array. And then burning the new file for storing the environment variable into a memory to start the kernel of the Linux system through the new file for storing the environment variable.
Further, in order to improve the security of the file storing the environment variable when modifying the parameter value, the file storing the environment variable may be encrypted and then loaded into the application program, and then the file storing the environment variable may be operated after the public key is acquired from the memory and decrypted before the file storing the environment variable is required to be used.
Furthermore, when a plurality of parameter values need to be modified, a plurality of configuration files for modifying the parameter values can be directly set, and the modification of the plurality of parameter values is completed by respectively loading the plurality of different configuration files into an application program and respectively carrying out subsequent operations with files for storing environment variables, so that the efficiency of modifying the parameter values by a system is improved, and the resource waste is reduced.
In a second aspect of the embodiment of the present application, a device for modifying a guiding parameter is provided, and fig. 3 shows a schematic diagram of a device for modifying a guiding parameter provided in the embodiment of the present application, as shown in fig. 3, including: a first module 011, configured to simultaneously load a configuration file and a file storing an environment variable into an application program; a second module 012, configured to load, by the application program, a name of a boot parameter to be modified and a modification value thereof into the configuration file; a third module 013, configured to search, in the file storing the environment variable, for a current value of the guide parameter to be modified according to the name of the guide parameter to be modified; a fourth module 014, configured to compare the length of the modified value and the length of the current value, and shift the character array storing the current value in the file storing the environment variable according to the comparison result, so as to store the modified value through the space of the shifted character data.
In a third aspect of the embodiment of the present application, an electronic device is provided, and fig. 4 is a schematic diagram of an electronic device provided in the embodiment of the present application. As shown in fig. 4, an electronic device provided by an embodiment of the present application includes the following modules: at least one processor 021; and a memory 022, the memory 022 storing computer instructions 023 executable on the processor 021, the computer instructions 023 implementing the steps of the method as described above when executed by the processor 021.
The application also provides a computer readable storage medium. Fig. 5 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. As shown in fig. 5, the computer-readable storage medium 031 stores a computer program 032 which, when executed by a processor, performs the steps of the method as described above.
Finally, it should be noted that, as will be understood by those skilled in the art, implementing all or part of the above-described methods in the embodiments may be implemented by a computer program to instruct related hardware, and the program of the method for setting system parameters may be stored in a computer readable storage medium, where the program may include the flow of the embodiments of the methods described above when executed. The storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present application may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present application are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, D0L, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present application has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the application, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the application, and many other variations of the different aspects of the embodiments of the application as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present application.

Claims (10)

1. A method of directing parameter modification, comprising:
simultaneously loading a configuration file and a file for storing environment variables into an application program;
the name of the guide parameter to be modified and the modification value thereof are loaded into the configuration file through the application program;
searching the current value of the guide parameter to be modified in the file storing the environment variable according to the name of the guide parameter to be modified;
and comparing the length of the modified value with the length of the current value, and shifting the character array storing the current value in the file storing the environment variable according to the comparison result so as to store the modified value through the space of the shifted character data.
2. The method of claim 1, wherein the step of shifting the character array storing the current value in the file storing the environment variable according to the comparison result to store the modified value through a space of the shifted character data comprises:
in response to the length of the current value being smaller than the length of the modified value, sequentially shifting the character array storing the current value back by a space of a difference value between the two lengths in the file storing the environment variable, so as to store the modified value through the space of the shifted character data;
writing the modified value to a character array storing the current value in response to the length of the current value being equal to the length of the modified value;
and in response to the length of the current value being greater than the length of the modified value, sequentially shifting the character array storing the current value forward by the space of the difference value of the length of the character array storing the current value and the length of the character array storing the environment variable in the file storing the environment variable, so as to store the modified value through the space of the shifted character data.
3. The method of claim 1, wherein the step of simultaneously loading the configuration file and the file storing the environment variable into the application program comprises:
and in response to the fact that a plurality of guide parameters needing to be modified exist at the same time, simultaneously loading configuration files and files storing environment variables, which correspond to the guide parameters needing to be modified, into the application program.
4. The method of claim 1, wherein the step of simultaneously loading the configuration file and the file storing the environment variable into the application program further comprises:
and loading the configuration file and the encrypted file for storing the environment variables into the application program simultaneously.
5. The method of claim 4, wherein the step of searching for the current value of the boot parameter to be modified in the file storing the environment variable according to the name of the boot parameter to be modified comprises:
obtaining a public key from a memory;
decrypting the encrypted file storing the environment variable according to the public key to obtain the file storing the environment variable;
and comparing the character array of the file storing the environment variable with the name of the guide parameter to be modified to obtain the guide parameter consistent with the name of the guide parameter to be modified and the current value thereof.
6. The method according to claim 1, wherein the method further comprises:
invoking a verification rule of the file storing the environment variable to the parameter value through the application program;
checking the modification value according to the checking rule;
and in response to the modification value conforming to the verification rule, updating and outputting the file of the storage environment variable written in the modification value through the application program.
7. The method of claim 6, wherein the method further comprises:
and burning the updated file storing the environment variable into a memory to start a kernel of the operating system through the updated file storing the environment variable.
8. An apparatus for directing parameter modification, comprising:
the first module is used for loading the configuration file and the file for storing the environment variable into the application program at the same time;
the second module is used for loading the names of the guide parameters needing to be modified and the modification values thereof into the configuration file through the application program;
a third module, configured to search, according to the name of the guide parameter to be modified, for a current value of the guide parameter to be modified in the file storing the environment variable;
and a fourth module, configured to compare the modified value with the length of the current value, and shift the character array storing the current value in the file storing the environment variable according to the comparison result, so as to store the modified value through the space of the shifted character data.
9. An electronic device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-7.
10. A computer readable storage medium storing a computer program which when executed by a processor performs the steps of the method of any one of claims 1-7.
CN202310700124.XA 2023-06-13 2023-06-13 Method, device, equipment and medium for guiding parameter modification Pending CN116719577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310700124.XA CN116719577A (en) 2023-06-13 2023-06-13 Method, device, equipment and medium for guiding parameter modification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310700124.XA CN116719577A (en) 2023-06-13 2023-06-13 Method, device, equipment and medium for guiding parameter modification

Publications (1)

Publication Number Publication Date
CN116719577A true CN116719577A (en) 2023-09-08

Family

ID=87864210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310700124.XA Pending CN116719577A (en) 2023-06-13 2023-06-13 Method, device, equipment and medium for guiding parameter modification

Country Status (1)

Country Link
CN (1) CN116719577A (en)

Similar Documents

Publication Publication Date Title
CN107506221B (en) Application program upgrading method, device and equipment
JP6506412B2 (en) Application loading method and apparatus
US8527937B2 (en) Method and apparatus for application building using build styles
JP2016519385A (en) Method for loading driver and embedded device
CN108614702B (en) Byte code optimization method and device
US8196093B2 (en) Apparatus and method for componentizing legacy system
CN108694049B (en) Method and equipment for updating software
CN111190584B (en) EHIS-DB system version release method, EHIS-DB system version release device, computer equipment and storage medium
CN113535141A (en) Database operation code generation method and device
JP2006318465A (en) Method for creating unique identification for copying of executable code, and its management
US6314564B1 (en) Method for resolving arbitrarily complex expressions at link-time
CN115951870A (en) Mirror image file compiling method, system, equipment and medium
CN116719577A (en) Method, device, equipment and medium for guiding parameter modification
CN114780173B (en) Method for loading plug-in application, computing device and storage medium
CN113641389B (en) Software upgrading method, device and equipment based on OpenCPU
CN102629259A (en) Read-only file system setting up method in embedded system, device and embedded system
JP2021103354A (en) Program testing method
CN115794260B (en) Simple dynamic loading method for DSP software library
KR100846203B1 (en) Method for generating mobile application and record media recorded program for realizing the same
JP5248762B2 (en) Design data dependency management device, design data dependency management method and program
US6886158B2 (en) Componentware creating method and recording medium
CN116991427B (en) Application compiling method and device, computing equipment and storage medium
WO2024077485A1 (en) Method for implementing derivative nft, apparatus therefor and computer-readable storage medium
CN112433738B (en) Firmware update test method, system, equipment and medium
US20080127074A1 (en) Delayed production expansion by use of macros

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