A component rendering method and device based on parameter updating
By managing parameter changes through local storage and caching on the client side, duplicate requests to the server are reduced, solving the problem of redundant communication between the client and the server, improving page loading speed and server stability, and making it suitable for parameter management in multi-page and high-concurrency scenarios.
Patent Information
- Application Number
- CN202511403021.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-28
- Publication Date
- 2026-06-26
- Estimated Expiration
- 2045-09-28
AI Technical Summary
In client-server architecture or browser-based web application systems, frequent parameter modifications lead to an increase in the number of redundant communications between the client and the server, consuming network bandwidth and interface resources, affecting page loading speed and user experience, and exacerbating server resource consumption, which may cause data consistency issues, especially in multi-page or high-concurrency scenarios.
By responding to the selection of the parameter category set, the set of parameters to be listened to is determined, and parameter changes are managed in local storage and cache, reducing duplicate requests to the server. Local rendering components are used to maintain data consistency, especially when switching pages, the latest data in the local cache is used directly.
The parameter monitoring process has been simplified, reducing the pressure on client network bandwidth and interface resources, improving page loading speed and user experience, while also reducing server computing load and optimizing overall system stability and scalability.
Smart Images

Figure CN121193809B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a component rendering method and apparatus based on parameter updates. Background Technology
[0002] In existing client-server (C / S) architectures or browser-based web application systems, when users interact with the server through client interfaces (such as web pages, mobile apps, etc.), there is often a need to modify and share dynamic parameters. Specifically, when a user modifies specific parameters (such as user preference settings, business configuration items, temporary state data, etc.) on a client page (such as a configuration page, form submission page, etc.) and submits the changes, these parameters usually need to be synchronously stored in the server-side database or cache to ensure data persistence and consistency across multiple platforms / pages.
[0003] However, existing technologies generally suffer from the following problems: when the modified parameters need to be used on other pages or associated clients, a request must be actively sent to the server to obtain the latest modified parameters. Although this process can ensure data reliability, it also has the following issues:
[0004] On the one hand, client-side interface resources are repeatedly consumed. Each page that depends on this parameter needs to initiate a separate network request (such as HTTP GET / POST), resulting in an increase in the number of communication requests between the client and the server. Especially in scenarios where multiple pages frequently call the same parameter (for example, when a user accesses the configuration page and the function page in sequence, or when the same user operates on multiple terminals simultaneously), a large number of repeated requests will consume the client's network bandwidth and interface call quota, affecting page loading speed and user experience.
[0005] On the other hand, server resource consumption increases. Servers need to respond to each client's parameter retrieval request, including parsing requests, querying the database / cachate, and assembling returned data. This not only increases the server's computational load (such as CPU and memory usage) but may also lead to response delays or service performance degradation due to high concurrency requests. For business scenarios that rely heavily on real-time requirements (such as online collaboration tools and dynamic configuration management systems), frequent server interactions may also cause data consistency issues (e.g., clients obtaining outdated data due to network latency). Summary of the Invention
[0006] To address the aforementioned problems in the prior art, this invention provides a component rendering method and apparatus based on parameter updates. The technical problem to be solved by this invention is achieved through the following technical solution:
[0007] The first aspect of this invention provides a component rendering method based on parameter updates, comprising the following steps:
[0008] In response to a selection operation on a parameter category set of a component of a page tag, a set of listening parameters for the component is determined; wherein, the tag includes at least one component, the component includes at least one parameter, a parameter category set includes multiple parameters of at least one component, and the name of the listening parameter set has a prefix identifier;
[0009] Determine whether a configuration operation has been performed on the set of listening parameters;
[0010] If so, in response to a configuration operation on a target parameter in the set of monitored parameters, determine whether the parameter value of the target parameter before the configuration operation is consistent with the parameter value of the target parameter after the configuration operation;
[0011] If there is a discrepancy, the target component is determined based on the set of listening parameters, and the configuration parameter values indicated by the configuration operation are stored in local storage;
[0012] Determine whether the target component is in the local cache;
[0013] If so, the target component is rendered according to the configuration parameter value, and the rendered target component is cached in the local cache.
[0014] In one embodiment of the present invention, the method further includes:
[0015] In response to a page switching operation, the rendered target component is retrieved from the local cache; the target parameters are shared between the page before and after the switch.
[0016] In one embodiment of the present invention, the configuration operation is to perform operations such as storing parameters, deleting parameters, and / or loading parameters.
[0017] In one embodiment of the present invention, the parameters include: system language parameters and / or user information parameters.
[0018] A second aspect of this invention provides a component rendering apparatus based on parameter updates, comprising:
[0019] A determination module is used to determine a set of listening parameters for a component in response to a selection operation of a parameter category set for a component of a page tag; wherein the tag includes at least one component, the component includes at least one parameter, a parameter category set includes multiple parameters of at least one component, and the name of the listening parameter set has a prefix identifier;
[0020] The first monitoring module is used to determine whether a configuration operation has been performed on the monitoring parameter set;
[0021] The second monitoring module is used to determine, in response to a configuration operation on a target parameter in the monitoring parameter set, whether the parameter value of the target parameter before the configuration operation and the parameter value of the target parameter after the configuration operation are consistent.
[0022] The third monitoring module is used to determine the target component based on the monitoring parameter set if there is a discrepancy, and to store the configuration parameter value indicated by the configuration operation in local storage;
[0023] The judgment module is used to determine whether the target component is in the local cache;
[0024] The caching module is used to render the target component according to the configuration parameter value if the condition is met, and cache the rendered target component in the local cache.
[0025] In one embodiment of the present invention, it further includes:
[0026] The calling module is used to respond to page switching operations and call the rendered target component from the local cache; the target parameters are shared between the page before and after the switch.
[0027] In one embodiment of the present invention, the configuration operation is to perform operations such as storing parameters, deleting parameters, and / or loading parameters.
[0028] In one embodiment of the present invention, the parameters include: system language parameters and / or user information parameters.
[0029] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a component rendering method based on parameter updates provided in the first aspect of the present invention.
[0030] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a component rendering method based on parameter updates provided in the first aspect of the present invention.
[0031] The beneficial effects of this invention are:
[0032] This invention, through the selection of parameter classification sets, can batch determine the parameters and parameter sets that need to be monitored, eliminating the need to configure each individual parameter individually. This simplifies the parameter monitoring setting process and significantly improves the configuration efficiency of parameter monitoring, making it particularly suitable for parameter management needs in scenarios with multiple parameter associations or complex business scenarios. When monitoring the parameter set, if a parameter in the set is configured (i.e., its value is modified), the corresponding components using that parameter in the local cache are locally re-rendered and stored locally. This reduces the need for clients to frequently access server interfaces to obtain the latest parameter values, lowering the frequency and occupancy of client interface calls, effectively alleviating the pressure on client network bandwidth and interface resources, and improving the overall operating efficiency of the client system. It significantly reduces the amount of data interaction between the client and server, lowering communication link occupancy and transmission costs, especially in multi-page, multi-terminal, or high-concurrency scenarios. Components that depend on parameters can directly use the latest local data to quickly update page content without waiting for server response, reducing page delays or stuttering caused by data loading, significantly improving page loading speed and interaction smoothness, and optimizing the user experience. By reducing repeated client requests to the server, the server does not need to frequently process parameter queries and data returns, which reduces the utilization of computing resources such as CPU and memory, alleviates the server's concurrent processing pressure, saves server computing and storage resources, and improves the overall operational stability and scalability of the server.
[0033] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0034] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0035] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0036] Figure 1 A flowchart illustrating a component rendering method based on parameter updates provided in an embodiment of the present invention;
[0037] Figure 2 This is a block diagram of a component rendering device based on parameter updates, provided as an embodiment of the present invention. Detailed Implementation
[0038] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.
[0039] like Figure 1 As shown, the first aspect of this invention provides a component rendering method based on parameter updates, comprising the following steps:
[0040] Step 11: In response to the selection operation of the parameter category set of the component of the page tag, determine the listening parameter set of the component.
[0041] The tag includes at least one component, the component includes at least one parameter, a parameter category set includes multiple parameters of at least one component, and the name of the listening parameter set has a prefix identifier.
[0042] Step 12: Determine whether a configuration operation has been performed on the set of listening parameters.
[0043] Step 13, if yes, in response to the configuration operation on the target parameter in the listening parameter set, determine whether the parameter value of the target parameter before the configuration operation is consistent with the parameter value of the target parameter after the configuration operation.
[0044] Step 14: If there is a discrepancy, determine the target component based on the set of listening parameters, and store the configuration parameter values of the configuration operation instruction in local storage.
[0045] Step 15: Determine if the target component is in the local cache.
[0046] Step 16: If yes, render the target component according to the configuration parameter value and cache the rendered target component in the local cache.
[0047] In this embodiment, by selecting a parameter classification set, the parameters and parameter sets to be monitored can be determined in batches, eliminating the need to configure each individual parameter individually. This simplifies the parameter monitoring setting process and significantly improves the configuration efficiency of parameter monitoring, making it particularly suitable for parameter management needs in scenarios with multiple parameter associations or complex business scenarios. When monitoring the parameter set, if a parameter in the set is configured (i.e., its value is modified), the corresponding components using that parameter in the local cache are re-rendered locally and stored locally. This reduces the need for clients to frequently access server interfaces to obtain the latest parameter values, lowering the frequency and occupancy of client interface calls, effectively alleviating the pressure on client network bandwidth and interface resources, and improving the overall operating efficiency of the client system. It significantly reduces the amount of data interaction between the client and server, lowering communication link occupancy and transmission costs, especially in multi-page, multi-terminal, or high-concurrency scenarios. Components that depend on parameters can directly use the latest local data to quickly update page content without waiting for server response, reducing page delays or stuttering caused by data loading, significantly improving page loading speed and interaction smoothness, and optimizing the user experience. By reducing repeated client requests to the server, the server does not need to frequently process parameter queries and data returns, which reduces the utilization of computing resources such as CPU and memory, alleviates the server's concurrent processing pressure, saves server computing and storage resources, and improves the overall operational stability and scalability of the server.
[0048] Based on the first aspect of the present invention, the second aspect of the present invention provides a component rendering method based on parameter updates, comprising the following steps:
[0049] Step 21: In response to the selection operation of the parameter category set of the component of the page tag, determine the set of listening parameters of the component.
[0050] The tag includes at least one component, the component includes at least one parameter, a parameter category set includes multiple parameters of at least one component, and the name of the listening parameter set has a prefix identifier.
[0051] In this step, the tags on the page are divided into one or more components. Each component corresponds to one or more parameters, and different renderings can be applied to the components based on the parameter values. Tags include, for example, edit boxes, input boxes, and buttons on the page. For instance, a parameter could be the system language. If the user sets the system language to Chinese, all components on each page will use Chinese, and each component will use the system language parameter. Parameters could also be user avatars or user information; multiple components will use user avatars. One or more parameters can be grouped into a parameter category set as needed. Multiple parameter category sets can be set according to page, function, or business logic. For example, user avatars and user information can be set as parameters in the basic information setting set. Each parameter category set is given two names: a set name and a name with a prefix identifier. When a parameter needs to be monitored, the parameter category set with the prefix identifier is assigned to the original parameter category set, such as `aaa=rx.aaa`, where `rx` is the prefix identifier. If the parameter does not need to be monitored, the original parameter category set is assigned to the original parameter category set, such as `aaa=aaa`, allowing for flexible selection of parameters that need to be monitored. All parameter classification sets use the same prefix for identification.
[0052] Among them, the parameter classification set is mixed in by inheriting the save(), delete(), and load() methods, that is, by using the general technology module JsonStorageSingleObject. <t>The functionality is injected into the business data class, enabling the target class to obtain the three core methods save() (save parameters), delete() (delete parameters), and load() (load parameters) through mixin inheritance.
[0053] Users and front-end developers can select the parameter category sets to be monitored as needed. Once a parameter category set is selected, the parameter category set with the prefix is assigned to the original parameter category set. The parameter category set with the prefix is also the monitored parameter set. Different monitored parameter sets can be selected for each page. A correspondence is formed between parameter category sets and components, that is, which components will use which parameter category sets, and this correspondence is stored.
[0054] For example, the sample code for this step is as follows:
[0055] init() async {
[0056] db = Localstore.getInstance(useSupportDir: true);
[0057] / / Application basic settings
[0058] appSetting = await AppSetting.defaultConfig().load(rx: appSettingRx);
[0059] / / Initialize state storage
[0060] initializationState = await InitializationState.defaultValues().load(rx: initializationStateRx);
[0061] debugPrint('--->$this.init initializationState.showAccessGuide: ${initializationState.showAccessGuide}');
[0062] / / Internationalized storage
[0063] appLanguage = await AppLanguage.defaultConfig().load(rx:appLanguageRx);
[0064] / / Guide to progress storage
[0065] / / IoTConfig.
[0066] / / print( box.read('ioTConfig')??"初始化ioTConfig");
[0067] / / debugPrint("--->JsonStorage.init box.read('ioTConfig'):${box.read('ioTConfig').runtimeType}");
[0068] / / await initIotConfig();
[0069] ioTConfig = await IoTConfig.defaultConfig().load(rx: ioTConfigRx);
[0070] if (ioTConfig.messages.isNotEmpty) {
[0071] _currentNode = ioTConfig.messages[ioTConfig.messages.length - 1].id;
[0072] }
[0073] generalConfig = await GeneralConfig.defaultConfig().load(rx:generalConfigRx);
[0074] wallpaperConfig = await WallpaperConfig.defaultConfig().load(rx:wallpaperConfigRx);
[0075] assistiveTouchConfig = await AssistiveTouchConfig.defaultConfig().load(rx: assistiveTouchConfigRx);
[0076] helpCenterConfig = await HepCenter.defaultConfig().load(rx:helpCenterConfigRx);
[0077] roomDownloadLink = await RoomDownloadLink.defaultLink().load(rx:roomDownloadLinkRx);
[0078] pinConfig = await PinConfig.defaultConfig().load(rx: pinConfigRx);
[0079] / / Storage switching item
[0080] switchItemList = await getAllSwitchItemStruct();
[0081] / / Apply the host's switching option
[0082] switchItemListForHost = await getAllSwitchItemStructForHost();
[0083] / / Application icon cache
[0084] appShortcutIconList = await getAllAppShortcutIconList();
[0085] / / Decoding icon
[0086] for(var appShortcutIcon in appShortcutIconList) {
[0087] var appIconBytes = AppController.instance.getAppIconBytesByAppPath(appShortcutIcon.appPath);
[0088] if (appIconBytes != null) {
[0089] AppController.instance.appIconBytesCache[appShortcutIcon.appPath] =appIconBytes;
[0090] }
[0091] }
[0092] homePageInfo = await HomePageInfo.defaultConfig().load(rx:homePageInfoRx);
[0093] }
[0094] Step 22: Determine whether a configuration operation has been performed on the set of listening parameters.
[0095] In this step, the set of listening parameters is monitored. Monitoring means determining whether a configuration operation has been performed on the set of listening parameters. The configuration operation is to perform operations such as storing parameters, deleting parameters, and / or loading parameters, which are performed using the save() (storing parameters), delete() (deleting parameters), and load() (loading parameters) methods mentioned above.
[0096] Configuration operations may change the value of parameters, which means determining whether a configuration operation has occurred in the set of parameters to be monitored.
[0097] Step 23, if yes, in response to the configuration operation on the target parameter in the listening parameter set, determine whether the parameter value of the target parameter before the configuration operation is consistent with the parameter value of the target parameter after the configuration operation.
[0098] In this step, if a configuration operation is performed on a certain parameter (target parameter) in the listening parameter set, it is considered that a configuration operation has occurred in the listening parameter set. At this time, it is necessary to determine whether the parameter value of the target parameter is consistent before and after the configuration operation.
[0099] If no configuration operation is performed, the listening will continue.
[0100] Step 24: If there is a discrepancy, determine the target component based on the set of listening parameters, and store the configuration parameter values of the configuration operation instruction in local storage.
[0101] In this step, the target parameter value changes. Based on the pre-stored parameter category set and component correspondence, the components using this listening parameter set (i.e., the target component) can be determined according to the listening parameter set to which the target parameter belongs. The configuration parameter value of the configuration operation instruction is the new parameter value generated after the configuration operation, and this new parameter value is stored in local storage.
[0102] If the target parameter values do not change before and after the configuration operation, return to step 22.
[0103] For example, the code examples for steps 22-24 are as follows:
[0104] / / / Response component
[0105] Jtx(() {
[0106] ThemeMode currentThemeMode = JsonStorage.instance.appSettingRx.value.themeMode;
[0107] return Row(...
[0108] }):
[0109] / / / When configuration changes
[0110] Future <void>whenHostDomainConfigChanged(AppDomain appDomain) async {
[0111] var selfDomain = JsonStorage.instance.appSettingRx.value.pairInfo?.domain ?? '';
[0112] debugPrint('--->$this.whenHostDomainConfigChanged selfDomain: $selfDomain appDomain.domain:${appDomain.domain}');
[0113] if (selfDomain != appDomain.domain) {
[0114] try {
[0115] JsonStorage.instance.appSetting.pairInfo?.domain = appDomain.domain;
[0116] JsonStorage.instance.appSetting.pairInfo?.domainDescription =appDomain.description;
[0117] await JsonStorage.instance.appSetting.save();
[0118] setupPairInfo(JsonStorage.instance.appSetting.pairInfo!,forceCloseClient: true);
[0119] } catch (e) {
[0120] debugPrint('--->$this.onDesktopEvent DesktopChangeDomain e: $e');
[0121] }
[0122] }
[0123] }
[0124] The code listens for the `JsonStorage.instance.appSettingRx.value.themeMode` method. It retrieves the current `appSettingRx` object via `.value` and then accesses the `themeMode` property, which reflects changes in the theme (e.g., when the user switches between dark and light themes). By monitoring changes to the theme mode (`themeMode`) in the application settings, the code automatically re-renders the UI (e.g., theme switching buttons or interface styles) to ensure the interface remains consistent with the current settings.
[0125] Step 25: Determine if the target component is in the local cache.
[0126] Step 26: If yes, then render the target component according to the configuration parameter value and cache the rendered target component in the local cache.
[0127] In this step, if the target component is in the local cache, it is rendered according to the current configuration parameter values, and the rendered target component is stored in the local cache. At this point, the rendering of the components on the current page is complete.
[0128] If the target component is not in the local cache, it can be loaded from the server into the local cache and then rendered.
[0129] Step 27: In response to the page switching operation, the rendered target component is retrieved from the local cache; the target parameters are shared between the page before and after the switch.
[0130] In this step, when a user switches pages, for example, after the components on the first page have finished rendering and the user switches to the second page, the relevant components on the second page also use the same target parameters and components as the first page. In this case, the latest rendered components can be loaded directly from the local cache.
[0131] For example, the code example for this step is as follows:
[0132] mixin JsonStorageSingleObject <t>implements JsonStorageObjectConverter <t>{
[0133] String get collectionName;
[0134] Localstore get db =>JsonStorage.instance.db;
[0135] Automatically manage cache space
[0136] CollectionRef get collectionRef =>db.collection(collectionName);
[0137] / / Save and trigger refresh
[0138] Future save() async {
[0139] var objJson = toJson();
[0140] if (rxValue != null) {
[0141] / / rxValue!.value = fromJson(objJson);
[0142] rxValue!.value = this as T;
[0143] / / The address of rxValue is appLanguageRx, so refresh
[0144] rxValue!.refresh();
[0145] }
[0146] / / Created in a subfolder
[0147] await collectionRef.doc(collectionName).set(
[0148] objJson,
[0149] SetOptions(merge: true), );
[0151] }
[0152] Future <void>delete() async {
[0153] await collectionRef.doc(collectionName).delete();
[0154] }
[0155] @JsonKey(includeFromJson: false, includeToJson: false)
[0156] Rx <t>? rxValue;
[0157] / / Load and synchronize data from cache
[0158] Future <t>load({Rx <t>? rx}) async {
[0159] / / var saved = await db.collection(collectionName).get();
[0160] var saved = await collectionRef.get();
[0161] var res = fromJson({});
[0162] if (saved != null) res = fromJson(saved.values.last);
[0163] if (saved == null) res = this as T;
[0164] if (rx != null) {
[0165] rxValue = rx;
[0166] rx.value = res;
[0167] }
[0168] return res;
[0169] }
[0170] / / Serialization
[0171] @override
[0172] String toString() {
[0173] return jsonEncode(toJson());
[0174] }
[0175] }
[0176] Steps 21-27 in this embodiment are also applicable to monitoring a single parameter. Simply replace the parameter category set in the above steps with a single parameter to achieve monitoring of a single parameter.
[0177] like Figure 2 As shown, a third aspect of the present invention provides a component rendering apparatus based on parameter updates, comprising:
[0178] The determination module 31 is used to determine the set of listening parameters of a component in response to a selection operation of the parameter category set of a component of a page tag; wherein, the tag includes at least one component, the component includes at least one parameter, a parameter category set includes multiple parameters of at least one component, and the name of the listening parameter set has a prefix identifier;
[0179] The first listening module 32 is used to determine whether a configuration operation has been performed on the listening parameter set;
[0180] The second listening module 33 is used to determine whether the parameter value of the target parameter before the configuration operation and the parameter value of the target parameter after the configuration operation are consistent in response to the configuration operation of the target parameter in the listening parameter set.
[0181] The third listening module 34 is used to determine the target component based on the listening parameter set if there is a discrepancy, and to store the configuration parameter value of the configuration operation instruction in local storage;
[0182] Module 35 is used to determine whether the target component is in the local cache.
[0183] The caching module 36 is used to render the target component according to the configuration parameter value if the condition is met, and cache the rendered target component in the local cache.
[0184] In one embodiment of the present invention, it further includes:
[0185] The calling module is used to respond to page switching operations and call the rendered target component from the local cache; the target parameters are shared between the page before and after the switch.
[0186] In one embodiment of the present invention, the configuration operation is to perform operations such as storing parameters, deleting parameters, and / or loading parameters.
[0187] In one embodiment of the present invention, the parameters include: system language parameters and / or user information parameters.
[0188] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the component rendering method based on parameter updates provided in the above-described embodiments of the present invention.
[0189] A fifth aspect of the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the component rendering method based on parameter update provided in the above-described embodiments of the present invention.
[0190] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0191] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware devices.
[0192] The method provided in this invention can be applied to electronic devices. Specifically, the electronic device can be a desktop computer, a portable computer, a smart mobile terminal, a server, etc. No limitation is made herein; any electronic device that can implement this invention falls within the protection scope of this invention.
[0193] For the device / electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments.
[0194] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0195] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0196] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0197] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.< / t> < / t> < / t> < / void> < / t> < / t> < / void> < / t>
Claims
1. A component rendering method based on parameter updates, characterized in that, Includes the following steps: Front-end developers can select from a set of parameter categories for components within page tags. In response to the front-end developer's selection of the parameter category set for the component of the page tag, the parameter category set with the prefix is assigned to the original parameter category set to determine the listening parameter set for the component; wherein, each parameter category set is set with a set name and a set name with the prefix, the tag includes at least one component, the component includes at least one parameter, and a parameter category set includes multiple parameters of at least one component, the parameters including: system theme, system language parameters and / or user information parameters; the name of the listening parameter set has the prefix; Determine whether the user has configured the set of listening parameters; If so, in response to a configuration operation on a target parameter in the set of monitored parameters, determine whether the parameter value of the target parameter before the configuration operation is consistent with the parameter value of the target parameter after the configuration operation; If there is a discrepancy, the target component is determined based on the set of listening parameters, and the configuration parameter values indicated by the configuration operation are stored in local storage; Determine whether the target component is in the local cache; If so, the target component is rendered according to the configuration parameter value, and the rendered target component is cached in the local cache; In response to a page switching operation, the rendered target component is retrieved from the local cache; the target parameters are shared between the page before and after the switch.
2. The method as described in claim 1, characterized in that, The configuration operation involves storing parameters, deleting parameters, and / or loading parameters.
3. A component rendering device based on parameter updates, characterized in that, include: The front-end module is used by front-end developers to select from a set of parameter categories for components on the page. The determination module is used to respond to the front-end developer's selection operation of the parameter category set of the component of the page tag, and to assign the parameter category set with the prefix to the original parameter category set to determine the listening parameter set of the component; wherein, each parameter category set is set with a set name and a set name with the prefix, the tag includes at least one component, the component includes at least one parameter, and a parameter category set includes multiple parameters of at least one component, the parameters including: system language parameters and / or user information parameters; the name of the listening parameter set has the prefix; The first monitoring module is used to determine whether the user has configured the monitoring parameter set. The second monitoring module is used to determine, in response to a configuration operation on a target parameter in the monitoring parameter set, whether the parameter value of the target parameter before the configuration operation and the parameter value of the target parameter after the configuration operation are consistent. The third monitoring module is used to determine the target component based on the monitoring parameter set if there is a discrepancy, and to store the configuration parameter value indicated by the configuration operation in local storage; The judgment module is used to determine whether the target component is in the local cache; The caching module is used to render the target component according to the configuration parameter value if the condition is met, and cache the rendered target component in the local cache. The calling module is used to respond to page switching operations and call the rendered target component from the local cache; the target parameters are shared between the page before and after the switch.
4. The apparatus as described in claim 3, characterized in that, The configuration operation involves storing parameters, deleting parameters, and / or loading parameters.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the component rendering method based on parameter updates as described in claim 1 or 2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the component rendering method based on parameter updates as described in claim 1 or 2.
Citation Information
Patent Citations
Parameter configuration method and device, electronic equipment and storage medium
CN117632225A
