CN114489830A - Configuration page operation method, processing method and computing device - Google Patents

Configuration page operation method, processing method and computing device Download PDF

Info

Publication number
CN114489830A
CN114489830A CN202111590619.9A CN202111590619A CN114489830A CN 114489830 A CN114489830 A CN 114489830A CN 202111590619 A CN202111590619 A CN 202111590619A CN 114489830 A CN114489830 A CN 114489830A
Authority
CN
China
Prior art keywords
configuration
page
information
item
display
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111590619.9A
Other languages
Chinese (zh)
Inventor
吴子骄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202111590619.9A priority Critical patent/CN114489830A/en
Publication of CN114489830A publication Critical patent/CN114489830A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Abstract

An operation method, a processing method and a computing device for a configuration page are disclosed. The method comprises the following steps: analyzing configuration information contained in the configuration interface through reflection and acquiring display information contained in the configuration information; driving the display of the corresponding configuration item in the configuration page by using the display information as data; and monitoring the operation event of the configuration item and acquiring a parameter value corresponding to user setting operation through reflection, wherein the parameter value is used for changing the configuration corresponding to the configuration information in the App to which the configuration page belongs. Therefore, the addition of the new configuration items is abstracted into the display of configuration names and configuration types and the storage of configuration corresponding to persistent parameter values in the UI configuration interface, and the configuration change is injected in the statement stage of the configuration through the annotation form, so that the addition of read-write logic for each new configuration item can be replaced by adding new configuration interface statements, and the addition and deletion efficiency for the configurable items is improved.

Description

Configuration page operation method, processing method and computing device
Technical Field
The present disclosure relates to the field of APP applications, and in particular, to an operation method, a processing method, and a computing device for configuring a page.
Background
In different application scenarios, it is necessary to provide some configurable items for the APP to the user of the APP. For example, in developing a test scenario, a tester needs to be provided with the option of placing the APP in a pre-development environment within the APP's user interface. In other words, it is desirable that the APP visually provides the interface for opening the prefiring environment to the APP user, and the corresponding setting can be imported according to the operation of the user.
In the prior art, each time a configurable item is added, separate and complete read interface and write interface logic needs to be written for the configurable item. These additions are cumbersome and error prone.
Therefore, there is a need for an improved method of adding configuration items.
Disclosure of Invention
One technical problem to be solved by the present disclosure is to provide an improved configuration page operation method, which can obtain information required by write configuration through reflection and generate configuration items therefrom, and can also implement read configuration through a dynamic proxy, so that addition of new configuration items can be implemented through a simple configuration interface declaration, thereby greatly improving flexibility of APP configuration.
According to a first aspect of the present disclosure, there is provided a configuration page operation method, including: analyzing configuration information contained in the configuration interface through reflection and acquiring display information contained in the configuration information; driving the display of the corresponding configuration item in the configuration page by using the display information as data; and monitoring the operation event of the configuration item and acquiring a parameter value corresponding to user setting operation through reflection, wherein the parameter value is used for changing the configuration corresponding to the configuration information in the App to which the configuration page belongs. The configuration information may be a configuration interface declaration added outside the configuration interface definition.
Optionally, the method further comprises: when an instruction for displaying the configuration page is received under the condition that the parameter value is set, acquiring the configuration information through a dynamic proxy, and reading the parameter value under the configuration information; and displaying parameter settings corresponding to the parameter values in the configuration page.
Optionally, the obtaining of the display information included in the configuration information includes: and obtaining the annotation contained in the configuration information for displaying the configuration form.
Optionally, the configuration interface includes an initial annotation for setting a display rule of a configuration item in the configuration page, and driving, by using the display information as data, display of a corresponding configuration item in the configuration page further includes: and analyzing the annotation contained in the configuration information as the display information based on the initial annotation.
Optionally, based on the initial annotation, according to the specification of the annotation in the configuration information, setting a display default value of the corresponding configuration item parameter operation box.
Optionally, driving, by using the configuration information as data, display of a corresponding configuration item in the configuration page includes: displaying the content to be configured of the configuration item based on the text content contained in the configuration information; and displaying a parameter operation box of the configuration item based on the type option in the configuration information.
Optionally, the method further comprises: adding new configuration information corresponding to a new configuration item, wherein the display of the corresponding new configuration item in the configuration page is achieved through a dynamic proxy of the configuration interface based on the new configuration information.
Optionally, adding new configuration information corresponding to the new configuration item includes: adding a new configuration declaration for the configuration interface; default values for configuration item content, configuration type and corresponding parameters are specified in the method declaration of the new configuration declaration.
According to a second aspect of the present disclosure, there is provided a configuration page processing method, including: in response to receiving a first user operation for displaying a configuration page, acquiring configuration interface information corresponding to the configuration page, acquiring annotation of a method statement in the configuration interface through reflection, and displaying the configuration page including configuration items corresponding to the annotation; and in response to receiving a second user operation of the user on an operation frame included in the display configuration item in the configuration page, sending an operation frame parameter with a parameter value corresponding to the second user operation into an App to which the configuration page belongs to change the configuration corresponding to the parameter value of the operation frame parameter, and performing nonvolatile storage on the parameter value.
According to a third aspect of the present disclosure, there is provided a computing device comprising: a processor; and a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method as described in the first and second aspects above.
Therefore, the addition of the new configuration items is abstracted into the configuration names, the display of the configuration types and the storage of the configuration corresponding to the persistence parameter values in the UI configuration interface, and the configuration changes are injected in the configuration declaration stage through the annotation form, so that the addition of the read-write logic for each new configuration item can be replaced by adding the new configuration interface declaration, and the adding and deleting efficiency for the configurable items is greatly improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in greater detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
1A-B illustrate examples of configuration items displayed in a configuration page.
FIGS. 2A-B illustrate examples of prior art operations related to implementing configuration item dependent logic using a read interface and a write interface.
FIG. 3 shows a schematic flow diagram of a configuration page operation method according to one embodiment of the invention.
4A-B illustrate examples of the invention implementing configuration item dependent operations using configuration declarations.
FIG. 5 shows a schematic flow diagram of a configuration page processing method according to one embodiment of the invention.
FIG. 6 illustrates a schematic structural diagram of a computing device that can be used to implement the above-described configuration page operation method according to one embodiment of the invention.
Detailed Description
Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In different application scenarios, it is necessary to provide some configurable items for the APP to the user of the APP. For example, in a development and test stage of the App at the client, some common configuration items may be involved, and corresponding changes need to be made in different scenes, such as a change of a current environment of the App (for example, an online, pre-release or daily environment), a change of a corresponding usage scene type in the App (for example, whether to enter a live scene or a classroom scene), whether an information panel in a live room shows a custom message, tenant information configuration parameters (App id and App key configuration parameters) of the SDK, and the like.
1A-B illustrate examples of configuration items displayed in a configuration page. In fig. 1A, a configuration item is provided for a current version of APP (e.g., a test version) that can select whether to open a pre-launch environment. When a user (e.g., a tester of the APP) needs to manually set the APP to the prefiring environment, a corresponding configuration item in the configuration page can be found, and the setting is completed by an operation of the right-side switch button. Specifically, the APP may listen to an operation event on the page and input a corresponding parameter according to the operation event (for example, input a parameter isPreEnv for opening the pre-send environment as true, so that the pre-send environment is opened). And under the condition that the pre-sending environment is opened by default, the APP monitors the operation event on the page only when the user sets the corresponding switch to be off, and transmits the corresponding parameter according to the operation event, for example, the parameter isPreEnv for opening the pre-sending environment is transmitted in false, so that the pre-sending environment is closed.
In the prior art, if it is desired to provide a user with configurable items in a configuration page, as shown in fig. 1A, separate and complete read interface and write interface logic needs to be written for the configuration items. FIGS. 2A-B illustrate examples of prior art operations related to implementing configuration item dependent logic using a read interface and a write interface.
Here, the read configuration is used to read the current state of the corresponding configuration item. For this, it is necessary to first create a new instance (i.e., newAppConfig ()), write a specific implementation class, for example, implement a parameter operation box as a toggle button (i.e., corresponding to bolean (boolean type) in the figure), name the instance (i.e., namespace is "AppConfig") and specify a parameter of operation (i.e., key is "ispeenv"), as shown in fig. 2A. The above needs to be written in code during the development phase. Thus, when an APP (e.g., an APP actually installed on a mobile phone for testing) performs a corresponding read configuration operation, the current value of the parameter isPreEnv may be read according to the obtained namespace (i.e., "AppConfig") and key (i.e., "isPreEnv"), for example, the parameter value isPreEnv is read as true, and displayed (e.g., corresponding to the switch being turned on in fig. 1A).
Accordingly, the write interface logic is used to display configuration items to the user and obtain the user operation result, for example, display "whether to turn on the prefiring environment" and the subsequent switch in the APP configuration page shown in fig. 1A, and receive the user operation on the switch. For this purpose, as shown in fig. 2B, a writing interface logic is first provided, and a switch switching button is added to the logic for acquiring the operation of the user for a specific parameter (e.g., isPreEnv). Then, a UI logic for the configuration needs to be added, the UI also needs to be capable of performing a playback logic of the configuration data according to the currently configured read interface, and needs to monitor a data change of the UI form, and call the write interface to write the configuration information into the persistence layer of the APP when the user changes the parameter by operating the switch button. Thus, when the APP (e.g., the APP actually installed on the mobile phone for testing) performs a corresponding write configuration operation, corresponding content (e.g., corresponding to "whether to turn on the prefiring environment" and the subsequent switch shown in fig. 1A) may be displayed according to the obtained namespace (i.e., "AppConfig") and key (i.e., "isPreEnv"), and also the operation of the user (e.g., turning off the switch) may be monitored, and the changed parameters may be transferred to and written into the persistence layer of the APP (e.g., the SD card of the mobile phone).
In fig. 2A and 2B, the content of the dashed box represents what needs to be written for the configuration item in the APP development phase. When a configuration item needs to be added to the configuration page according to the test requirements, for example, as shown in fig. 1B, a configuration item that selects "title color first" is added, and an operation box is provided in the form of a selection box, the content shown by the dotted line box in fig. 2A and 2B needs to be written again for the configuration item, for example, a new instance is written, and a new namespace and key are specified. In other words, each time a new configuration is added to the APP, a loading operation is required, thereby reducing the development efficiency of the APP.
In view of the above, there is a need to provide dynamic modification capability for these application configurations during the development process to meet the configuration requirements in different scenarios. Meanwhile, the configuration items need to be directly provided in the visualization UI interface, thereby reducing the understanding and use cost of the configuration.
Therefore, the invention provides an improved configuration page operation method, which can obtain information required by write configuration through reflection and generate configuration items, and can realize read configuration through a dynamic proxy, so that addition of new configuration items can be realized through simple configuration interface statement, and the flexibility of APP configuration is greatly improved.
FIG. 3 shows a schematic flow diagram of a configuration page operation method according to one embodiment of the invention. The above operation can be achieved by performing reflection and dynamic proxy for the configuration interface packaged in advance in combination with the configuration declaration, thereby obtaining the dynamic class implementation of the configuration interface.
Specifically, in step S310, the configuration information included in the configuration interface is parsed by reflection and the display information included in the configuration information is acquired. Here, the configuration interface may be packaged in advance in the APP development stage, may specify that a configuration item is displayed in the configuration page, the displayed configuration item may include a configuration item name and an operation box, and may specify that an operation of a user for the operation box is read and stored in a nonvolatile manner. However, the configuration interface does not specify the specific implementation of the configuration items, such as "open the pre-launch environment" or "home page title color" or other configuration items. The configuration information may be added in addition to the configuration interface code definition. The configuration information may include a specification for a specific implementation of the configuration item, for example, "whether to turn on the pre-launch environment" is specifically displayed in the configuration page, the subsequent operation frame is a switch, and the parameter to be operated is "isPreEnv". The configuration information may be added in a way that is declarative to the method.
Thus, when the user clicks on a configuration in the setting menu, for example, to enter the APP configuration page shown in fig. 1A, the specific display information contained in the declared configuration information can be acquired using the reflection technique of Java.
Then, in step S320, the display information may be used as data to drive the display of the corresponding configuration item in the configuration page. At this time, the display information acquired by reflection may be displayed based on the setting of the configuration interface thereof, for example, as shown in fig. 1A, "whether to turn on the priming environment" is specifically displayed in the configuration page, followed by an operation frame implemented as a switch.
Subsequently, in step S330, an operation event of the configuration item may be monitored, and a parameter value corresponding to a user setting operation may be obtained through reflection, where the parameter value is used to change a configuration corresponding to the configuration information in the App to which the configuration page belongs. For example, when the user toggles the switch to turn off the priming environment, it may be monitored by reflection that the value of the parameter isPreEnv changes from true to false (i.e., isPreEnv ═ 0), which may be passed in, causing the APP to be pushed out of the current priming environment, and may be stored non-volatile in the device in which it is installed, e.g., a cell phone, e.g., into the SD card of the cell phone.
When the configuration items need to be displayed back, for example, after the user closes the pre-sending environment, the user re-enters the APP configuration page (for example, wants to re-open the pre-sending environment), the corresponding parameter values that are previously stored persistently may be obtained by the dynamic proxy technology of Java, and used for correctly displaying the status of the configuration items in the page. To this end, the configuration page operation method of the present invention may further include: when an instruction for displaying the configuration page is received under the condition that the parameter value is set, acquiring the configuration information through a dynamic proxy, and reading the parameter value under the configuration information; and displaying parameter settings corresponding to the parameter values in the configuration page.
Thus, a dynamic implementation class is packaged in the APP program. When a tester needs to add a configurable item, the tester only needs to add an interface statement belonging to the dynamic implementation class, so that the display of the configurable item, the acquisition of user operation and the display back of the current value of the parameter can be realized.
As previously mentioned, the configuration information may be a configuration interface declaration added outside of the configuration interface definition. And when the new configuration item needs to be added, the configuration interface does not need to be modified, and the new configuration information corresponding to the new configuration item is directly added. And displaying the corresponding new configuration item in the configuration page through the dynamic proxy of the configuration interface based on the new configuration information.
Specifically, adding new configuration information corresponding to the new configuration item includes: adding a new configuration declaration for the configuration interface; and specifying default values for configuration item content, configuration type and corresponding parameters in a method declaration of the new configuration declaration.
For example, in the implementation of the present invention, if a configuration item of "top page title color" shown in fig. 1B needs to be added on the basis of an existing configuration item of "whether to open a pre-launch environment" shown in fig. 1A, it is not necessary to write a specific implementation class and a configuration interface as shown in fig. 2A-B, and only a new configuration declaration for an encapsulated configuration interface needs to be added, for example, it is declared that the content to be displayed is "top page title color", and the operation box is in the form of two selection boxes, which can be displayed when a user clicks a small triangle and the displayed specific content corresponds to "red" and "green", respectively.
Since the configuration declaration specifies default values for configuration item content, configuration type, and corresponding parameters. For this purpose, driving the display of the corresponding configuration item in the configuration page by using the configuration information as data may include: and displaying the content to be configured of the configuration item based on the text content contained in the configuration information. For example, displaying "whether to open a pre-distribution environment" based on the corresponding text content in the configuration information; and displaying a parameter operation frame of the configuration item based on the type option in the configuration information, for example, selecting a switch type operation frame based on the bolean type.
In some embodiments, the configuration information may enable reflection and transmission of the display information by methods such as specifying a particular method name. For example, the method name is directly specified as "whether or not to open the pre-issuance environment", and the display of the corresponding configuration item is realized by the display of the method name. In a preferred embodiment, however, the above-mentioned information transfer may be performed by annotation. To this end, acquiring the display information contained in the configuration information may include: and obtaining the annotation contained in the configuration information for displaying the configuration form.
Further, the above annotations in the configuration information may be used in combination with the initial annotations at the time of packaging of the initial interface, and ultimately used to configure the correct display of the contents of the configuration item on the page. For this purpose, the configuration interface includes an initial annotation for setting a display rule of a configuration item in the configuration page, and driving display of a corresponding configuration item in the configuration page by using the display information as data further includes: and analyzing the annotation contained in the configuration information as the display information based on the initial annotation. Further, the display default value of the corresponding configuration item parameter operation box can be set according to the specification of the annotation in the configuration information based on the initial annotation. I.e. the annotations in the package class, determine how to read the annotations in the externally added declaration.
An example of an abstracted general annotation configuration is given below. It is specified that the text presented in the configuration form by the configuration item is represented using string tips, and that its default value can be set to true if a switch box (corresponding to the bootean variable) is used.
Figure BDA0003428953190000081
On the basis of the initial annotations as above, the addition of new configuration items becomes very convenient. For example, assume that the current configuration page does not yet include a configuration item of "whether to open the pre-launch environment". At this time, as shown below, by simply defining a new method and specifying in a method declaration that the display content corresponding to tips is "whether to turn on the prefiring environment", the operation box is a switch corresponding to the parameter isPreEnv, and the default value is true, the addition of the corresponding configuration item can be completed, and the UI display of the configuration item as shown in fig. 1A can be realized by the dynamic proxy and the reflection.
Figure BDA0003428953190000091
A large amount of repeated code logic appears for the same configuration, the configuration name (whether the configuration is a pre-sending environment) and the configuration type (bootean type) and the corresponding persistent storage Key value (is _ PreEnv) of the configuration are abstracted to be concerned in a UI configuration interface, and configuration injection is completed in the declaration stage of the configuration through an annotation form. Therefore, subsequent UI interface development, current configuration information display and UI form information can be specifically shown by combining the configuration statement through binding corresponding interface logic, and manual repeated addition of a large amount of codes is avoided.
The specific operation of the present invention in a read-write configuration will be described below in conjunction with FIGS. 4A-B. 4A-B illustrate examples of the invention implementing configuration item dependent operations using configuration declarations. It should be understood that the dashed boxes in fig. 4A-B refer to operations performed by the configuration interface, and the dashed boxes refer to operations required to add a new configuration item.
Here, the read configuration is used to read the current state of the corresponding configuration item. Unlike fig. 2A, where a new instance (i.e., newAppConfig ()) needs to be created and a specific implementation class needs to be written, in the case of the present invention shown in fig. 4A, an instance assist. This instance need not be rewritten, but rather is an existing configuration interface encapsulated in the program. What is added is only the method declaration shown by the dotted-line box, for example, isPreEnv in which the parameter is coolean (boolean type) is declared. Subsequently, data of a set of methods and parameters can be acquired in each call through the dynamic proxy, so that the current value of the "ispeenv" is read from the persistent storage of the mobile phone by configuring the interface name "AppConfig" and the method name "ispeenv".
The two parameters "AppConfig" and "isPreEnv" mentioned in the method implementation in step 2 are obtained dynamically at the program running stage, so that regardless of whether AppConfig.
Therefore, in the playback operation (certainly, an operation other than playback that requires reading configuration) in which the user re-enters the APP configuration page and needs to read the current state of "whether to open the pre-launch environment", when the user enters the APP configuration page (that is, when the user obtains an operation to enter the configuration page), an instance, asset.getconfig.class, and a configuration interface name, "AppConfig" and a method name, "isPreEnv" may be obtained, so that the current value of "isPreEnv" is read from the persistent storage of the mobile phone, for example, it is true, and will be displayed in the APP configuration page.
Accordingly, the write interface logic is used to display configuration items to the user and obtain the user operation result, for example, display "whether to turn on the prefiring environment" and the subsequent switch in the APP configuration page shown in fig. 1A, and receive the user operation on the switch. Unlike the operations of the present invention shown in fig. 2B, which require providing write interface logic, adding UI logic, and listening for data changes of UI forms, no operations need to be added for newly added configuration items (because the declaration of methods on the new configuration items is done in the read configuration shown in fig. 4A) in the operations of the present invention shown in fig. 4B, that is, no dotted-line boxes are included in fig. 4B, which represent adding special for the new configuration items, and only Java-based dynamic proxy and reflection techniques are needed, and annotation information is combined to generate a dynamic implementation class of the configuration interface.
In particular, the configuration interface may resolve all methods included in the configuration interface by reflection in step 1. Here, each method corresponds to one configuration item. For example, in the example shown in fig. 1A, the configuration interface only includes one configuration item "whether to open the pre-launch environment", so the configuration interface may include only one method declaration at this time, that is, a method declaration for the configuration item "whether to open the pre-launch environment". In the example shown in fig. 1B, the configuration interface includes a configuration item of "home page title color" in addition to the configuration item of "whether to open the pre-sending environment", so that the configuration interface may include two method declarations at this time, namely, a method declaration for the configuration item of "whether to open the pre-sending environment" and a method declaration for the configuration item of "home page title color". To this end, in the example of fig. 1A, resolving all methods included in the configuration interface includes only resolving isPreEnv methods. While in the example of fig. 1B, parsing all methods included in the configuration interface includes parsing isPreEnv method and titeleclor method.
Subsequently, in step 2, annotation information configured on the configuration interface and method can be retrieved by reflection, and in step 3, the display of the configuration form in the configuration page is driven as data according to the configuration information. For example, an initial annotation in the configuration interface may be obtained through reflection, it is understood that tips corresponds to the configuration item name, and a final display of the text content "whether to open the pre-send environment" in the configuration page is implemented in combination with the annotation of "whether to open the pre-send environment" in the obtaining method statement.
Finally, at step 4, form events may be listened to. When the user operates the form, parameters required by the write configuration can be obtained according to the reflection information. For example, when the user operates the switch button corresponding to "whether to open the pre-launch environment", namespace (i.e., "AppConfig") and key (i.e., "isPreEnv") may be required, and changed parameters are imported and written into the persistence layer of the APP (e.g., SD card of mobile phone).
The configuration page operation method of the present invention is described above in conjunction with the accompanying drawings. Compared with the existing client dynamic configuration logic, the invention has the following advantages:
1. in configured read logic, the assertion is used without adding any code logic to the read interface, or even paying attention to the persisted Key value (function signature as the default Key value by default)
2. In the configured write logic, the capability support of implementing zero code is specifically as follows:
when the configuration is analyzed, all configuration information can be analyzed in an initialization stage;
when the configuration playback is carried out, when the configured UI interface is awakened, the reading of the persistence information and the data playback on the UI can be automatically carried out according to the analyzed configuration information;
when configuration binding is carried out, the binding linkage of the UI configuration interface and the persistent information is uniformly realized through the abstraction layer of the invention, and no additional code development logic is needed.
Further, the invention can be realized as a configuration page processing method, which realizes the response to the operation of the user (especially the tester) through the dynamic proxy and the reflection and the combination of the annotation. FIG. 5 shows a schematic flow diagram of a configuration page processing method according to one embodiment of the invention.
In step 510, in response to receiving a first user operation (for example, an operation of a user selecting to enter a configuration page in a setting page) for displaying a configuration page, obtaining configuration interface information corresponding to the configuration page, obtaining an annotation of a method statement in the configuration interface through reflection, and displaying the configuration page including a configuration item corresponding to the annotation; and
in step 520, in response to receiving a second user operation (for example, an operation of closing the switch shown in fig. 1A by the user) of the operation frame included in the configuration item displayed in the configuration page by the user, an operation frame parameter (for example, ispeenv ═ 0) having a parameter value corresponding to the second user operation is sent to the App to which the configuration page belongs, so as to change the configuration corresponding to the parameter value of the operation frame parameter, and the parameter value is stored in a nonvolatile manner.
FIG. 6 illustrates a schematic structural diagram of a computing device that can be used to implement the above-described configuration page operation method according to one embodiment of the invention.
Referring to fig. 6, computing device 600 includes memory 610 and processor 620.
The processor 620 may be a multi-core processor or may include multiple processors. In some embodiments, processor 620 may include a general-purpose host processor and one or more special coprocessors such as a Graphics Processor (GPU), a Digital Signal Processor (DSP), or the like. In some embodiments, processor 620 may be implemented using custom circuits, such as an Application Specific Integrated Circuit (ASIC) or a Field Programmable Gate Array (FPGA).
The memory 610 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions that are required by the processor 620 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. In addition, the memory 610 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), magnetic and/or optical disks, may also be employed. In some embodiments, memory 610 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 610 has stored thereon executable code that, when processed by the processor 620, causes the processor 620 to perform the above-mentioned configuration page operation methods.
The configuration page operation scheme according to the present invention has been described in detail above with reference to the accompanying drawings. According to the invention, the addition of the new configuration items is abstracted into the display of configuration names and configuration types and the storage of configuration corresponding to persistent parameter values in the UI configuration interface, and the configuration changes are injected in the configuration declaration stage through the annotation form, so that the addition of read-write logic for each new configuration item can be replaced by adding new configuration interface declarations, and the addition and deletion efficiency for the configurable items is greatly improved.
Furthermore, the method according to the invention may also be implemented as a computer program or computer program product comprising computer program code instructions for carrying out the above-mentioned steps defined in the above-mentioned method of the invention.
Alternatively, the invention may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform the steps of the above-described method according to the invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A method of configuration page operation, comprising:
analyzing configuration information contained in the configuration interface through reflection and acquiring display information contained in the configuration information;
driving the display of the corresponding configuration item in the configuration page by using the display information as data; and
monitoring the operation event of the configuration item and acquiring a parameter value corresponding to user setting operation through reflection, wherein the parameter value is used for changing the configuration corresponding to the configuration information in the App to which the configuration page belongs.
2. The method of claim 1, further comprising:
when an instruction for displaying the configuration page is received under the condition that the parameter value is set, acquiring the configuration information through a dynamic proxy, and reading the parameter value under the configuration information; and
and displaying the parameter setting corresponding to the parameter value in the configuration page.
3. The method of claim 1, wherein obtaining display information contained in the configuration information comprises:
and obtaining the annotation contained in the configuration information for displaying the configuration form.
4. The method of claim 2, wherein the configuration interface includes an initial annotation for setting a display rule of a configuration item in the configuration page, and driving display of the display information as data for a corresponding configuration item in the configuration page further comprises:
and analyzing the annotation contained in the configuration information as the display information based on the initial annotation.
5. The method of claim 3, wherein, based on the initial annotation, display defaults for corresponding configuration item parameter action boxes are set according to the specification of the annotation in the configuration information.
6. The method of claim 1, wherein driving display of the configuration information as data for a corresponding configuration item in the configuration page comprises:
displaying the content to be configured of the configuration item based on the text content contained in the configuration information; and
and displaying a parameter operation box of the configuration item based on the type option in the configuration information.
7. The method of claim 1, comprising:
adding new configuration information corresponding to a new configuration item, wherein the display of the corresponding new configuration item in the configuration page is achieved through a dynamic proxy of the configuration interface based on the new configuration information.
8. The method of claim 7, wherein adding new configuration information corresponding to a new configuration item comprises:
adding a new configuration declaration for the configuration interface;
default values for configuration item content, configuration type and corresponding parameters are specified in the method declaration of the new configuration declaration.
9. A method for processing a configuration page comprises the following steps:
in response to receiving a first user operation for displaying a configuration page, acquiring configuration interface information corresponding to the configuration page, acquiring annotation of a method statement in the configuration interface through reflection, and displaying the configuration page including configuration items corresponding to the annotation; and
and in response to receiving a second user operation of the user on an operation frame included in the display configuration item in the configuration page, sending an operation frame parameter with a parameter value corresponding to the second user operation into an App to which the configuration page belongs to change the configuration corresponding to the parameter value of the operation frame parameter, and carrying out nonvolatile storage on the parameter value.
10. A computing device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any one of claims 1-9.
CN202111590619.9A 2021-12-23 2021-12-23 Configuration page operation method, processing method and computing device Pending CN114489830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111590619.9A CN114489830A (en) 2021-12-23 2021-12-23 Configuration page operation method, processing method and computing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111590619.9A CN114489830A (en) 2021-12-23 2021-12-23 Configuration page operation method, processing method and computing device

Publications (1)

Publication Number Publication Date
CN114489830A true CN114489830A (en) 2022-05-13

Family

ID=81494329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111590619.9A Pending CN114489830A (en) 2021-12-23 2021-12-23 Configuration page operation method, processing method and computing device

Country Status (1)

Country Link
CN (1) CN114489830A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311799A (en) * 2023-11-30 2023-12-29 钱塘科技创新中心 Configuration method of software project page

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017008645A1 (en) * 2015-07-13 2017-01-19 阿里巴巴集团控股有限公司 Method of collectively mapping http request and device utilizing same
CN108268289A (en) * 2016-12-30 2018-07-10 阿里巴巴集团控股有限公司 Method for parameter configuration, the apparatus and system of web applications
CN108415834A (en) * 2018-02-12 2018-08-17 平安科技(深圳)有限公司 Explain rear end method of calibration, device, computer equipment and storage medium
CN109254808A (en) * 2018-07-18 2019-01-22 平安科技(深圳)有限公司 Interface call method, device and computer readable storage medium
CN109739717A (en) * 2018-04-12 2019-05-10 京东方科技集团股份有限公司 A kind of method and device of page data acquisition, server
CN112328322A (en) * 2020-10-26 2021-02-05 银盛支付服务股份有限公司 Apollo configuration localization method and system
CN113434582A (en) * 2021-06-24 2021-09-24 平安国际智慧城市科技股份有限公司 Service data processing method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017008645A1 (en) * 2015-07-13 2017-01-19 阿里巴巴集团控股有限公司 Method of collectively mapping http request and device utilizing same
CN108268289A (en) * 2016-12-30 2018-07-10 阿里巴巴集团控股有限公司 Method for parameter configuration, the apparatus and system of web applications
CN108415834A (en) * 2018-02-12 2018-08-17 平安科技(深圳)有限公司 Explain rear end method of calibration, device, computer equipment and storage medium
CN109739717A (en) * 2018-04-12 2019-05-10 京东方科技集团股份有限公司 A kind of method and device of page data acquisition, server
CN109254808A (en) * 2018-07-18 2019-01-22 平安科技(深圳)有限公司 Interface call method, device and computer readable storage medium
CN112328322A (en) * 2020-10-26 2021-02-05 银盛支付服务股份有限公司 Apollo configuration localization method and system
CN113434582A (en) * 2021-06-24 2021-09-24 平安国际智慧城市科技股份有限公司 Service data processing method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117311799A (en) * 2023-11-30 2023-12-29 钱塘科技创新中心 Configuration method of software project page
CN117311799B (en) * 2023-11-30 2024-03-19 钱塘科技创新中心 Configuration method of software project page

Similar Documents

Publication Publication Date Title
WO2016155388A1 (en) Method and device for installing and running application
US9906622B2 (en) Automated service interface optimization
CN108964968B (en) Service access management method and system in container cloud environment
US10261844B2 (en) Generic language application programming interface interpreter
WO2022007638A1 (en) Data processing method, apparatus, device and system
CN110321189B (en) Method and equipment for presenting hosted program in hosted program
CN105094878A (en) System library file integration method and apparatus
CN114489830A (en) Configuration page operation method, processing method and computing device
CN106503069A (en) File sharing method and device
US10255276B2 (en) Automated translation of screen images for software documentation
CN111694733A (en) API (application programming interface) testing method and device for software development kit SDK (software development kit)
CN111444453A (en) Page return data processing method and device
CN109101311B (en) Display view compatibility method and electronic equipment
WO2020135129A1 (en) Method and device for loading plug-in of application, and terminal
CN111538667A (en) Page testing method and device
US20230206527A1 (en) Special-effect editing method and apparatus
CN110929472A (en) Document editing method and device, computer storage medium and terminal
CN111104777A (en) Document editing method and device, computer storage medium and terminal
CN111858314B (en) Method, system, equipment and medium for state management of vue
CN113138754A (en) Method and device for dynamically expanding Javascript engine function of browser and electronic equipment
CN112463639A (en) Test script editing method, device and equipment
CN111639030A (en) Page testing method, device, equipment and storage medium
CN111399932A (en) Method and system for calling D LL, browser processing method and browser
CN113448543B (en) Page processing method, device, equipment and system
CN116339865A (en) Method, apparatus, medium, and program product for performing operations

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination