Hierarchical parameter processing inheritance and interactive configuration method, device, medium and product
By defining and dynamically analyzing the metadata of parameter configuration items, the flexibility and scalability problems of parameter configuration management in the information system are solved, efficient parameter configuration and user interaction are achieved, and maintenance costs and dynamic adjustment difficulties are reduced.
Patent Information
- Application Number
- CN202411253814.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-09
AI Technical Summary
Existing information systems have problems such as difficulty in maintaining, poor flexibility, poor scalability, complex inheritance and insufficient user interaction in parameter configuration and management, especially when the system is expanded and complex, which leads to high maintenance costs and difficulty in dynamic adjustment.
Dynamically parsing and rendering configuration items are performed by defining the metadata of parameter configuration items, including parameter identification, view type, verification rules, default values, effective conditions and disabled status, etc., and according to the level according to the customer ID, device ID and parameter ID, it is 3D. Get the effective value of the parameter configuration item, implement interactive configuration, and dynamically generate user interface elements to improve user interactivity.
It realizes parameter configuration management with high flexibility, low maintenance cost, strong scalability and strong real-time performance, and can easily adapt to complex and changeable business needs, reduces the difficulty of dynamic adjustment and the problem of rigid inheritance rules, and improves user interaction experience.
Smart Images

Figure CN119201207A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing, and in particular to a hierarchical parameter processing inheritance and interactive configuration method, device, medium and product. Background Art
[0002] In modern information systems, especially large enterprise systems and complex applications, parameter configuration and management are crucial. A system may contain hundreds or even thousands of configuration items, which involve various levels and modules of the system, such as database connection parameters, cache configuration, user permission settings, etc.
[0003] Currently, most systems use hard-coding to manage these configuration items, which means that each configuration item is defined in a fixed form in the code or configuration file. Although this method is intuitive, it gradually exposes the following problems as the system expands and becomes more complex:
[0004] (1) Difficult maintenance: Each time a configuration item is added or modified, multiple files need to be reviewed and modified, which can easily lead to errors.
[0005] (2) Poor flexibility: The hard-coding method limits the dynamic adjustment capability of configuration items and makes it difficult to adapt to rapidly changing business needs.
[0006] (3) Poor scalability: When adding new modules or layers, a lot of modification and testing work is required, which affects the stability of the system.
[0007] (4) Complex inheritance: Parameter inheritance between levels relies on fixed rules, which makes it difficult to flexibly handle the needs of different scenarios.
[0008] In the prior art, some systems attempt to solve the above problems by enhancing configuration files. These systems usually adopt a hierarchical configuration file structure and manage parameters through predefined inheritance rules. However, although this method alleviates the problems caused by hard coding to a certain extent, it still has the following disadvantages:
[0009] (1) Rigid inheritance rules: Inheritance rules are usually fixed and difficult to flexibly adjust according to specific business needs.
[0010] (2) Difficulty in dynamic adjustment: Although the configuration file can be modified manually, it lacks flexible dynamic adjustment and real-time effectiveness capabilities.
[0011] (3) Insufficient user interaction: Most existing solutions lack a friendly user interface, making it difficult for users to intuitively view and modify configuration items.
[0012] (4) High maintenance cost: In complex systems, the hierarchical structure of configuration files may be very complex, and maintenance still requires a lot of manpower. Summary of the invention
[0013] In order to solve the above problems existing in the prior art, the present application provides a hierarchical parameter processing inheritance and interactive configuration method, device, medium and product.
[0014] To achieve the above objectives, this application provides the following solutions:
[0015] In a first aspect, the present application provides a hierarchical parameter processing inheritance and interactive configuration method, including:
[0016] Metadata defining parameter configuration items; the metadata including one or more of parameter identifier, view type, validation rule, default value, validity condition, disabled state, and list length;
[0017] Dynamically parsing the metadata to obtain parsing results;
[0018] Rendering the configuration item based on the parsing result to obtain a rendering result of the configuration item;
[0019] Obtaining the effective value of the parameter configuration item in a hierarchical manner according to the customer ID, device ID and parameter ID; the effective value of the parameter configuration item includes one or more of the customer ID and device ID level parameter value, customer level parameter value, device level global parameter value and default parameter value;
[0020] The rendering result of the configuration item and the effective value of the parameter configuration item are interactively configured to obtain an interactive configuration result.
[0021] Optionally, the metadata is dynamically parsed to obtain a parsing result, which specifically includes:
[0022] Parsing and extracting key information in the metadata; the key information includes one or more of parameter identifier, view type, validation rule, enumeration member, default value, unit, validity condition, disabled state and list length;
[0023] A user interface element corresponding to the key information is dynamically generated based on the key information.
[0024] Optionally, rendering the configuration item based on the parsing result to obtain the rendering result of the configuration item specifically includes:
[0025] The level division of configuration items is realized through the key field to obtain the level division group;
[0026] Acquire the description information corresponding to each level in the level division group according to the key value;
[0027] Get the configuration items belonging to the same group through the groupId field;
[0028] Based on the parsing result and the description information corresponding to each level in the level division group, the configuration items belonging to the same group are framed together for rendering to obtain a rendering result of the configuration items.
[0029] Optionally, in the process of rendering the configuration items belonging to the same group together by framing them based on the parsing result and the description information corresponding to each level in the level division group, and obtaining the rendering result of the configuration items, the range of the frame is determined based on the validators field of the configuration items.
[0030] Optionally, the effective value of the parameter configuration item is obtained according to the customer ID, device ID and parameter ID in a hierarchical acquisition manner, specifically including:
[0031] Send a request to query the customer ID and device ID level parameter values according to the customer ID and device ID, and determine whether the customer ID and device ID level parameter values exist;
[0032] When the customer ID and device ID level parameter values exist, the customer ID and device ID level parameter values are returned as the effective values of the configuration items;
[0033] When the customer ID and device ID level parameter value do not exist, query the customer level parameter value according to the customer ID and parameter ID, and determine whether the customer level parameter value exists;
[0034] When the client-level parameter value exists, the client-level parameter value is returned as the effective value of the configuration item;
[0035] When the client-level parameter value does not exist, query the device-level global parameter value according to the parameter ID, and determine whether the device-level global parameter value exists;
[0036] When the device-level global parameter value exists, the device-level global parameter value is returned as the effective value of the configuration item;
[0037] When the device-level global parameter value does not exist, querying a default parameter value and determining whether the default parameter value exists;
[0038] When the default parameter value exists, the default parameter value is returned as the effective value of the configuration item;
[0039] When the default parameter value does not exist, the default value is obtained from the metadata according to the parameter ID or an undefined value is returned or an error message is indicated.
[0040] Optionally, interactively configuring the rendering result of the configuration item and the effective value of the parameter configuration item to obtain an interactive configuration result specifically includes:
[0041] Determine that each parameter complies with the verification rule based on the verification logic, and set the linkage relationship between the parameters and the inheritance relationship between the parameters;
[0042] Based on the linkage relationship between parameters, the inheritance relationship between parameters and the rendering results of the configuration items, interactive configuration is performed to generate an interactive configuration interface and obtain an interactive configuration result.
[0043] Optionally, the interactive configuration interface includes a pop-up display, a clear configuration interface and a parameter setting default interface; the pop-up display includes one or more of the parameter name, parameter category, parameter value before modification, parameter value after modification, effective range, effective conditions, modification reason and removal operation.
[0044] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the hierarchical parameter processing inheritance and interactive configuration method provided above.
[0045] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the hierarchical parameter processing inheritance and interactive configuration method provided above.
[0046] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the hierarchical parameter processing inheritance and interactive configuration method provided above.
[0047] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0048] The present application provides a hierarchical parameter processing inheritance and interactive configuration method, device, medium and product. By defining metadata, it can easily adapt to complex and changing business needs, improve flexibility, reduce the difficulty of dynamic adjustment, and solve the problem of rigid inheritance rules. There is no need to modify the code and configuration files. Parameter adjustment can be completed by adjusting the defined metadata. There is no need to make large-scale changes to the code, which can reduce maintenance costs and increase scalability. The obtained interactive configuration results can be called at any time after the parameter inheritance processing is completed, which can improve user interaction and solve the problem of insufficient user interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 This is an application environment diagram of a hierarchical parameter processing inheritance and interactive configuration method in an embodiment of the present application;
[0051] Figure 2 A flowchart of a hierarchical parameter processing inheritance and interactive configuration method provided in one embodiment of the present application;
[0052] Figure 3 A schematic diagram of a partial interface of the final rendering results of two configuration items provided in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of a process for obtaining a valid value of a parameter configuration item provided in an embodiment of the present application;
[0054] Figure 5 A schematic diagram of a configuration item setting interface during the parameter configuration item validation process provided in an embodiment of the present application;
[0055] Figure 6 A schematic diagram of a default interface for parameter settings provided in an embodiment of the present application;
[0056] Figure 7 Schematic diagram of the interface for inheriting label parameters at all levels provided by an embodiment of the present application;
[0057] Figure 8 A schematic diagram of a pop-up window display interface provided in an embodiment of the present application;
[0058] Fig. 9 A schematic diagram of a clear configuration interface provided by an embodiment of the present application;
[0059] Fig.10 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0061] In the known technology, the method of managing these configuration items in a hard-coded manner can be exemplified as follows:
[0062] database.host = 127.0.0.1
[0063] database.port=3306
[0064] cache.size=1024
[0065] user.default_role=gues
[0066] Examples of ways to solve existing problems such as complex inheritance, poor scalability, poor flexibility, and difficult maintenance by enhancing configuration files are:
[0067] #Default Configuration
[0068] default:
[0069] discount:5%
[0070] currency:USD
[0071] #Electronic product configuration
[0072] electronics:
[0073] discount:10%
[0074] warranty:2years
[0075] #Mobile phone configuration
[0076] electronics / mobiles:
[0077] discount:15%
[0078] Warranty:1year
[0079] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0080] The hierarchical parameter processing inheritance and interactive configuration method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the hierarchical parameters to the server 104. After the server 104 receives the hierarchical parameters, the server 104 defines the metadata of the parameter configuration items for the hierarchical parameters. The metadata is dynamically parsed to obtain the parsing result. The configuration items are rendered based on the parsing results to obtain the rendering results of the configuration items. The rendering results of the configuration items and the effective values of the parameter configuration items are interactively configured to obtain the interactive configuration results. The server 104 can feedback the obtained interactive configuration results to the terminal 102. In addition, in some embodiments, the hierarchical parameter processing inheritance and interactive configuration method can also be implemented separately by the server 104 or the terminal 102, such as the terminal 102 can directly perform inheritance and interactive configuration processing on the hierarchical parameters, or the server 104 can obtain the hierarchical parameters from the data storage system and perform inheritance and interactive configuration processing on the hierarchical parameters.
[0081] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.
[0082] In an exemplary embodiment, Figure 2 As shown, a hierarchical parameter processing inheritance and interactive configuration method is provided, which is executed by a computer device, and can be specifically executed by a computer device such as a terminal or a server alone, or can be executed by a terminal and a server together. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps 200 to 204. Among them:
[0083] Step 200: Define metadata of parameter configuration items. The metadata includes one or more of parameter identifier, view type, validation rule, default value, validation condition, disabled state, and list length.
[0084] Step 201: Dynamically parse the metadata to obtain a parsing result.
[0085] Step 202: Render the configuration item based on the parsing result to obtain a rendering result of the configuration item.
[0086] Step 203: Obtain the effective value of the parameter configuration item in a hierarchical manner according to the customer ID, device ID and parameter ID. The effective value of the parameter configuration item includes one or more of customer ID and device ID level parameter values, customer level parameter values, device level global parameter values and default parameter values.
[0087] Step 204: interactively configure the rendering result of the configuration item and the effective value of the parameter configuration item to obtain an interactive configuration result.
[0088] By implementing the above steps 200 to 204, the present application can improve flexibility, reduce the difficulty of dynamic adjustment, and solve the problem of rigid inheritance rules. It can also reduce maintenance costs, increase scalability, improve user interaction, and solve the problem of insufficient user interaction.
[0089] In another exemplary embodiment of the present application, in order to reduce the subsequent code maintenance cost, metadata can be used to define the rules for parameter rendering at each level. Based on this, taking the front-end system rendering the corresponding configuration items based on the defined metadata as an example, the definition of metadata can cover the following key information:
[0090] (1) Parameter Identifier: Each parameter has a unique identifier (such as "acceleration.MaxQuickAcks"), where "acceleration" indicates the functional area to which the parameter is related.
[0091] (2) View type: The way parameters are displayed in the user interface, such as numeric input box, range input box, radio button, multiple-choice box, switch, etc.
[0092] (3) Verification rules: Provide basic data verification support for the front-end system, including the setting of minimum and maximum values.
[0093] (4) Enumeration members: Specific to the option values of a single-select or multi-select check box, which may require internationalization processing.
[0094] (5)Default value: The default configuration value of the parameter.
[0095] (6) Unit: The unit display of the parameter value, such as "meter", "second", etc.
[0096] (7) Effective conditions: The conditions under which the configuration changes take effect, such as immediate effect or after the device is restarted.
[0097] (8) Disabled state: Indicates whether the parameter configuration item can be modified or is for viewing only.
[0098] (9) List length: used to define the number of input boxes contained in a parameter configuration item that contains multiple numeric inputs.
[0099] This metadata definition mechanism not only simplifies the configuration rendering process of the front-end system, but also provides a reliable way to ensure that various configuration items meet the predetermined business rules and user needs. In this way, the user interaction experience and the overall performance of the system can be effectively improved.
[0100] In addition, different formats (such as YAML, XML) can be used instead of JSON format to define metadata, but the overall steps remain the same.
[0101] In another exemplary embodiment of the present application, through the definition of the above metadata, each parameter configuration item can be dynamically parsed and rendered to achieve a high degree of customization and scalability. In addition, the metadata-driven design also significantly reduces the subsequent maintenance costs and improves the flexibility of system configuration. For example, after the defined metadata information is transmitted to the front-end system via the browser's application programming interface (Application Programming Interface, API), the front-end system will dynamically parse the metadata. The specific process of parsing includes the following steps:
[0102] Step 1: Deconstruct metadata: parse and extract key information from metadata. Key information includes one or more of parameter identifier, view type, validation rule, enumeration member, default value, unit, validity condition, disabled state, and list length.
[0103] Step 2: Generate interface elements: dynamically generate user interface elements corresponding to the key information based on the key information.
[0104] The corresponding user interface elements can be dynamically generated according to the view type, disabled state, unit and other fields in the metadata. For example, if the view type is a numeric input box, a numeric input field is generated. If it is a multiple-select box, a selection box containing multiple options is generated.
[0105] Based on the description of this embodiment, this metadata-based dynamic parsing mechanism greatly improves the flexibility and scalability of the system.
[0106] In another exemplary embodiment of the present application, in order to accurately render the user interface, the implementation of step 202 may include:
[0107] Step 1: Use the key field to implement level division of configuration items and obtain level division groups.
[0108] Step 2: Obtain the description information corresponding to each level in the level division group according to the key value.
[0109] Step 3: Get the configuration items belonging to the same group through the groupId field.
[0110] Step 4: Based on the parsing result and the description information corresponding to each level in the level division group, the configuration items belonging to the same group are framed together for rendering to obtain a rendering result of the configuration items.
[0111] In actual application, metadata can be dynamically parsed when the system page is loaded to achieve dynamic rendering of parameter configuration items. In this process, the parsing module can be replaced according to specific needs, but it must be ensured that the parsing process can correctly generate the parameter tree.
[0112] Taking the use of a front-end system to implement rendering of two configuration items as an example, the rendering process of the configuration items provided above in this embodiment is described.
[0113] First, the key field can be used to group the configuration items of the two parameters at the engine level. At the same time, the corresponding description information can be found in the files of the front-end system according to the key value.
[0114] Secondly, through the groupId field, it is found that the two configuration items are in the same group, so the two parameter configuration items will be framed together when the subsequent page is rendered.
[0115] Assume that the type fields of the two configuration items are both integer, indicating that they are both numeric input boxes. Figure 3 As shown in the figure, the defaultValue field of the threshold parameter for triggering the maximum transmission unit rebound time of the normal traffic path is 600000, indicating that its default value is 600000, and the text information of the corresponding numeric input box when no value is entered is 600000.
[0116] The defaultValue field of the parameter that triggers the tunnel traffic path maximum transmission unit rebound duration threshold is 500000, indicating that its default value is 500000. The text information in the corresponding numeric input box when no value is entered is 500000.
[0117] The units fields of the two configuration items (i.e., the normal traffic path maximum transmission unit increase time threshold parameter and the tunnel traffic path maximum transmission unit increase time threshold parameter) are also milliseconds, indicating that a millisecond unit prompt will be added after the number input box.
[0118] The validators field of the two parameter configuration items is {"max":3600000,"min":0}, which means that the minimum value is 0 and the maximum value is 3600000. The configuration item input box rendered by the front-end system will not allow users to fill in values outside this range, and this information will be displayed in the prompt pop-up window of the corresponding configuration item.
[0119] The effectiveCondition field of both parameter configuration items is immediately, which means that after the value of this configuration item is modified, it will take effect immediately on the device, and this information will be displayed in the prompt pop-up window of the corresponding configuration item. The final rendering results of the two configuration items are as follows Figure 4 shown.
[0120] The metadata information implementation code of the two configuration items is as follows:
[0121] {
[0122] "key":"engine.PmtuRegrowMS",#Parameter identifier, used to find the corresponding description information in the front-end internationalization file, that is, the parameter name is the maximum transmission unit rebound time threshold for triggering the normal traffic path
[0123] "groupId":"pmtu-regrow-ms",#The group ID of the parameter, used to frame this parameter together with the parameters in the same group when rendering the page
[0124] "type":"integer",#Parameter type, indicating that the parameter is a numeric input box
[0125] "defaultValue":600000,#The default value of the parameter is 600000, which corresponds to the text displayed when no value is entered in the input box
[0126] #The array is used here to deal with scenarios with multiple input box parameter types
[0127] "units":[
[0128] "milliseconds" #The parameter unit is milliseconds, and the unit prompt of ms will be added after the input box
[0129] ],
[0130] "validators":{
[0131] "max":3600000,#The maximum value of the parameter is 3600000
[0132] "min":0#The minimum value of the parameter is 0. The front-end input box does not allow users to enter values outside this range.
[0133] },
[0134] "effectiveCondition":"immediately",#Parameter modification will take effect immediately in the device
[0135] }
[0136] {
[0137] "key":"engine.LttPmtuRegrowMS",#Parameter identifier, used to find the corresponding description information in the front-end internationalization file, that is, the parameter name is the maximum transmission unit rebound time threshold parameter for triggering tunnel traffic path "groupId":"pmtu-regrow-ms",#The group ID of the parameter is used to frame this parameter together with the parameters in the same group when rendering the page
[0138] "type":"integer",#Parameter type, indicating that the parameter is a numeric input box "defaultValue":500000,#The default value of the parameter is 500000, corresponding to the text display of the input box when no value is entered "units":[
[0139] "milliseconds" #The parameter unit is milliseconds, and the unit prompt of ms will be added after the input box
[0140] ],
[0141] "validators":{
[0142] "max":3600000,#The maximum value of the parameter is 3600000
[0143] "min":0#The minimum value of the parameter is 0. The front-end input box does not allow users to enter values outside this range.
[0144] },
[0145] #After the parameter is modified, it will take effect immediately in the device
[0146] "effectiveCondition":"immediately",
[0147] }
[0148] In another exemplary embodiment of the present application, through the above description, all parameter configuration item input boxes have been rendered on the page, but the specific values of these parameters have not been obtained. In order to ensure the flexibility and accuracy of the parameter configuration items, the final effective value of the parameter configuration items can be queried and determined layer by layer according to the priority order of different levels to ensure the rationality and practicality of the system configuration. In this embodiment, the value of the corresponding parameter can be obtained by requesting an API. Based on this, Figure 4 As shown, the implementation process of the above step 203 may include:
[0149] Step 1: Send a request to query the customer ID and device ID level parameter values according to the customer ID and device ID, and determine whether the customer ID and device ID level parameter values exist.
[0150] Step 2: When the customer ID and device ID level parameter values exist, the customer ID and device ID level parameter values are returned as effective values of the configuration items.
[0151] Step 3: When the customer ID and device ID level parameter value does not exist, query the customer level parameter value according to the customer ID and parameter ID, and determine whether the customer level parameter value exists.
[0152] Step 4: When the customer-level parameter value exists, the customer-level parameter value is returned as the effective value of the configuration item.
[0153] Step 5: When the client-level parameter value does not exist, query the device-level global parameter value according to the parameter ID and determine whether the device-level global parameter value exists.
[0154] Step 6: When the device-level global parameter value exists, the device-level global parameter value is returned as the effective value of the configuration item.
[0155] Step 7: When the device-level global parameter value does not exist, query the default parameter value and determine whether the default parameter value exists.
[0156] Step 8: If a default parameter value exists, the default parameter value is returned as the effective value of the configuration item.
[0157] Step 9: When the default parameter value does not exist, the default value is obtained from the metadata according to the parameter ID or an undefined value is returned or an error message is indicated.
[0158] In the embodiment, the finally obtained parameter configuration item effective value has the following level relationship:
[0159] (1) Customer ID and device ID level parameter values: These have the highest priority and are used as the final effective values if they exist.
[0160] (2) Customer-level parameter value: Second priority. If the customer ID and device ID level parameter values do not exist, then this level parameter value is checked.
[0161] (3) Device-level global parameter value: Again takes precedence. If the customer-level parameter value does not exist, this level parameter value is checked.
[0162] (4) Default parameter value: The last one takes precedence. If no value exists for the first three items, the default value in the metadata definition is used.
[0163] In the process of implementing step 203 above, all data can be obtained from the database.
[0164] Taking the above two configuration items as an example, when the global level triggering the normal traffic path maximum transmission unit rebound time threshold parameter configuration item is changed to 500001 milliseconds, and the customer level triggering the tunnel traffic path maximum transmission unit rebound time threshold parameter configuration item is changed to 700000 milliseconds, then the interface will return the following fields:
[0165] {
[0166] "key":"engine.PmtuRegrowMS",#The unique identifier of the parameter, used to find the corresponding description information in the front-end internationalization file, that is, the parameter name is the maximum transmission unit rebound time threshold for triggering the normal traffic path"value":700000,#The value of the parameter that takes effect, currently 70000
[0167] "level":"CUSTOMER"#The inherited level, there are four levels of default global customer equipment, indicating which level of configuration item the value is inherited to, the current value is inherited to the customer level
[0168] },
[0169] {
[0170] "key":"engine.LttPmtuRegrowMS",#The unique identifier of the parameter, used to find the corresponding description information in the front-end internationalization file, that is, the parameter name is the threshold parameter for triggering the maximum transmission unit rebound time of the tunnel traffic path"value":500001,#The value of the parameter that takes effect, currently 500001
[0171] "level":"GLOBAL"#The inherited level, there are four levels of default global customer equipment, indicating which level of configuration item the value is inherited to, the current value is inherited to the global level
[0172] }
[0173] The level field here indicates which level this value is inherited from. If you view the two configuration items in the customer-level configuration items, since the PmtuRegrowMS parameter value is inherited from the customer level, that is, the current level, no inherited label is displayed, and the LttPmtuRegrowMS parameter value is inherited from the global level, there will be a G label on the left side of the configuration item input box to indicate that the value is inherited from the global level (such as Figure 5 shown).
[0174] In another exemplary embodiment of the present application, in order to provide real-time feedback and guidance when the user configures parameters, enhance the user experience and ensure the accuracy and compliance of the data, the process of obtaining the interactive configuration result in step 204 is described based on the dynamic parsing mechanism based on metadata described above.
[0175] Specific:
[0176] Step 1: Determine whether each parameter complies with the verification rules based on the verification logic, and set the linkage relationship between parameters and the inheritance relationship between parameters.
[0177] Step 2: Based on the linkage relationship between parameters, the inheritance relationship between parameters and the rendering results of configuration items, interactive configuration is performed to generate an interactive configuration interface and obtain interactive configuration results. The interactive configuration interface can provide a friendly user interface to facilitate users to configure, adjust and record parameters.
[0178] For example, the interactive configuration interface may include a pop-up window display, a clear configuration interface, and a parameter setting default interface. The pop-up window display includes one or more of the parameter name, parameter category, parameter value before modification, parameter value after modification, effective range, effective condition, modification reason, and removal operation. Among them, the parameter name and parameter category can be filtered.
[0179] In addition, the interactive configuration interface can be replaced by a desktop application or a mobile application, but it must be ensured that users can easily adjust parameters. The interactive configuration interface can be called at any time after the parameter inheritance process is completed.
[0180] In another exemplary embodiment of the present application, in the aforementioned embodiment, the parameter configuration interface can be dynamically generated through metadata, and the final effective value can be obtained through the API. Based on this, in this embodiment, how to display and manage these parameter configuration items in the interactive configuration interface is described, and how to correspond and associate them with the effective value obtained in the previous step. Among them:
[0181] (1) Parameter setting default interface.
[0182] By default, the interface displays all parameter input boxes and displays the current parameter effective values through placeholders. Figure 6 As shown, there is a prompt at the top, which is displayed by default and can be closed. It will be displayed again after re-entering the page.
[0183] The labels in this interface are used to display the parameter inheritance relationship. By default, all parameters are inherited from Default (default value). The descriptions of labels at each level are as follows: Figure 7 shown.
[0184] (2) Pop-up window display.
[0185] Take the parameter setting details pop-up window as an example. Figure 8 As shown in the figure, after clicking the Save button, a pop-up window displays the details of the currently modified parameters. After clicking OK, the parameter modification is completed, and the placeholders in the parameter setting default interface are replaced with the modified parameter values.
[0186] (3) Clear the configuration interface.
[0187] Take clearing the current level parameter configuration as an example. After clicking the Clear Configuration button, Fig. 9 As shown in the figure, the parameters that have been modified at the current level will be listed. Click the check box on the right, and then click Clear in the lower right corner. The backend will clear the effective value of the parameter at the current level in the database, thereby achieving the purpose of clearing the effective value of the parameter at the current level.
[0188] Based on the above description, compared with the prior art, the present application has the following advantages:
[0189] 1. High flexibility: By defining parameters and rules through metadata, it can easily adapt to complex and changing business needs.
[0190] 2. Low maintenance cost: No need to modify code and configuration files, parameter adjustment can be completed by adjusting the metadata file.
[0191] 3. Strong scalability: To add new levels or parameters, you only need to modify the metadata file, without making large-scale changes to the code.
[0192] 4. Strong real-time performance: With the help of dynamic analysis and interactive configuration interface, parameter adjustments can take effect in real time without restarting the system.
[0193] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store inheritance and interactive configuration processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a hierarchical parameter processing inheritance and interactive configuration method is implemented.
[0194] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0195] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0196] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0197] It should be noted that 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 this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0198] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0199] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.
[0200] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0201] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A hierarchical parameter processing inheritance and interactive configuration method, characterized in that: The hierarchical parameter processing inheritance and interactive configuration method includes: Metadata defining parameter configuration items; the metadata including one or more of parameter identifier, view type, validation rule, default value, validity condition, disabled state, and list length; Dynamically parsing the metadata to obtain parsing results; Rendering the configuration item based on the parsing result to obtain a rendering result of the configuration item; Obtaining the effective value of the parameter configuration item in a hierarchical manner according to the customer ID, device ID and parameter ID; the effective value of the parameter configuration item includes one or more of the customer ID and device ID level parameter value, customer level parameter value, device level global parameter value and default parameter value; The rendering result of the configuration item and the effective value of the parameter configuration item are interactively configured to obtain an interactive configuration result.
2. The hierarchical parameter processing inheritance and interactive configuration method according to claim 1, characterized in that: Dynamically parse the metadata to obtain parsing results, including: Parsing and extracting key information in the metadata; the key information includes one or more of parameter identifier, view type, validation rule, enumeration member, default value, unit, validity condition, disabled state and list length; A user interface element corresponding to the key information is dynamically generated based on the key information.
3. The hierarchical parameter processing inheritance and interactive configuration method according to claim 1, characterized in that: Rendering the configuration item based on the parsing result to obtain the rendering result of the configuration item specifically includes: The level division of configuration items is realized through the key field to obtain the level division group; Acquire the description information corresponding to each level in the level division group according to the key value; Get the configuration items belonging to the same group through the groupId field; Based on the parsing result and the description information corresponding to each level in the level division group, the configuration items belonging to the same group are framed together for rendering to obtain a rendering result of the configuration items.
4. The hierarchical parameter processing inheritance and interactive configuration method according to claim 3, characterized in that: In the process of rendering the configuration items belonging to the same group together based on the parsing result and the description information corresponding to each level in the level division group, and obtaining the rendering result of the configuration items, the range of the frame is determined based on the validators field of the configuration items.
5. The hierarchical parameter processing inheritance and interactive configuration method according to claim 1, characterized in that: The effective value of the parameter configuration item is obtained according to the hierarchical acquisition method based on the customer ID, device ID and parameter ID, including: Send a request to query the customer ID and device ID level parameter values according to the customer ID and device ID, and determine whether the customer ID and device ID level parameter values exist; When the customer ID and device ID level parameter values exist, the customer ID and device ID level parameter values are returned as the effective values of the configuration items; When the customer ID and device ID level parameter value do not exist, query the customer level parameter value according to the customer ID and parameter ID, and determine whether the customer level parameter value exists; When the client-level parameter value exists, the client-level parameter value is returned as the effective value of the configuration item; When the client-level parameter value does not exist, query the device-level global parameter value according to the parameter ID, and determine whether the device-level global parameter value exists; When the device-level global parameter value exists, the device-level global parameter value is returned as the effective value of the configuration item; When the device-level global parameter value does not exist, querying a default parameter value and determining whether the default parameter value exists; When the default parameter value exists, the default parameter value is returned as the effective value of the configuration item; When the default parameter value does not exist, the default value is obtained from the metadata according to the parameter ID or an undefined value is returned or an error message is indicated.
6. The hierarchical parameter processing inheritance and interactive configuration method according to claim 1, characterized in that: Interactively configure the rendering result of the configuration item and the effective value of the parameter configuration item to obtain an interactive configuration result, which specifically includes: Determine that each parameter complies with the verification rule based on the verification logic, and set the linkage relationship between the parameters and the inheritance relationship between the parameters; Based on the linkage relationship between parameters, the inheritance relationship between parameters and the rendering results of the configuration items, interactive configuration is performed to generate an interactive configuration interface and obtain an interactive configuration result.
7. The hierarchical parameter processing inheritance and interactive configuration method according to claim 6, characterized in that: The interactive configuration interface includes a pop-up display, a clear configuration interface and a parameter setting default interface; the pop-up display includes one or more of the parameter name, parameter category, parameter value before modification, parameter value after modification, effective range, effective conditions, modification reason and removal operation.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the hierarchical parameter processing inheritance and interactive configuration method described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the hierarchical parameter processing inheritance and interactive configuration method described in any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the hierarchical parameter processing inheritance and interactive configuration method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Dynamic form rendering method and related components
CN112395845A
Method and device for deploying service based on cluster, storage medium and equipment
CN114489720A
Configuration method and device of application configuration information, computer equipment and storage medium
CN115185573A
Full-client low-code dynamic generation interface optimization system and method
CN116225436A
System and method for weighting configuration item relationships supporting business critical impact analysis
US20090259501A1
Cited By
Data processing method and device for HDF5 data file
CN119883131A
Dynamic configuration management method and system under single-machine lightweight scene
CN120872405A