CN112685074A - Method for visually modifying redis configuration based on rules - Google Patents
Method for visually modifying redis configuration based on rules Download PDFInfo
- Publication number
- CN112685074A CN112685074A CN202011587272.8A CN202011587272A CN112685074A CN 112685074 A CN112685074 A CN 112685074A CN 202011587272 A CN202011587272 A CN 202011587272A CN 112685074 A CN112685074 A CN 112685074A
- Authority
- CN
- China
- Prior art keywords
- parameters
- modified
- redis
- configuration
- configuration file
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012795 verification Methods 0.000 claims abstract description 12
- 230000008569 process Effects 0.000 claims description 6
- 230000004048 modification Effects 0.000 abstract description 4
- 238000012986 modification Methods 0.000 abstract description 4
- 230000000007 visual effect Effects 0.000 abstract description 3
- 238000012800 visualization Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
Images
Abstract
The invention provides a visual method for modifying redis configuration based on rules, which selects parameters to be modified through a UI end, and the UI can carry out preliminary verification on the modified parameters; if the verification is qualified, a request is constructed and sent to the server side; the server checks the transmitted parameters, judges whether the parameters can be modified or not, if the parameters can be modified, connects the redis service node, and sets the parameters of the configuration file; and the server side circularly traverses all the parameters and writes the parameters back to the configuration file. The configuration method of the invention firstly clearly knows which parameters can be modified by the user through a visual UI service, and also displays the description of the parameters to the client in a more intuitive way, and most importantly, the modification range of the provided parameters greatly avoids the occurrence of unreasonable parameters which are modified and input by the user.
Description
Technical Field
The invention belongs to the technical field of software file configuration, and particularly relates to a method for visually modifying redis configuration based on rules.
Background
In the current design implementation, if a user modifies a configuration file of redis, only a client based on the redis can modify the configuration file, and there is no clear rule to direct the user to modify the configured value. Unless the user needs to spend a great deal of time and effort to learn the parameters that can be modified. Embodied in selectable values, rules, etc.
In the present situation, if a user wants to modify a configuration parameter in a redis, a command needs to be executed at a client of the redis, and there is no reference to which to select, for example, a name of the parameter, an optional value of the parameter, and the like.
The prior art has the following defects:
1: a great deal of effort is required to understand the meaning of parameters in the existing redis, and the values that can be changed;
2: the method is operated by a pure command line, and no interface UI is displayed friendly;
3: can only be added via the command line; time consuming and cumbersome, and requires time to understand the meaning of the parameters and the range of values that can be changed.
Disclosure of Invention
In view of this, the present invention is directed to a method for visually modifying a redis configuration based on rules, so as to solve the problem that a configuration file in the prior art can only be added through a command line; time consuming and cumbersome, and requires time to understand the meaning of the parameters and the range of values that can be changed.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of visualizing rule-based modification of a redis configuration, comprising the steps of:
s1, selecting parameters to be modified through a UI end, and carrying out preliminary verification on the modified parameters through the UI end;
s2, if the verification is qualified, a request is constructed and sent to the server side;
s3, the server checks the transmitted parameters, judges whether the parameters can be modified, if so, connects the redis service node, and sets the parameters of the configuration file;
and S4, the server side circularly traverses all the parameters and writes the parameters back to the configuration file.
Further, the parameters modified in step S1 may be single or multiple.
Further, the parameters include types and values.
Further, the verification process in step S1 is: and comparing the parameters modified by the UI with a preset range to judge whether the parameters are in the range.
Further, the procedure of checking the transmitted parameters in step S3 is as follows: the server checks according to the defined configuration file, if the parameters are all parameters which can be modified, the parameters are extracted according to the set json data, and the parameters are compared with the defined numerical value range through the transmitted parameter values.
Further, the configuration file parameter setting process in S4 is as follows: the server will connect to the redis node and execute a command for the configset parameter value, which is a command of the redis itself, with the aim that the config set is set for the parameters of the configuration file.
Compared with the prior art, the method for modifying the redis configuration based on the visualization rules has the following advantages:
(1) the configuration method of the invention firstly clearly knows which parameters can be modified by the user through a visual UI service, and also displays the description of the parameters to the client in a more intuitive way, and most importantly, the modification range of the provided parameters greatly avoids the occurrence of unreasonable parameters which are modified and input by the user.
(2) The configuration method of the invention simultaneously shields the operation of the redis bottom layer, and enables the user to directly complete the desired change at the UI end.
(3) Compared with the traditional command line, the description of the UI end is simpler and easier to understand, and a user only needs to select the UI end to display for operation according to the guidance.
(4) According to the configuration method, UI visualization is more excellent for user experience.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a method for visualizing a rule-based modified redis configuration according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1, a method for visualizing a rule-based modified redis configuration includes the following steps:
s1, selecting parameters to be modified through a UI end, and carrying out preliminary verification on the modified parameters through the UI end;
s2, if the verification is qualified, a request is constructed and sent to the server side;
s3, the server checks the transmitted parameters, judges whether the parameters can be modified, if so, connects the redis service node, and sets the parameters of the configuration file;
and S4, the server side circularly traverses all the parameters and writes the parameters back to the configuration file.
The parameters modified in step S1 may be single or multiple.
The parameters comprise types and numerical values.
The verification process in step S1 is: and comparing the parameters modified by the UI with a preset range to judge whether the parameters are in the range.
The procedure of checking the passed parameters in step S3 is as follows: the server checks according to the defined configuration file, if the parameters are all parameters which can be modified, the parameters are extracted according to the set json data, and the parameters are compared with the defined numerical value range through the transmitted parameter values.
The configuration file parameter setting process in S4 is as follows: the server will connect to the redis node and execute a command for the configset parameter value, which is a command of the redis itself, with the aim that the config set is set for the parameters of the configuration file.
The specific method comprises the following steps:
selecting parameters to be modified through a UI end, selecting and modifying single or multiple parameters, and the UI can carry out preliminary verification on the modified parameters, firstly, verifying whether the parameters meet the conditions, specifically comprising types and numerical values, because the default can provide the range of selectable values and checking whether the range of the selectable values is in; after the UI end passes through the parameter range, a request is constructed and sent to the server end after parameter value checking, the server firstly checks the transmitted parameters according to a defined configuration file, and generally, the server has a preset parameter list to define which parameters can be modified;
if all are modifiable, they are extracted from the set json data, and the incoming values must satisfy the defined conditions by comparing the incoming parameter values with the already defined range of values. All checks are correct, the server will connect the redis nodes and execute the command of config set parameter value, which is the command of the redis itself, aiming at that config set is just setting the parameters of the configuration file, for example, we set config set dbfilename dump. rdb is just setting the name of the persistent text of the redis. And finally, after all the parameters are executed in a traversal cycle, uniformly writing the parameters back to the configuration file.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (6)
1. A method for visualizing a rule-based modified redis configuration, comprising the steps of:
s1, selecting parameters to be modified through a UI end, and carrying out preliminary verification on the modified parameters through the UI end;
s2, if the verification is qualified, a request is constructed and sent to the server side;
s3, the server checks the transmitted parameters, judges whether the parameters can be modified, if so, connects the redis service node, and sets the parameters of the configuration file;
and S4, the server side circularly traverses all the parameters and writes the parameters back to the configuration file.
2. A method for visualizing a rule-based modified redis configuration as in claim 1, wherein: the parameters modified in step S1 may be single or multiple.
3. A method for visualizing a rule-based modified redis configuration as in claim 1, wherein: the parameters comprise types and numerical values.
4. A method for visualizing a rule-based modified redis configuration as in claim 1, wherein: the verification process in step S1 is: and comparing the parameters modified by the UI with a preset range to judge whether the parameters are in the range.
5. A method for visualizing a rule-based modified redis configuration as in claim 1, wherein: the procedure of checking the passed parameters in step S3 is as follows: the server checks according to the defined configuration file, if the parameters are all parameters which can be modified, the parameters are extracted according to the set json data, and the parameters are compared with the defined numerical value range through the transmitted parameter values.
6. A method for visualizing a rule-based modified redis configuration as in claim 1, wherein: the configuration file parameter setting process in S4 is as follows: the server will connect to the redis node and execute a command for the configset parameter value, which is a command of the redis itself, with the aim that the config set is set for the parameters of the configuration file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011587272.8A CN112685074A (en) | 2020-12-28 | 2020-12-28 | Method for visually modifying redis configuration based on rules |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011587272.8A CN112685074A (en) | 2020-12-28 | 2020-12-28 | Method for visually modifying redis configuration based on rules |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112685074A true CN112685074A (en) | 2021-04-20 |
Family
ID=75454735
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011587272.8A Pending CN112685074A (en) | 2020-12-28 | 2020-12-28 | Method for visually modifying redis configuration based on rules |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112685074A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1790257A (en) * | 2004-12-13 | 2006-06-21 | 华为技术有限公司 | Method for uniformly configuring configuration files |
CN1862538A (en) * | 2006-02-27 | 2006-11-15 | 华为技术有限公司 | Data configuration system and method for implementing data configuration |
US20110154237A1 (en) * | 2009-12-18 | 2011-06-23 | Roche Diagnostics Operations, Inc. | Methods, systems and computer readable media for modifying parameters of a configuration file |
CN103516529A (en) * | 2012-06-20 | 2014-01-15 | 中兴通讯股份有限公司 | Management method, device and system of configuration files |
CN111522543A (en) * | 2020-04-16 | 2020-08-11 | 科大国创云网科技有限公司 | Visual application component arrangement method and system |
-
2020
- 2020-12-28 CN CN202011587272.8A patent/CN112685074A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1790257A (en) * | 2004-12-13 | 2006-06-21 | 华为技术有限公司 | Method for uniformly configuring configuration files |
CN1862538A (en) * | 2006-02-27 | 2006-11-15 | 华为技术有限公司 | Data configuration system and method for implementing data configuration |
US20110154237A1 (en) * | 2009-12-18 | 2011-06-23 | Roche Diagnostics Operations, Inc. | Methods, systems and computer readable media for modifying parameters of a configuration file |
CN103516529A (en) * | 2012-06-20 | 2014-01-15 | 中兴通讯股份有限公司 | Management method, device and system of configuration files |
CN111522543A (en) * | 2020-04-16 | 2020-08-11 | 科大国创云网科技有限公司 | Visual application component arrangement method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20080092069A1 (en) | Graphical representation of a port security state | |
US9210049B2 (en) | Intelligent infrastructure management user device | |
US7937432B2 (en) | State transition management according to a workflow management policy | |
US8655275B2 (en) | Device setup extension for applications | |
US20140082471A1 (en) | Displaying a Syntactic Entity | |
CN107037998A (en) | The message processing device and its control method and storage medium of module are installed | |
CN112685074A (en) | Method for visually modifying redis configuration based on rules | |
CN111930290A (en) | Resource deployment method and device | |
US20050050196A1 (en) | Method and apparatus for managing and graphically representing elements in a network | |
KR20100032683A (en) | Method for notifying status information and image forming device using the same | |
JP2004070886A (en) | Setting method for disk array device, program, information processor, and disk array device | |
JP2008523756A (en) | Viewing configuration status | |
CN106301855A (en) | A kind of NMS dispositions method, device and NMS | |
CN112242909B (en) | Method and device for generating management template, electronic equipment and storage medium | |
CN110866054A (en) | Label configuration method and device and computer storage medium | |
WO2022083702A1 (en) | Vehicle diagnosis data display method and system, and mobile terminal and storage medium | |
CN109102248A (en) | Amending method, device and the computer readable storage medium of nodal information | |
CN106736071A (en) | Welding system and welding system control method | |
CN111585804A (en) | Router automatic configuration system, router automatic configuration method and automatic test system | |
CN113746656A (en) | Method, device and equipment for evaluating network operation influence | |
KR20100135419A (en) | Display device and method for displaying thereof | |
CN111580817A (en) | Front-end implementation method for visual monitoring of resources | |
JP2014175842A (en) | Test device | |
KR20180057086A (en) | System and method for setting detection of network function virtualization | |
CA2785062C (en) | A method and system for communicating between computing devices |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210420 |