Parameter value configuration methods, parsing methods, electronic devices, and storage media
By using macro variables to transform the parameter values of flexible parameters, the problem of redundancy in configuration files and profile files is solved, and more efficient parameter configuration management is achieved.
Patent Information
- Application Number
- CN202310452495.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-04-21
AI Technical Summary
In existing technologies, the existence of elastic parameters necessitates the generation of multiple configuration files based on different machine specifications, architectures, and system types, resulting in redundancy of configuration files and profile files, and high management and maintenance costs.
The values of elasticity parameters are determined by using macro variables, and the values are converted and saved to the tuner configuration file through syntax format conversion, reducing redundant file storage.
The number of configuration files and profile files has been reduced, improving the readability and maintainability of the tuner configuration files and lowering management and maintenance costs.
Smart Images

Figure CN116755828B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a parameter value configuration method, parsing method, electronic device, and storage medium. Background Technology
[0002] In existing technologies, persistent storage and migration of system parameter configuration schemes are achieved by saving a series of system parameter configurations as profile files. However, for cloud virtual machines of different specifications, the same parameter needs to be set with different values to effectively improve the performance of the virtual machine. Therefore, it is necessary to generate multiple different profile files for different virtual machine specifications and select the appropriate profile file for parameter settings based on the virtual machine specifications.
[0003] Similar issues exist in intelligent parameter tuning. Intelligent parameter tuning requires parameter ranges as initial input. These ranges determine the upper and lower limits of usable parameters, which vary across different virtual machine specifications. For example, some parameter values determine the number of parallel processes, which should be related to the number of CPU cores in the virtual machine. A single parameter tuning session often involves several or even dozens of different system parameters. The value ranges of these parameters are defined through a JSON file. Obviously, maintaining a separate JSON file for different virtual machine specifications is a difficult and redundant task.
[0004] In summary, during parameter tuning, there are parameters whose values need to be adjusted based on different machine specifications, architectures, system types, etc.; these are called flexible parameters. However, in related technologies, when configuration files and profile files involve flexible parameters, a separate configuration file or profile file needs to be written for each possible value of the flexible parameter, resulting in multiple configuration files or profile files corresponding to different combinations of machine specifications, system architectures, and system types. This leads to redundancy in configuration files and profile files. When the combinations of machine specifications, architectures, and system types increase, corresponding configuration files and profile files need to be added; when parameter values need to be modified, the content of each file needs to be manually modified. Therefore, the existence of flexible parameters in related technologies necessitates preparing configuration files and profile files separately for different situations, resulting in high management and maintenance costs for these configuration files and profile files.
[0005] No effective solution has yet been proposed to address the above problems. Summary of the Invention
[0006] This application provides a parameter value configuration method, a parsing method, an electronic device, and a storage medium to at least solve the technical problem in the related art where the existence of flexible parameters requires the preparation of configuration files and profile files for parameter values according to different situations, resulting in high management and maintenance costs for configuration files and profile files.
[0007] According to one aspect of the embodiments of this application, a parameter value configuration method is provided, comprising: determining the macro variable type corresponding to the parameter value of an elastic parameter and the syntax format of the macro variable type, wherein the elastic parameter is a parameter with different parameter values limited according to different virtual machine configuration information during system parameter optimization; converting the parameter value of the elastic parameter based on the syntax format to obtain the target parameter value of the elastic parameter, and saving the target parameter value to the corresponding tuner configuration file, wherein the target parameter value is the parameter value represented by the syntax format.
[0008] According to another aspect of the embodiments of this application, a parameter value parsing method is also provided, comprising: obtaining a tuner configuration file, wherein the tuner configuration file contains target parameter values for elastic parameters; the elastic parameters are parameters that are limited by different parameter values according to different virtual machine configuration information during system parameter optimization; the target parameter values are parameter values represented by a syntax format, the syntax format being determined according to the macro variable type corresponding to the parameter values of the elastic parameters; and parsing the target parameter values based on the macro variable parsing method to obtain the parameter values required for system parameter optimization.
[0009] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, the memory storing a computer program; the processor being configured to execute the computer program stored in the memory, wherein the computer program, when executed, causes the processor to perform the method steps described in any one of the above.
[0010] According to another aspect of the embodiments of this application, a storage medium is also provided, the storage medium storing a program, wherein the program, when run by a processor, controls the processor to perform the steps of the method described in any of the above-described embodiments.
[0011] In this embodiment, a macro variable type and syntax format for determining the value of the elastic parameter are used. The elastic parameter is a parameter whose value is limited by different virtual machine configuration information during system parameter optimization. The value of the elastic parameter is converted based on the syntax format to obtain the target value, which is then saved to the corresponding tuner configuration file. The target value is the parameter value represented by the syntax format. In other words, this embodiment uses macro variables to convert the value of the elastic parameter and saves the converted value to the corresponding tuner configuration file. This eliminates redundant file storage in the tuner configuration file due to the presence of the elastic parameter, thus solving the technical problem in related technologies where the presence of the elastic parameter necessitates preparing configuration files and profile files separately for different situations, resulting in high management and maintenance costs. This achieves the technical effect of reducing the number of configuration files and profile files and improving the readability and maintainability of the tuner configuration file. Attached Figure Description
[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0013] Figure 1 A hardware structure block diagram of a computer terminal is shown;
[0014] Figure 2 A flowchart of the parameter value configuration method provided in the embodiments of this application;
[0015] Figure 3 A flowchart of the parameter value parsing method provided in the embodiments of this application;
[0016] Figure 4 A flowchart of the parameter value parsing method provided in an optional embodiment of this application;
[0017] Figure 5 A schematic diagram of the parameter value configuration device provided in the embodiments of this application;
[0018] Figure 6 This is a schematic diagram of the parameter value parsing device provided in the embodiments of this application. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to define a specific order. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0021] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0022] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0023] System parameters: These refer to configuration items in the operating system that can be dynamically set and affect application performance, such as kernel configuration parameters and application configuration parameters.
[0024] Profile: Refers to a configuration scheme for system parameters, which includes several system parameters and their corresponding values. It can be used as input for intelligent operating system performance tuning tools to optimize system performance.
[0025] Parameter tuning: The process of adjusting system parameters to continuously improve system performance and ultimately find a better combination of parameters.
[0026] Macro definition: In computer science, a macro is an abstraction that replaces a certain text pattern according to a set of predefined rules.
[0027] Macro variable: A variable name defined using macros, including explicit and implicit variables.
[0028] Explicit variables: These have simple parsing logic and are parsed using simple system commands. They are macro variables whose parsing logic is visible to the user.
[0029] Implicit variables: These variables have complex parsing logic and require a piece of code to parse them. The parsing logic is not visible to the user.
[0030] Flexible parameters are parameters with different values or ranges that are limited depending on the combination of different machine specifications, architectures, and system types during parameter optimization.
[0031] Example 1
[0032] The method embodiments provided in Embodiment 1 or Embodiment 2 of this application can be executed on a mobile terminal, computer terminal or similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data. In addition, it may also include: a transmission module, a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated. It should be noted that the computer terminal 10 (or mobile device 10) can be used to implement parameter value configuration methods or parameter value parsing methods.
[0033] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0034] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the parameter value configuration method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the data processing method of the application described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0035] The aforementioned transmission module is used to receive or send data via a network. Specific examples of the network may include a wireless network provided by the communication provider of computer terminal 10. In one example, the transmission module includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0036] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0037] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer devices.
[0038] It should be noted here that, in some embodiments, the above... Figure 1 The computer device shown has a touch display (also referred to as a "touchscreen" or "touch display screen"). In some embodiments, the above... Figure 1 The computer device shown has a graphical user interface (GUI), through which users can interact with the GUI by touching and / or gesturing on the surface of a touchscreen. The human-computer interaction functions here may include the following: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or computer-readable storage media.
[0039] In the above-described operating environment, according to one aspect of the embodiments of this application, a parameter value configuration method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0040] As described above, the common approach in related technologies is as follows: when configuration files and profile files involve elastic parameters, a separate configuration file or profile file needs to be written for each possible value of the elastic parameter, based on service requirements. This results in multiple configuration files or profile files corresponding to different combinations of machine specifications, system architectures, and system types. The consequence is redundancy in configuration files and profile files. When the combinations of machine specifications, architectures, and system types increase, corresponding configuration files and profile files need to be added. When parameter values need to be modified, the content of each file needs to be manually modified.
[0041] Considering three cloud virtual machine specifications with 4, 8, and 16 CPU cores, and considering both x86 and ARM architectures, the following three elastic parameters need to be configured in the profile and smart tuning configuration files.
[0042] 1. First elasticity parameter fpA: The known optimal values (values provided in the Profile) and acceptable intelligent optimization ranges for 4, 8, and 16 CPU cores are shown in Table 1:
[0043] Table 1. Value requirements for the first elastic parameter fpA
[0044]
[0045] 2. Second elasticity parameter fpB: The known optimal values (values provided in the Profile) and acceptable intelligent optimization ranges for 4, 8, and 16 CPU cores are shown in Table 2:
[0046] Table 2 Required values for the second elastic parameter fpB
[0047]
[0048] 3. The third elasticity parameter fpC: For system architectures of x86 and ARM, the known optimal values (values provided in the Profile) and the acceptable intelligent optimization range are shown in Table 3:
[0049] Table 3. Value requirements for the third elastic parameter fpC
[0050]
[0051] To handle parameter settings and intelligent parameter tuning under different conditions, a Profile file and a configuration file are needed for all possible combinations of elastic parameters. In this example, a total of 6 Profile files and 6 intelligent parameter optimization configuration files are required. The parameter values that need to be specifically defined in the Profile files and intelligent parameter optimization configuration files under the corresponding virtual machine configuration information are shown in Table 4:
[0052] Table 4 shows the original scheme's description of profile files and configuration files when fpA, fpB, and fpC exist.
[0053]
[0054] To overcome the aforementioned shortcomings, this application proposes a scheme using macro variables to address the configuration of flexible parameters in configuration files and profile files. Specifically, macro variables are used to transform the values of flexible parameters, and real-time parsing of these macro variables assigns different values to flexible parameters across different machine specifications, architectures, and system types. This scheme significantly reduces the number of configuration and profile files, eliminating redundant file storage due to flexible parameters. Furthermore, when file content changes, updates can be achieved by modifying macro variable expressions, parsing methods, or adding new macro variables.
[0055] Figure 2 A flowchart of the parameter value configuration method provided in the embodiments of this application is shown below. Figure 2As shown, the method includes the following steps:
[0056] Step S202: Determine the macro variable type and syntax format corresponding to the parameter value of the elastic parameter. The elastic parameter is a parameter with different parameter values limited according to different virtual machine configuration information when optimizing system parameters.
[0057] The parameter values mentioned above refer to the set of all possible values that a parameter can take in a system or program. Parameter values include both the parameter value and the parameter range. The parameter value is the specific value taken, while the parameter range is the range or constraint conditions for the parameter value. When designing parameters, it is necessary to select appropriate parameter values based on actual needs and usage scenarios to ensure the correctness, reliability, and performance of the system. The macro variable types mentioned above include explicit variables and implicit variables. Different syntax formats are configured according to different macro variable types. For example, the syntax format for explicit variables is configured as #!name#, and the syntax format for implicit variables is configured as #?name#.
[0058] Step S204: Based on the syntax format, the parameter values of the elastic parameters are converted to obtain the target parameter values of the elastic parameters, and the target parameter values are saved to the corresponding tuner configuration file. The target parameter values are parameter values expressed in the syntax format.
[0059] The tuner configuration file mentioned above includes a configuration file and a profile file. The configuration file stores the parameter range that is acceptable or reasonable for intelligent parameter optimization, while the profile file stores the optimal parameter values.
[0060] Through the above steps, the parameter values of elastic parameters can be transformed using macro variables, and the transformed parameter values are saved to the corresponding tuner configuration file. This eliminates redundant file storage in the tuner configuration file due to the existence of elastic parameters, thereby solving the technical problem in related technologies where the existence of elastic parameters necessitates preparing configuration files and profile files for parameter values according to different situations, resulting in high management and maintenance costs for configuration files and profile files. This achieves the technical effect of reducing the number of configuration files and profile files and improving the readability and maintainability of the tuner configuration file.
[0061] As an optional embodiment, determining the macro variable type corresponding to the parameter value of the elastic parameter includes: obtaining the association between the parameter value of the elastic parameter and the virtual machine configuration information, wherein the association includes at least one of the following: linear relationship, non-linear relationship, and discrete relationship; when the association is a non-linear relationship, the implicit variable is used as the macro variable type; when the association is a linear relationship or a discrete relationship, the explicit variable is used as the macro variable type.
[0062] In practical applications, the macro variable type corresponding to the elastic parameter values can be flexibly set according to the needs of the application scenario. For example, based on the correlation between the elastic parameter values and virtual machine configuration information, the macro variable type corresponding to the elastic parameter values can be set to an explicit variable or an implicit variable with greater flexibility.
[0063] Optionally, the values of elastic parameters are typically associated with virtual machine configuration information, such as the number of CPU cores, memory size, and disk space. These relationships can be linear, non-linear, or discrete. The implementation can be simplified using macro variables: the first elastic parameter fpA has a linear relationship with the number of CPU cores, which can be achieved using a macro definition like fpA = #!cpu_core#*512; the second elastic parameter fpB is related to the number of CPU cores, but not in a simple linear relationship, and can be configured as an implicit variable to achieve a more complex numerical mapping, fpB = #?flexible_param_B#; the second elastic parameter fpC is related to the system architecture and has a discrete relationship, achieved through logical operations, fpC = #!arch#==x86_64?off:on.
[0064] It should be noted that the specific implementation of the parsing logic for the two explicit variables #!cpu_core# and #!arch# mentioned above can be seen in the file. For the implicit variable #?flexible_param_B#, its parsing and replacement can be implemented in the code.
[0065] Furthermore, for the implicit variable `#? flexible_param_B#`, its parsing and replacement can be implemented in the code. The specific implementation is as follows: Define a function in the code to parse and replace the implicit variable; the function's input parameter is the string to be parsed, and its output parameter is the parsed string; within the function, use regular expressions to match the implicit variable `#? flexible_param_B#` in the string; if the implicit variable is matched, replace it with the corresponding value according to the specific parsing logic; if no implicit variable is matched, directly return the original string; wherever the implicit variable needs to be used in the code, call the above function for parsing and replacement.
[0066] Furthermore, the resolution logic for implicit variables can be quite complex, requiring design and implementation tailored to specific needs and service logic. Additionally, the scope and lifetime of implicit variables need to be considered to ensure the correctness and reliability of resolution and replacement.
[0067] Therefore, if the relationship between the elastic parameter value and the virtual machine configuration information is linear or discrete, then the macro variable type is an explicit variable; if the relationship between the elastic parameter value and the virtual machine configuration information is non-linear, then the macro variable type is an implicit variable.
[0068] As an optional implementation, determining the syntax format corresponding to the macro variable type includes: when the macro variable type is an explicit variable, the syntax format is #!name#; when the macro variable type is an implicit variable, the syntax format is #?name#; where name represents virtual machine configuration information.
[0069] Optionally, macro variables can be used to configure two types of variables: explicit variables and implicit variables, to achieve different functions. The syntax formats for explicit and implicit variables are shown in Table 5. Explicit variables can be configured using the syntax #!name#, for example, #!cpu_core# represents the number of CPU cores in the optimized environment. Implicit variables can be configured using the syntax #?name#, for example, #?innodb_lfs#. Implicit variables are hidden from the user for two reasons: firstly, the parsing method for implicit variables is more complex than that for explicit variables, and users do not need to understand or modify them; secondly, there is a need for hiding and protecting critical data. It should be noted that both explicit and implicit variables support further numerical and logical operations to achieve more complex definitions.
[0070] Table 5 Syntax format for explicit and implicit variables
[0071] Macro variable types Syntax Example Explicit variables #!name# #! cpu_core# Implicit variables #? name# #? innodb_lfs#
[0072] As an optional embodiment, the tuner configuration file includes a configuration file and a profile file. The target parameter value is saved to the corresponding tuner configuration file, including: when the parameter value is a parameter range, the target parameter value is saved to the configuration file; when the parameter value is a parameter value, the target parameter value is saved to the profile file.
[0073] During implementation, the format and path of configuration files and profile files can be defined; parameter values are read, and it is determined whether they are parameter ranges or parameter values. If they are parameter ranges, the target parameter values are saved to the configuration file; if they are parameter values, the target parameter values are saved to the profile file. Saving the target parameter values to the corresponding tuner configuration file can be achieved using file operation functions or third-party libraries.
[0074] Furthermore, using macro variables can simplify the implementation. The current scheme's representation of the profile file and configuration file when fpA, fpB, and fpC exist is shown in Table 6:
[0075] Table 6 shows the current scheme's description of profile files and configuration files when fpA, fpB, and fpC exist.
[0076]
[0077] Virtual machine configuration information refers to the hardware and software configuration parameters of a virtual machine, including the following aspects: CPU configuration: including CPU model, number of cores, frequency, etc.; Memory configuration: including memory size, memory type, memory bandwidth, etc.; Storage configuration: including disk size, disk type, disk interface, etc.; Network configuration: including network bandwidth, network interface type, IP address, etc.; Operating system configuration: including operating system type, architecture, version, kernel parameters, etc.; Application configuration: including application type, version, configuration parameters, etc.; Security configuration: including firewall, encryption, authentication, etc.; Detection configuration: including performance detection, log detection, alarm configuration, etc.
[0078] As an optional embodiment, the virtual machine configuration information includes at least one of the following: the number of CPU cores of the virtual machine, the system architecture, and the system type.
[0079] The CPU core count of a virtual machine refers to the number of physical CPU cores that the virtual machine can use. In a virtualization environment, the number of CPU cores that a virtual machine can be allocated is determined by the number of physical CPU cores on the host machine and the configuration of the virtualization software. Generally speaking, the more CPU cores a virtual machine has, the better its performance will be, but it will also increase the burden on the host machine and the resource consumption. Therefore, when setting the number of CPU cores for a virtual machine, it is necessary to make reasonable adjustments based on actual needs and the hardware configuration of the host machine.
[0080] The aforementioned system architectures include, but are not limited to, x86 and ARM processor architectures, which differ in instruction sets, registers, memory management, and interrupt handling. In system architecture design, the appropriate processor architecture must be selected based on the specific application scenario and requirements. For high-performance computing and desktop applications, the x86 architecture can be chosen; for low-power, lightweight applications, the ARM architecture can be chosen. Simultaneously, factors such as software ecosystem, development tools, and cost must be considered to comprehensively evaluate the advantages and disadvantages of the two architectures.
[0081] Furthermore, virtual machine configuration information has a significant impact on the performance, reliability, and security of the virtualization environment. When configuring a virtual machine, it is necessary to select appropriate configuration parameters based on actual needs and usage scenarios to ensure the performance, reliability, and security of the virtual machine.
[0082] Example 2
[0083] According to another aspect of the embodiments of this application, a parameter value parsing method is also provided. Figure 3 The flowchart of the parameter value parsing method provided in the embodiments of this application is as follows: Figure 3 As shown, the method includes the following steps:
[0084] Step S302: Obtain the tuner configuration file, wherein the tuner configuration file contains the target parameter values of the elastic parameters; the elastic parameters are parameters that are limited to different parameter values according to different virtual machine configuration information when optimizing system parameters; the target parameter values are parameter values expressed in a syntax format, which is determined according to the macro variable type corresponding to the parameter values of the elastic parameters.
[0085] Step S304: Based on the macro variable parsing method, the target parameter values are parsed to obtain the parameter values required for system parameter optimization.
[0086] Through the above steps, the parameter values of elastic parameters can be transformed using macro variables, and the transformed parameter values are saved to the corresponding tuner configuration file. This eliminates redundant file storage in the tuner configuration file due to the existence of elastic parameters, thereby solving the technical problem in related technologies where the existence of elastic parameters necessitates preparing configuration files and profile files for parameter values according to different situations, resulting in high management and maintenance costs for configuration files and profile files. This achieves the technical effect of reducing the number of configuration files and profile files and improving the readability and maintainability of the tuner configuration file.
[0087] In addition, by parsing macro variables in real time, different parameter values can be assigned to elastic parameters under different virtual machine configuration information, thus realizing flexible configuration and adaptability of elastic parameters.
[0088] As an optional embodiment, the target parameter value is obtained by converting the parameter value of the elastic parameter based on the syntax format, wherein the parameter value includes at least one of the following: parameter value and parameter range.
[0089] The conversion of the target parameter value needs to be based on the specific definition method and use case of the elastic parameter. Optionally, the syntax format and specifications of the elastic parameter are defined, including the format and rules of the parameter value and parameter range; the definition and value of the elastic parameter are read, and parsed and converted according to the syntax format and specifications; if the value of the elastic parameter is a parameter value, it is directly used as the target parameter value; if the value of the elastic parameter is a parameter range, a specific target parameter value is calculated according to the range and rules, for example, using mathematical functions or random number generation functions.
[0090] It is important to note that the syntax and specifications of elastic parameters should have a certain degree of flexibility and extensibility to adapt to different needs and scenarios. At the same time, the boundaries and exceptional cases of parameter values need to be considered to ensure the correctness and reliability of parsing and conversion.
[0091] As an optional implementation, the target parameter value is parsed based on the macro variable parsing method to obtain the parameter values required for system parameter optimization. This includes: detecting the syntax format of the target parameter value and obtaining the macro variable type corresponding to the syntax format; when the macro variable type is an explicit variable, obtaining the system command code required to parse the explicit variable, and parsing the explicit variable based on the system command code to obtain the parsed target value; or, when the macro variable type is an implicit variable, obtaining the parsing code required to parse the implicit variable, and parsing the implicit variable based on the parsing code to obtain the parsed target value; and performing numerical and logical operations on the parsed target value based on the macro variable's operational expression to obtain the parameter values required for system parameter optimization.
[0092] For example, regular expressions or other methods can be used to detect and parse the syntax of the target parameter values to obtain the macro variable type corresponding to the syntax. If the macro variable type is an explicit variable, the corresponding system command code is obtained from the parsing definition file. The system command code is then used to parse the explicit variable; for example, the system command code is sent to the optimization environment for execution to obtain the parsed target value. This can be achieved using system calls or third-party libraries. If the macro variable type is an implicit variable, the corresponding parsing code is run to parse the implicit variable and obtain the parsed target value. Then, numerical and logical operations are performed on the parsed target value using the macro variable's arithmetic expression to obtain the parameter values required for system parameter optimization. This can be achieved using the computation and logical operation functions of a programming language. Furthermore, where the parameter values required for system parameter optimization are needed, the parsed and converted values can be used directly.
[0093] It should be noted that system command code refers to the instruction code used to control system hardware and software, such as operating system commands, device driver commands, and network protocol commands. System command code is typically called by the operating system or applications to implement various system functions and operations. Parsing code, on the other hand, is the code used to parse and calculate macro variables, such as mathematical expressions, logical expressions, and conditional statements. Parsing code is usually written by programmers to implement the parsing and calculation of macro variables, thereby enabling system control and optimization.
[0094] Figure 4 A flowchart of the parameter value parsing method provided in the optional embodiments of this application is shown below. Figure 4 As shown, the method includes the following steps: After reading the configuration file and profile file, the explicit and implicit variables in the file are first identified using the pre-configured macro variable syntax formats #!name# and #?name#. For explicit variables, the corresponding system command code is obtained by reading the definition file of the parsing expression, and the variable is parsed by sending the corresponding system command to the optimization environment for execution. For implicit variables, the variable is replaced with a specific value (corresponding to the target value after parsing) by running the corresponding parsing code. After the variable replacement operation is completed, numerical and logical operations are performed on the variable values to restore the parameter values to their original values (corresponding to the parameter values required for the system parameter optimization). Numerical operations include addition, subtraction, multiplication, division, and exponentiation, while logical operations include greater than, less than, equal to, greater than or equal to, less than or equal to, logical AND, logical OR, and ternary operations for conditional judgment. The types of operations supported by macro variables are shown in Table 7.
[0095] Table 7 shows the types of operations supported by macro variables.
[0096] Operations Operators Example add + #! cpu_core#+1 reduce - #! mem#-1024 take * #! cpu_core#*2 remove / #! cpu_core# / 2 power ^ 2^#! cpu_core# Greater than / Greater than or equal to >,>= #! mem#>4096 Less than / less than or equal to <,<= #?flexible_param_B_ub#<10 equal == #! mem#==1024 Logic AND & #!mem#>=1024!mem#<=4096 Logical OR | #!mem#>=1024|#!mem#<=4096 Conditional judgment #! arch#==x86_64? off:on
[0097] As an optional embodiment, after parsing the target parameter values based on the macro variable parsing method to obtain the parameter values required for system parameter optimization, the above method further includes: when the tuner configuration file changes, updating the parameter values required for system parameter optimization by modifying the macro variable's operation expression, modifying the macro variable's parsing method, or adding a new macro variable's definition method.
[0098] For example, monitoring changes to the tuner configuration file can be achieved using the file detection function provided by the operating system or a third-party library. When the configuration file changes, the information in the configuration file is read, and the operation expressions of macro variables, the parsing method of macro variables, or the definition method of new macro variables are modified as needed. Then, the target parameter values are re-parsed and transformed to obtain the updated parameter values required for system parameter optimization.
[0099] When the content of a file changes, it can be updated by modifying the operation expression of macro variables, the parsing method of macro variables, or adding new macro variables, which has a certain degree of flexibility and maintainability.
[0100] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0101] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0102] Example 3
[0103] According to another aspect of the embodiments of this application, a parameter value configuration device is also provided. Figure 5 This is a schematic diagram of the parameter value configuration device provided in the embodiments of this application, as shown below. Figure 5 As shown, the parameter value configuration device includes a determination module 502 and a conversion module 504. The parameter value configuration device will be described in detail below.
[0104] The determination module 502 is used to determine the macro variable type and the syntax format of the macro variable type corresponding to the parameter value of the elastic parameter. The elastic parameter is a parameter that adopts different parameter value limits according to different virtual machine configuration information when optimizing system parameters.
[0105] The conversion module 504, connected to the determination module 502, is used to convert the parameter values of the elastic parameters based on the syntax format to obtain the target parameter values of the elastic parameters, and save the target parameter values to the corresponding tuner configuration file. The target parameter values are parameter values expressed in the syntax format.
[0106] In this embodiment, the parameter value configuration device can convert the parameter values of the elastic parameters using macro variables and save the converted parameter values to the corresponding tuner configuration file. This eliminates redundant file storage in the tuner configuration file due to the existence of elastic parameters, thereby solving the technical problem in related technologies where the existence of elastic parameters necessitates preparing configuration files and profile files for parameter values according to different situations, resulting in high management and maintenance costs for the configuration files and profile files. This achieves the technical effect of reducing the number of configuration files and profile files and improving the readability and maintainability of the tuner configuration file.
[0107] It should be noted here that the parameter value configuration device corresponds to the one described in Embodiment 1 above. Figure 2 The steps S202 to S204 are included. The above parameter value configuration device and the corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above module, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.
[0108] Example 4
[0109] According to another aspect of the embodiments of this application, a parameter value parsing device is also provided. Figure 6 This is a schematic diagram of the parameter value parsing device provided in the embodiments of this application, as shown below. Figure 6 As shown, the parameter value parsing device includes an acquisition module 602 and a parsing module 604. The parameter value parsing device will be described in detail below.
[0110] The acquisition module 602 is used to acquire the tuner configuration file, wherein the tuner configuration file contains the target parameter values of the elastic parameters; the elastic parameters are parameters that are limited to different parameter values according to different virtual machine configuration information when optimizing system parameters; the target parameter values are parameter values expressed in a syntax format, which is determined according to the macro variable type corresponding to the parameter values of the elastic parameters;
[0111] The parsing module 604, connected to the acquisition module 602, is used to parse the target parameter values based on the macro variable parsing method to obtain the parameter values required for system parameter optimization.
[0112] In this embodiment, the parameter value parsing device can convert the parameter values of the elastic parameters using macro variables and save the converted parameter values to the corresponding tuner configuration file. This eliminates redundant file storage in the tuner configuration file due to the existence of elastic parameters, thereby solving the technical problem in related technologies where the existence of elastic parameters necessitates preparing configuration files and profile files for parameter values according to different situations, resulting in high management and maintenance costs for the configuration files and profile files. This achieves the technical effect of reducing the number of configuration files and profile files and improving the readability and maintainability of the tuner configuration file.
[0113] In addition, the parameter value parsing device can also assign different parameter values to elastic parameters under different virtual machine configuration information by parsing macro variables in real time, thus realizing the flexible configuration and adaptability of elastic parameters.
[0114] It should be noted here that this parameter value parsing device corresponds to the one described in Embodiment 2 above. Figure 3 The included steps S302 to S304. The above-mentioned parameter value parsing device and the corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in the above embodiment 2. It should be noted that the above-mentioned module, as part of the device, can run in the computer terminal 10 provided in embodiment 1.
[0115] Example 5
[0116] According to another aspect of the embodiments of this application, an electronic device is also provided, which can be any one of the computer terminal devices in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal can also be replaced by a mobile terminal or other terminal device.
[0117] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0118] Optionally, in this embodiment, the computer device may include: a memory and a processor, the memory storing a computer program; and a processor for executing the computer program stored in the memory, wherein the computer program, when running, causes the processor to perform any of the method steps described above.
[0119] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the parameter value configuration method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the aforementioned parameter value configuration method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0120] Optionally, the processor can invoke the information and application stored in the memory through the transmission device to perform the following steps: determining the macro variable type and the syntax format of the macro variable type corresponding to the parameter value of the elastic parameter, wherein the elastic parameter is a parameter with different parameter value limits according to different virtual machine configuration information during system parameter optimization; converting the parameter value of the elastic parameter based on the syntax format to obtain the target parameter value of the elastic parameter, and saving the target parameter value to the corresponding tuner configuration file, wherein the target parameter value is the parameter value represented by the syntax format.
[0121] Optionally, in this embodiment, the processor may also execute program code for the following steps: determining the macro variable type corresponding to the parameter value of the elastic parameter, including: obtaining the association between the parameter value of the elastic parameter and the virtual machine configuration information, wherein the association includes at least one of the following: linear relationship, nonlinear relationship, and discrete relationship; when the association is a nonlinear relationship, the implicit variable is used as the macro variable type; when the association is a linear relationship or a discrete relationship, the explicit variable is used as the macro variable type.
[0122] Optionally, in this embodiment, the processor may also execute program code that performs the following steps: determining the syntax format corresponding to the macro variable type, including: when the macro variable type is an explicit variable, the syntax format is #!name#; when the macro variable type is an implicit variable, the syntax format is #?name#; where name represents virtual machine configuration information.
[0123] Optionally, in this embodiment, the processor may also execute program code that performs the following steps: the tuner configuration file includes a configuration file and a profile file, and the target parameter value is saved to the corresponding tuner configuration file, including: when the parameter value is a parameter range, the target parameter value is saved to the configuration file; when the parameter value is a parameter value, the target parameter value is saved to the profile file.
[0124] Optionally, in this embodiment, the processor may also execute program code that includes at least one of the following steps: the virtual machine configuration information includes the number of CPU cores of the virtual machine, the system architecture, and the system type.
[0125] In addition, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the parameter value parsing method and device in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the above-mentioned parameter value parsing method.
[0126] Optionally, the processor can invoke the information and application stored in the memory via the transmission device to perform the following steps: obtaining the tuner configuration file, wherein the tuner configuration file contains the target parameter values of the elastic parameters; the elastic parameters are parameters that are limited by different parameter values according to different virtual machine configuration information during system parameter optimization; the target parameter values are parameter values represented by a syntax format, which is determined according to the macro variable type corresponding to the parameter values of the elastic parameters; and parsing the target parameter values based on the macro variable parsing method to obtain the parameter values required for system parameter optimization.
[0127] Optionally, in this embodiment, the processor may also execute program code that performs the following steps: the target parameter value is obtained by converting the parameter value of the elastic parameter based on the syntax format, wherein the parameter value includes at least one of the following: parameter value and parameter range.
[0128] Optionally, in this embodiment, the processor may further execute program code that performs the following steps: parsing the target parameter value based on the macro variable parsing method to obtain the parameter value required for system parameter optimization, including: detecting the syntax format of the target parameter value and obtaining the macro variable type corresponding to the syntax format; when the macro variable type is an explicit variable, obtaining the system command code required to parse the explicit variable, parsing the explicit variable based on the system command code, and obtaining the parsed target value; or, when the macro variable type is an implicit variable, obtaining the parsing code required to parse the implicit variable, parsing the implicit variable based on the parsing code, and obtaining the parsed target value; performing numerical and logical operations on the parsed target value based on the macro variable's operational expression to obtain the parameter value required for system parameter optimization.
[0129] Optionally, in this embodiment, the processor may also execute program code with the following steps: after parsing the target parameter values based on the macro variable parsing method to obtain the parameter values required for system parameter optimization, the method further includes: when the tuner configuration file changes, updating the parameter values required for system parameter optimization by modifying any one of the following methods: modifying the macro variable's operation expression, modifying the macro variable's parsing method, or adding a new macro variable's definition method.
[0130] Example 6
[0131] According to another aspect of the embodiments of this application, a storage medium is also provided, which stores a program, wherein the program, when run by a processor, controls the processor to execute any of the method steps described above.
[0132] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0133] Optionally, in this embodiment, the storage medium can be used to store the program code corresponding to the parameter value configuration method provided in Embodiment 1, and the program code can be used to control the processor to execute the parameter value configuration method of any of the above when the processor runs.
[0134] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: determining the macro variable type and syntax format of the macro variable type corresponding to the parameter value of the elastic parameter, wherein the elastic parameter is a parameter with different parameter values limited according to different virtual machine configuration information during system parameter optimization; converting the parameter value of the elastic parameter based on the syntax format to obtain the target parameter value of the elastic parameter, and saving the target parameter value to the corresponding tuner configuration file, wherein the target parameter value is the parameter value represented by the syntax format.
[0135] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: determining the macro variable type corresponding to the parameter value of the elastic parameter, including: obtaining the association between the parameter value of the elastic parameter and the virtual machine configuration information, wherein the association includes at least one of the following: linear relationship, non-linear relationship, and discrete relationship; when the association is a non-linear relationship, the implicit variable is used as the macro variable type; when the association is a linear relationship or a discrete relationship, the explicit variable is used as the macro variable type.
[0136] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: determining the syntax format corresponding to the macro variable type, including: when the macro variable type is an explicit variable, the syntax format is #!name#; when the macro variable type is an implicit variable, the syntax format is #?name#; where name represents virtual machine configuration information.
[0137] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: the tuner configuration file includes a configuration file and a Profile file, and the target parameter value is saved to the corresponding tuner configuration file, including: when the parameter value is a parameter range, the target parameter value is saved to the configuration file; when the parameter value is a parameter value, the target parameter value is saved to the Profile file.
[0138] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: the virtual machine configuration information includes at least one of the following: the number of CPU cores of the virtual machine, the system architecture, and the system type.
[0139] Optionally, in this embodiment, the storage medium can be used to store the program code corresponding to the parameter value parsing method provided in Embodiment 2 above, and when the program code is run by the processor, it controls the processor to execute the parameter value parsing method of any of the above.
[0140] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining a tuner configuration file, wherein the tuner configuration file contains target parameter values for elastic parameters; elastic parameters are parameters that are limited by different parameter values based on different virtual machine configuration information during system parameter optimization; target parameter values are parameter values represented by a syntax format, the syntax format being determined based on the macro variable type corresponding to the parameter values of the elastic parameters; and parsing the target parameter values based on the macro variable parsing method to obtain the parameter values required for system parameter optimization.
[0141] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: the target parameter value is obtained by converting the parameter value of the elastic parameter based on the syntax format, wherein the parameter value includes at least one of the following: parameter value and parameter range.
[0142] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: parsing the target parameter value based on the macro variable parsing method to obtain the parameter value required for system parameter optimization, including: detecting the syntax format of the target parameter value and obtaining the macro variable type corresponding to the syntax format; when the macro variable type is an explicit variable, obtaining the system command code required for parsing the explicit variable, parsing the explicit variable based on the system command code, and obtaining the parsed target value; or, when the macro variable type is an implicit variable, obtaining the parsing code required for parsing the implicit variable, parsing the implicit variable based on the parsing code, and obtaining the parsed target value; performing numerical and logical operations on the parsed target value based on the macro variable's operational expression to obtain the parameter value required for system parameter optimization.
[0143] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: after parsing the target parameter values based on the macro variable parsing method to obtain the parameter values required for system parameter optimization, the method further includes: when the tuner configuration file changes, updating the parameter values required for system parameter optimization by modifying the macro variable's operation expression, modifying the macro variable's parsing method, or adding a new macro variable's definition method.
[0144] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0145] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0146] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or the indirect coupling or communication connection between modules may be electrical or other forms.
[0147] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0148] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0149] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0150] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for configuring parameter values, comprising: The macro variable type corresponding to the parameter value of the elastic parameter and the syntax format of the macro variable type are determined. The elastic parameter is a parameter with different parameter values limited according to different virtual machine configuration information when optimizing system parameters. The macro variable type is determined based on the correlation between the parameter value of the elastic parameter and the virtual machine configuration information. Different macro variable types correspond to different correlations. Based on the syntax format, the parameter values of the elastic parameter are converted to obtain the target parameter values of the elastic parameter, and the target parameter values are saved to the corresponding tuner configuration file, wherein the target parameter values are parameter values represented by the syntax format.
2. The method according to claim 1, wherein, Determining the macro variable type corresponding to the parameter values of the elasticity parameter includes: Obtain the correlation between the parameter values of the elasticity parameter and the virtual machine configuration information, wherein the correlation includes at least one of the following: linear relationship, nonlinear relationship, and discrete relationship; When the relationship is a non-linear relationship, the implicit variable is used as the macro variable type; When the relationship is a linear relationship or a discrete relationship, the explicit variable is used as the macro variable type.
3. The method according to claim 2, wherein, Determine the syntax format corresponding to the macro variable type, including: When the macro variable type is the explicit variable, the syntax format is #!name#; When the macro variable type is the implicit variable, the syntax format is #?name#; Wherein, name represents the virtual machine configuration information.
4. The method according to claim 1, wherein, The tuner configuration file includes a configuration file and a profile file. The target parameter values are saved to the corresponding tuner configuration file, including: When the parameter value is within a parameter range, the target parameter value is saved to the configuration file; When the parameter takes the value of a parameter, the target parameter value is saved to the Profile file.
5. The method according to any one of claims 1 to 4, wherein, The virtual machine configuration information includes at least one of the following: the number of CPU cores of the virtual machine, the system architecture, and the system type.
6. A method for parsing parameter values, comprising: Obtain the tuner configuration file, wherein the tuner configuration file contains target parameter values for elastic parameters; the elastic parameters are parameters that are limited to different parameter values based on different virtual machine configuration information during system parameter optimization; wherein the target parameter values are parameter values represented by a syntax format, the syntax format being determined based on the macro variable type corresponding to the parameter values of the elastic parameters, the macro variable type being determined based on the association relationship between the parameter values of the elastic parameters and the virtual machine configuration information, and different macro variable types corresponding to different association relationships; The target parameter values are analyzed using a macro-variable parsing method to obtain the parameter values required for system parameter optimization.
7. The method according to claim 6, wherein, The target parameter value is obtained by converting the parameter value of the elastic parameter based on the syntax format, wherein the parameter value includes at least one of the following: parameter value and parameter range.
8. The method according to claim 6, wherein, The target parameter values are analyzed using a macro-variable-based analytical method to obtain the parameter values required for system parameter optimization, including: Detect the syntax format of the target parameter value to obtain the macro variable type corresponding to the syntax format; When the macro variable type is an explicit variable, obtain the system command code required to parse the explicit variable, parse the explicit variable based on the system command code, and obtain the parsed target value; or, when the macro variable type is an implicit variable, obtain the parsing code required to parse the implicit variable, parse the implicit variable based on the parsing code, and obtain the parsed target value. Numerical and logical operations are performed on the parsed target value based on the macro variable's operational expression to obtain the parameter values required for system parameter optimization.
9. The method according to claim 6, wherein, After parsing the target parameter values using a macro-variable-based analytical method to obtain the parameter values required for system parameter optimization, the method further includes: When the tuner configuration file changes, the parameter values required for system parameter optimization can be updated by modifying any one of the following methods: modifying the operation expression of macro variables, modifying the parsing method of macro variables, or adding a definition method for macro variables.
10. An electronic device, comprising: A memory and a processor, wherein the memory stores a computer program; The processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, the processor performs the method steps of any one of claims 1 to 9.
11. A storage medium storing a program, wherein, When the program is run by the processor, it controls the processor to execute the method steps of any one of claims 1 to 9.
Citation Information
Patent Citations
Configuration parameter recommendation method and system and computing equipment
CN114760196A
Automatic generation of hardware simulation interface code using pre-processor macros
US8839187B1
