Parameter setting method, device, electronic device and storage medium

By creating interactive components through a two-dimensional list with consistent object types and a reflection mechanism, image processing parameters can be dynamically adjusted, which solves the problem of variable parameter types and data types and improves image processing efficiency and reusability.

CN116468711BActive Publication Date: 2025-09-12LCFC HEFEI ELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310465455.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2025-09-12
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

In the existing technology, the dynamic adjustment of parameter types, quantities and data types in the image processing process is difficult to meet the changing requirements of detection objects and environments, resulting in poor reusability and high development costs.

Method used

A two-dimensional list with consistent object types is used to reconstruct the dynamic data structure, and the reflection mechanism is used to create interactive components, and the parameter group and parameter item information are dynamically adjusted.

Benefits of technology

It improves the efficiency of image processing, shortens processing time, reduces development costs, and enhances the flexibility and reusability of parameter settings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468711B_ABST
    Figure CN116468711B_ABST
Patent Text Reader

Abstract

The present disclosure provides a parameter setting method, device, electronic device and storage medium. The method includes: creating a dynamic data structure, using the dynamic data structure to store parameters to be configured, and the object types of each list in the dynamic data structure are consistent; creating an interactive component based on a reflection mechanism, using the interactive component to obtain parameter group information and parameter item information corresponding to the parameters to be configured from the dynamic data structure; the interactive component reflects the parameter group information and the parameter information that has changed in the parameter item to the dynamic data structure to adjust the parameters to be configured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of electronic digital data processing, and in particular to a parameter setting method, device, electronic device and storage medium. Background Art

[0002] Image processing is a crucial step in visual inspection. To mitigate the impact of industrial environmental uncertainty on images and improve the robustness of image processing algorithms to accommodate multiple different inspection features within the inspection object, a large number of parameters must be defined. Furthermore, different inspection objects, inspection features, and inspection environments can lead to completely different parameter types, quantities, and data types used in the image processing process.

[0003] Therefore, efficiently and dynamically adjusting the parameter types, parameter quantities, and parameter data types is a goal that has always been pursued. Summary of the Invention

[0004] The present disclosure provides a parameter setting method, device, electronic device and storage medium to at least solve the above technical problems existing in the prior art.

[0005] According to a first aspect of the present disclosure, a parameter setting method is provided, the method comprising: creating a dynamic data structure, using the dynamic data structure to store parameters to be configured, the object types of each list in the dynamic data structure being consistent; creating an interactive component based on a reflection mechanism, using the interactive component to obtain parameter group information and parameter item information corresponding to the parameters to be configured from the dynamic data structure; the interactive component reflects the changed parameter information in the parameter group information and the parameter items into the dynamic data structure to adjust the parameters to be configured.

[0006] In one possible implementation, the use of the dynamic data structure to store the parameters to be configured includes: deserializing the parameters to be configured; reconstructing the data structure of the deserialized parameters to be configured using a two-dimensional list to obtain the dynamic data structure; wherein the first dimension of the two-dimensional list represents a parameter group, the second dimension of the two-dimensional list represents a parameter item, and the data of the second dimension in the two-dimensional list is an object of the data of the first dimension in the two-dimensional list.

[0007] In one possible implementation, the data structure of the parameters to be configured after deserialization is reconstructed using a two-dimensional list to obtain the dynamic data structure, including: performing type normalization on the second dimension representing the parameter items in the two-dimensional list, replacing the type of the parameters to be configured with an object in the data type, and obtaining a parameter item set with a data type of an object; and using the parameter item set corresponding to the second dimension in the two-dimensional list as the object of the parameter group corresponding to the first dimension in the two-dimensional list, and obtaining a parameter group set with a data type of an object.

[0008] In one possible implementation, the creating of an interactive component based on a reflection mechanism and using the interactive component to obtain parameter group information and parameter item information corresponding to the parameter to be configured from the dynamic data structure include: reflecting a first dimension of the dynamic data structure to obtain parameter group information in the parameter to be configured; reflecting a second dimension of the dynamic data structure to obtain parameter item information in the parameter to be configured; wherein the parameter group information includes at least: the number of parameter groups and the name of the parameter group; and the parameter item information includes at least: the name of the parameter item and the value of the parameter item.

[0009] In one possible implementation, the interactive component reflects the parameter group information and the parameter information that has changed in the parameter items into the dynamic data structure to adjust the parameters to be configured, including: the interactive component receives and displays the parameter group information and the parameter item information; when the parameter information in the interactive component changes, the changed parameter information is reflected into the dynamic data structure, and the reflection mechanism is used to replace the parameter setting function in the dynamic data structure to adjust the parameters to be configured; wherein the display style of the interactive component is determined based on the static properties of the interactive component, and the display content of the interactive component is determined based on the dynamic properties of the interactive component.

[0010] According to a second aspect of the present disclosure, a parameter setting device is provided, comprising: a processing module for creating a dynamic data structure, using the dynamic data structure to store parameters to be configured, wherein the object types of each list in the dynamic data structure are consistent; a module for creating an interactive component based on a reflection mechanism, using the interactive component to obtain parameter group information and parameter item information corresponding to the parameters to be configured from the dynamic data structure; and an adjustment module for the interactive component to reflect changed parameter information in the parameter group information and the parameter item information into the dynamic data structure, so as to adjust the parameters to be configured.

[0011] In one possible implementation, the processing module is specifically used to deserialize the parameters to be configured; and reconstruct the data structure of the deserialized parameters to be configured using a two-dimensional list to obtain the dynamic data structure; wherein the first dimension of the two-dimensional list represents the parameter group, the second dimension of the two-dimensional list represents the parameter item, and the data of the second dimension in the two-dimensional list is the object of the data of the first dimension in the two-dimensional list.

[0012] In one possible implementation, the processing module is specifically used to perform type normalization processing on the second dimension representing the parameter items in the two-dimensional list, replace the type of the parameter to be configured with an object in the data type, and obtain a parameter item set whose data type is an object; use the parameter item set corresponding to the second dimension in the two-dimensional list as the object of the parameter group corresponding to the first dimension in the two-dimensional list, and obtain a parameter group set whose data type is an object.

[0013] In one possible implementation manner, the processing module is specifically configured to reflect the first dimension of the dynamic data structure to obtain parameter group information in the parameters to be configured; and reflect the second dimension of the dynamic data structure to obtain parameter item information in the parameters to be configured; wherein the parameter group information includes at least: the number of parameter groups and the names of the parameter groups; and the parameter item information includes at least: the names of the parameter items and the values ​​of the parameter items.

[0014] In one possible implementation, the adjustment module is specifically used for the interactive component to receive and display the parameter group information and the parameter item information; when the parameter information in the interactive component changes, the changed parameter information is reflected into the dynamic data structure, and the parameter setting function in the dynamic data structure is replaced by the reflection mechanism to adjust the parameters to be configured; wherein, the display style of the interactive component is determined based on the static properties of the interactive component, and the display content of the interactive component is determined based on the dynamic properties of the interactive component.

[0015] According to a third aspect of the present disclosure, there is provided an electronic device, including:

[0016] at least one processor; and a memory communicatively coupled to the at least one processor;

[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present disclosure.

[0018] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the present disclosure.

[0019] The present invention discloses a parameter setting method, device, electronic device and storage medium, which reconstruct the data structure of the configuration parameters by using a list with consistent object types, obtain a dynamic data structure, and create an interactive component based on a reflection mechanism. The dynamic data structure and the interactive component are used to efficiently and dynamically adjust the parameter group information and parameter item information, so as to shorten the image processing time and improve the visual detection efficiency.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings, in which several embodiments of the present disclosure are shown by way of example and not limitation, wherein:

[0022] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts.

[0023] Figure 1 A schematic diagram of a processing flow of a parameter setting method according to an embodiment of the present disclosure is shown;

[0024] Figure 2 A schematic diagram showing an interactive component in a parameter setting method according to an embodiment of the present disclosure is shown;

[0025] Figure 3 A schematic diagram of an overall process of the parameter setting method according to an embodiment of the present disclosure is shown;

[0026] Figure 4 A schematic diagram showing the structure of a parameter setting device according to an embodiment of the present disclosure is shown;

[0027] Figure 5 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0028] To make the purposes, features, and advantages of the present disclosure more apparent and understandable, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative work shall fall within the scope of protection of the present disclosure.

[0029] Image processing is a crucial step in visual inspection. As the number of inspection objects increases, image processing requirements are constantly evolving. Designing custom parameters for each inspection object in this process not only lacks reusability but also increases development costs and time. Furthermore, this approach cannot dynamically adjust the type, number, and data type of parameters. A universal, efficient, and dynamically adjustable parameter setting method can shorten image processing time and play a crucial role in improving visual inspection efficiency.

[0030] The disclosed embodiment proposes a parameter setting method, which reconstructs the parameter data structure using a list of consistent object types, dynamically adjusts parameter groups and parameter items according to detection requirements, and improves the reusability of the data structure; at the same time, it creates an interactive component based on the reflection mechanism, and uses the interactive component to dynamically adjust parameters to improve the efficiency of visual detection.

[0031] Figure 1 A schematic diagram of a processing flow of a parameter setting method according to an embodiment of the present disclosure is shown.

[0032] refer to Figure 1 A processing flow of the parameter setting method according to an embodiment of the present disclosure may include at least the following steps:

[0033] Step S101: Create a dynamic data structure, and use the dynamic data structure to store parameters to be configured. The object types of each list in the dynamic data structure are consistent.

[0034] In some embodiments, the configuration parameters to be configured can be first deserialized, that is, the byte sequence corresponding to the configuration parameters can be converted into an object, and then the data structure of the configuration parameters can be reconstructed using a two-dimensional list, thereby obtaining a dynamic data structure. The first dimension of the two-dimensional list represents the parameter group, the second dimension of the two-dimensional list represents the parameter item, and the data in the second dimension of the two-dimensional list is the object of the data in the first dimension of the two-dimensional list.

[0035] In some embodiments, a list refers to a collection of objects of the same type, and objects in the collection can be dynamically added, deleted, and modified; the consistency of object types in the two dimensions of a two-dimensional list is a prerequisite for the data structure to have dynamic adjustment capabilities.

[0036] Therefore, the specific implementation process of reconstructing the data structure of the parameters to be configured after deserialization using a two-dimensional list to obtain a dynamic data structure may include at least the following steps:

[0037] Step S101a: performing type normalization processing on the second dimension representing the parameter items in the two-dimensional list, replacing the type of the parameter to be configured with an object in the data type, and obtaining a parameter item set whose data type is an object.

[0038] The second dimension of the two-dimensional list is a set of parameter items of the same type, and the data type of each parameter item in the set is an object.

[0039] Step S101b: taking the parameter item set corresponding to the second dimension in the two-dimensional list as the object of the parameter group corresponding to the first dimension in the two-dimensional list, and obtaining a parameter group set whose data type is object.

[0040] The first dimension of the two-dimensional list is a set of parameter groups of the same type, and the data type of each parameter item list in the set is an object.

[0041] In some embodiments, the object types of the two dimensions of the two-dimensional list are consistent, and the data structure constructed based on the two-dimensional list with consistent object types can dynamically adjust the parameter groups and parameter items according to detection requirements.

[0042] Step S102: creating an interactive component based on a reflection mechanism, and using the interactive component to obtain parameter group information and parameter item information corresponding to the parameters to be configured from the dynamic data structure.

[0043] In some embodiments, the properties of the interactive component may be divided into static properties and dynamic properties, and the dynamic properties of the interactive component may be obtained through reflection.

[0044] Therefore, the specific implementation process of creating an interactive component based on the reflection mechanism and using the interactive component to obtain parameter group information and parameter item information corresponding to the parameter to be configured from the dynamic data structure may include at least the following steps:

[0045] Step S102a, reflecting the first dimension of the dynamic data structure to obtain parameter group information in the parameters to be configured.

[0046] Step S102b: Reflect the second dimension of the dynamic data structure to obtain parameter item information in the parameters to be configured.

[0047] The parameter group information may at least include: the number of parameter groups and the names of the parameter groups; the parameter item information may at least include: the names of the parameter items and the values ​​of the parameter items.

[0048] In some embodiments, the interactive component can be Figure 2 As shown, Figure 2 The inspection items in the figure only take the keyboard inspection item as an example. The inspection items can be label inspection items or packaging appearance inspection items. There is no restriction on the inspection items, corresponding parameter groups and corresponding parameter items.

[0049] In step S103, the interactive component reflects the changed parameter information in the parameter group information and the parameter items into the dynamic data structure to adjust the parameters to be configured.

[0050] In some embodiments, the interactive component receives and displays parameter group information and parameter item information, and when the parameter information in the interactive component changes, the changed parameter information is reflected into the dynamic data structure, and the reflection mechanism is used to replace the parameter setting function in the dynamic data structure to adjust the parameters to be configured.

[0051] The display style of the interactive component is determined based on the static properties of the interactive component, and the display content of the interactive component is determined based on the dynamic properties of the interactive component.

[0052] In the embodiment of the present disclosure, reflection is used to obtain the object set of the parameter group and the object set of the parameter item from the dynamic data structure respectively, and the object set of the parameter group and the object set of the parameter item are used to determine the presentation content of the interactive component, so that the static properties of the interactive component and the data structure are decoupled, and the property changes of the parameter group or parameter item in the data structure no longer affect the presentation style of the interactive component; even if the properties of the parameter group or parameter item change, the reflection mechanism can be used to set the properties of the data structure, thereby reducing the coupling degree between the interactive component and the parameter setting function, thereby efficiently and dynamically adjusting the parameters, shortening the image processing time, and improving the efficiency of visual detection.

[0053] Figure 3 A schematic diagram of the overall process of the parameter setting method according to an embodiment of the present disclosure is shown.

[0054] refer to Figure 3 Another processing flow of the parameter setting method of the embodiment of the present disclosure may include at least the following steps.

[0055] Step S301: Deserialize the parameters to be configured.

[0056] Specifically, the parameters to be configured at the specified address are deserialized and a dynamic data structure is created.

[0057] Step S302: The dynamic data structure stores the parameters to be configured.

[0058] Step S303: The interactive component obtains parameter group information corresponding to the parameters to be configured from the dynamic data structure based on the reflection mechanism.

[0059] Specifically, the first dimension of the dynamic data structure is reflected to obtain parameter group information in the parameters to be configured, wherein the parameter group information may include at least attributes such as the number of parameter groups and the names of the parameter groups.

[0060] Step S304: The interactive component receives and displays parameter group information corresponding to the parameters to be configured.

[0061] Step S305a: Reflectively obtain parameter item information corresponding to parameter group 1.

[0062] Step S305b: Reflectively obtain parameter item information corresponding to parameter group 2.

[0063] Specifically, the second dimension of the dynamic data structure is reflected to obtain parameter item information in the parameters to be configured, wherein the parameter item information may include at least: a name of the parameter item and a value of the parameter item.

[0064] Step S306: The interactive component receives and displays parameter item information corresponding to the parameter to be configured.

[0065] Step S307: Modify parameter information based on the interactive component.

[0066] Step S308: reflect the modified parameter information into the dynamic data structure and adjust the parameters to be configured.

[0067] Specifically, when parameter information in the interactive component changes, the changed parameter information is reflected in the dynamic data structure, and the parameter setting function in the dynamic data structure is replaced by the reflection mechanism to adjust the parameters to be configured.

[0068] The specific implementation methods and corresponding technical effects involved in the embodiments of the present disclosure have been described in detail in the above embodiments and will not be repeated here.

[0069] Figure 4 A schematic diagram of the structure of a parameter setting device according to an embodiment is shown.

[0070] refer to Figure 4 , an embodiment of a parameter setting device, the device 40 includes: a processing module 401, used to create a dynamic data structure, use the dynamic data structure to store the parameters to be configured, and the object type of each list in the dynamic data structure is consistent; used to create an interactive component based on a reflection mechanism, and use the interactive component to obtain parameter group information and parameter item information corresponding to the parameters to be configured from the dynamic data structure; an adjustment module 402, used for the interactive component to reflect the changed parameter information in the parameter group information and parameter item information into the dynamic data structure to adjust the parameters to be configured.

[0071] In some embodiments, the processing module 401 is specifically used to deserialize the configuration parameters; use a two-dimensional list to reconstruct the data structure of the configuration parameters after deserialization to obtain a dynamic data structure; wherein the first dimension of the two-dimensional list represents the parameter group, the second dimension of the two-dimensional list represents the parameter item, and the data of the second dimension in the two-dimensional list is the object of the data of the first dimension in the two-dimensional list.

[0072] In some embodiments, the processing module 401 is specifically used to perform type normalization processing on the second dimension representing the parameter items in the two-dimensional list, use the object in the data type to replace the type of the parameter to be configured, and obtain a parameter item set whose data type is an object; use the parameter item set corresponding to the second dimension in the two-dimensional list as the object of the parameter group corresponding to the first dimension in the two-dimensional list, and obtain a parameter group set whose data type is an object.

[0073] In some embodiments, the processing module 401 is specifically used to reflect the first dimension of the dynamic data structure to obtain parameter group information in the parameters to be configured; reflect the second dimension of the dynamic data structure to obtain parameter item information in the parameters to be configured; wherein the parameter group information includes at least: the number of parameter groups and the name of the parameter group; the parameter item information includes at least: the name of the parameter item and the value of the parameter item.

[0074] In some embodiments, the adjustment module 402 is specifically used for the interactive component to receive and display parameter group information and parameter item information; when the parameter information in the interactive component changes, the changed parameter information is reflected in the dynamic data structure, and the reflection mechanism is used to replace the parameter setting function in the dynamic data structure to adjust the parameters to be configured; wherein, the display style of the interactive component is determined based on the static properties of the interactive component, and the display content of the interactive component is determined based on the dynamic properties of the interactive component.

[0075] Figure 5 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable electronic devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0076] like Figure 5 As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0077] Multiple components in the electronic device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other electronic devices via a computer network such as the Internet and / or various telecommunication networks.

[0078] The computing unit 701 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a parameter setting method. For example, in some embodiments, a parameter setting method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the parameter setting method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform a parameter setting method by any other appropriate means (e.g., by means of firmware).

[0079] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0080] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0081] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0082] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0083] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0084] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0085] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0086] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. Throughout the present disclosure, "plurality" means two or more, unless otherwise specifically defined.

[0087] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A parameter setting method, characterized in that: The method comprises: Creating a dynamic data structure, using the dynamic data structure to store parameters to be configured, wherein the object types of each list in the dynamic data structure are consistent; Creating an interactive component based on a reflection mechanism, and using the interactive component to obtain parameter group information and parameter item information corresponding to the parameter to be configured from the dynamic data structure; The interactive component reflects the parameter group information and the changed parameter information in the parameter item into the dynamic data structure, replaces the parameter setting function in the dynamic data structure by using the reflection mechanism, and adjusts the parameter to be configured; The storing of the parameters to be configured by using the dynamic data structure includes: Deserialize the parameters to be configured; Reconstructing the data structure of the parameters to be configured after deserialization using a two-dimensional list to obtain the dynamic data structure; The first dimension of the two-dimensional list represents a parameter group, the second dimension of the two-dimensional list represents a parameter item, and the data of the second dimension in the two-dimensional list is an object of the data of the first dimension in the two-dimensional list; The step of creating an interactive component based on a reflection mechanism and obtaining parameter group information and parameter item information corresponding to the parameter to be configured from the dynamic data structure by using the interactive component includes: Reflecting the first dimension of the dynamic data structure to obtain parameter group information in the parameters to be configured; Reflecting the second dimension of the dynamic data structure to obtain parameter item information in the parameters to be configured; The parameter group information at least includes: the number of parameter groups and the names of the parameter groups; the parameter item information at least includes: the names of the parameter items and the values ​​of the parameter items.

2. The method according to claim 1, characterized in that The method of reconstructing the data structure of the parameters to be configured after deserialization by using a two-dimensional list to obtain the dynamic data structure includes: Performing type normalization processing on the second dimension representing the parameter items in the two-dimensional list, replacing the type of the parameter to be configured with an object in the data type, to obtain a parameter item set whose data type is an object; The parameter item set corresponding to the second dimension in the two-dimensional list is used as the object of the parameter group corresponding to the first dimension in the two-dimensional list, to obtain a parameter group set whose data type is object.

3. The method according to claim 1, characterized in that The interactive component reflects the parameter group information and the changed parameter information in the parameter item into the dynamic data structure, replaces the parameter setting function in the dynamic data structure using the reflection mechanism, and adjusts the parameter to be configured, including: The interactive component receives and displays the parameter group information and the parameter item information; When parameter information in the interactive component changes, the changed parameter information is reflected into the dynamic data structure, and the parameter setting function in the dynamic data structure is replaced by the reflection mechanism to adjust the parameter to be configured; The display style of the interactive component is determined based on the static properties of the interactive component, and the display content of the interactive component is determined based on the dynamic properties of the interactive component.

4. A parameter setting device, characterized in that: The device comprises: a processing module configured to create a dynamic data structure, using the dynamic data structure to store parameters to be configured, wherein the object types of each list in the dynamic data structure are consistent; and to create an interactive component based on a reflection mechanism, using the interactive component to obtain parameter group information and parameter item information corresponding to the parameters to be configured from the dynamic data structure; an adjustment module, configured for the interactive component to reflect the changed parameter information in the parameter group information and the parameter item information into the dynamic data structure, replace the parameter setting function in the dynamic data structure using the reflection mechanism, and adjust the parameter to be configured; The processing module is specifically configured to deserialize the parameters to be configured; reconstruct the data structure of the deserialized parameters to be configured using a two-dimensional list to obtain the dynamic data structure; wherein the first dimension of the two-dimensional list represents a parameter group, the second dimension of the two-dimensional list represents a parameter item, and the data in the second dimension of the two-dimensional list is an object of the data in the first dimension of the two-dimensional list; The processing module is specifically configured to reflect the first dimension of the dynamic data structure to obtain parameter group information in the parameters to be configured; and reflect the second dimension of the dynamic data structure to obtain parameter item information in the parameters to be configured; wherein the parameter group information includes at least: the number of parameter groups and the names of the parameter groups; and the parameter item information includes at least: the names of the parameter items and the values ​​of the parameter items.

5. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the parameter setting method according to any one of claims 1 to 3.

6. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the parameter setting method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Metadata storage method and device and server

    CN108133000A

  • Parameter information acquisition method and device, application program generation method and device, equipment and medium

    CN114661384A