Application state adjusting method and system, storage medium and electronic device

By using dynamic configuration and cloud support, the problem of low efficiency in expanding the APP's business to multiple countries has been solved. It enables rapid expansion and flexible adjustment without modifying the native code, thereby improving expansion efficiency and resource utilization.

CN121478366APending Publication Date: 2026-02-06QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511357049.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

In existing technologies, each time an app adds business in a new country, it needs to modify its original code and release a new version, resulting in low efficiency, poor flexibility, resource redundancy, and long expansion cycles for multi-country business expansion.

Method used

By acquiring the first configuration data of regional parameter configuration, the application status is dynamically adjusted, including privacy protocol, language version and function configuration. By leveraging the collaborative work of the cloud configuration layer, native layer and business layer, the target application status is matched, avoiding modification of native code.

Benefits of technology

It enables zero-code extension of the APP to multiple countries, shortens the extension cycle, responds to changes in business parameters in various countries within hours, reduces resource redundancy, and improves extension efficiency and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121478366A_ABST
    Figure CN121478366A_ABST
Patent Text Reader

Abstract

The invention discloses an application state adjustment method and system, a storage medium and an electronic device, and relates to the technical field of smart home, and the method comprises the steps: obtaining region parameters of each region, and configuring first configuration data corresponding to each region according to each region parameter, the area parameters at least comprise one of area codes, privacy protocols, function configuration and language versions; determining second configuration data corresponding to the target area in the multiple pieces of first configuration data; the application state in the target application is adjusted to be a target application state matched with the target area according to the second configuration data, the application state at least comprises one of the following states: an interface display state and a function state, and the target application state is used for configuring services of the target application in the target area. According to the application, the problem that the expansion efficiency of the multi-country business of the APP is low due to the fact that the native code of the APP needs to be modified and the version of the APP needs to be reissued every time the business of one country is newly added in the APP in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of smart home, in particular to an application state adjustment method and system, a storage medium and an electronic device. BACKGROUND

[0002] The method for expanding the application program (APP) service in the related art is: presetting a static configuration file (for example, eXtensible Markup Language (XML) or JavaScript Object Notation (JSON)) in an APP installation package, loading the configuration to control part of the functions when starting.

[0003] The process in the related art is: 1) reading a local configuration file when starting the APP; 2) displaying / hiding part of the User Interface (UI) elements according to the configuration; 3) the configuration update needs to be implemented through APP version upgrade. However, the above process has the following problems: the dynamic expansion of new country services cannot be implemented, and the configuration change depends on the release, that is, each newly added country service needs to modify the original code of the application program (APP) and re-release, and the cycle is as long as 2-4 weeks.

[0004] Therefore, the method for expanding the APP service in the related art has the problem of low expansion efficiency of the APP multi-country service caused by the need to modify the original code of the APP and re-release each time a country service is added.

[0005] In view of the problem of low expansion efficiency of the APP multi-country service caused by the need to modify the original code of the APP and re-release each time a country service is added in the related art, no effective solution has been proposed. SUMMARY

[0006] The application embodiment provides an application state adjustment method and system, a storage medium and an electronic device to at least solve the problem of low expansion efficiency of the APP multi-country service caused by the need to modify the original code of the APP and re-release each time a country service is added in the related art.

[0007] According to an example of the embodiments of the present application, an application state adjustment method is provided, including: obtaining a region parameter of each region, and configuring a first configuration data corresponding to each region according to each region parameter, wherein the region parameter includes at least one of the following: a region code of each region, a privacy protocol corresponding to each region, a function configuration of each region, and a language version corresponding to each region; determining a second configuration data corresponding to a target region in a plurality of first configuration data; and adjusting an application state in a target application to a target application state matched with the target region according to the second configuration data, wherein the application state includes at least one of the following: an interface display state and a function state, and the target application state is used to configure a business of the target application in the target region.

[0008] In an example embodiment, determining a second configuration data corresponding to a target region in a plurality of first configuration data includes: determining a location information corresponding to the target region, and determining a target region code corresponding to the target region according to the location information; and traversing the plurality of first configuration data, and determining a second configuration data matched with the target region code in the plurality of first configuration data.

[0009] In an example embodiment, adjusting an application state in a target application to a target application state matched with the target region according to the second configuration data includes: obtaining a first field, a second field and a third field in the second configuration data, wherein the first field is used to indicate a privacy protocol template of the target application in the target region, the second field is used to indicate different language versions supported by the target application in the target region, and the third field is used to indicate a function configuration supported by the target application in the target region; and adjusting the application state of the target application according to a target field to generate the target application state, wherein the target field includes at least one of the following: the first field, the second field and the third field.

[0010] In an example embodiment, when the target field includes the first field, adjusting the application state of the target application according to the target field includes: determining the privacy protocol template of the target application in the target region according to the first field, and determining a target region code corresponding to the target region; replacing a target placeholder in the privacy protocol template according to the target region code to generate a target privacy protocol corresponding to the target region; and adjusting the application state of the target application according to the target privacy protocol.

[0011] In one exemplary embodiment, when the target field includes the second field, adjusting the application state of the target application based on the target field further includes: parsing the second field to obtain one or more language versions supported by the target application in the target region; determining the historical usage records of the target object using the target application, and determining the language preference data corresponding to the target object based on the historical usage records; determining the target language version among the one or more language versions based on the language preference data; and adjusting the application state of the target application based on the target language version.

[0012] In an exemplary embodiment, when the target field includes the third field, adjusting the application state of the target application based on the target field further includes: determining key-value pairs corresponding to each functional module supported by the target application in the third field; determining the on / off state of each functional module of the target application in the target area based on each key-value pair; and adjusting the application state of the target application based on the on / off state of each functional module.

[0013] According to another embodiment of this application, an application state adjustment system is also provided, comprising: a cloud configuration layer, a native layer, and a business layer, wherein: the cloud configuration layer is used to obtain regional parameters for each region and configure first configuration data corresponding to each region according to each regional parameter, wherein the regional parameters include at least one of the following: a region code for each region, a privacy protocol corresponding to each region, a function configuration for each region, and a language version corresponding to each region; the native layer is used to determine second configuration data corresponding to a target region from multiple first configuration data; the business layer is used to adjust the application state of a target application to a target application state matching the target region according to the second configuration data, wherein the application state includes at least one of the following: an interface display state and a function state, and the target application state is used to configure the business of the target application in the target region.

[0014] In an exemplary embodiment, the service layer is further configured to: send a service configuration request to the native layer via a bridging interface, so that the native layer determines the second configuration data in the cloud configuration layer according to the target region code of the target region contained in the service configuration request, and sends the second configuration data to the service layer via the bridging interface, wherein the bridging interface is an interface for enabling bidirectional communication between the service layer and the native layer.

[0015] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described application state adjustment method when running.

[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described application state adjustment method through the computer program.

[0017] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program, wherein the computer program is executed by a processor to perform the above-described method.

[0018] In this embodiment, first configuration data for each region (which can be each country) can be configured based on region parameters (including the region code, privacy protocol, function configuration, and language version). Second configuration data for the target region is determined from the first configuration data for multiple regions. The application state of the target application is adjusted based on the second configuration data. In other words, this application does not require modification of the APP's (i.e., the target application's) native code, but only requires modification of the first configuration data in the APP's configuration file to adjust the application state of the target application, thereby enabling the expansion of the APP's multi-country business. This application solves the problem in related technologies where adding a new country's business to an APP requires modifying the APP's native code and re-releasing the APP, resulting in low efficiency in expanding the APP's multi-country business, thus improving the efficiency of expanding the APP's multi-country business. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the hardware environment for an application state adjustment method according to an embodiment of this application;

[0022] Figure 2 This is a flowchart of an application state adjustment method according to an embodiment of this application;

[0023] Figure 3 This is a structural diagram of a dynamically configured multi-country business support system for apps according to an optional embodiment of this application;

[0024] Figure 4 This is a timing diagram of a dynamically configured method for supporting multi-country services in an app, according to an optional embodiment of this application.

[0025] Figure 5 This is an architecture diagram of an application state adjustment system according to an embodiment of this application. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] According to one aspect of the embodiments of this application, a method for adjusting application states is provided. This method for adjusting application states is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and smart house ecosystems. Optionally, Figure 1 This is a schematic diagram of the hardware environment for an application state adjustment method according to an embodiment of this application. In this embodiment, the above-described application state adjustment method can be applied to, for example... Figure 1 The hardware environment shown consists of a central control device 102 and a server 104. For example... Figure 1As shown, server 104 is connected to central control device 102 via network and can be used to provide services (such as application services) to terminals or clients installed on terminals. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.

[0029] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The central control device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0030] Figure 2 This is a flowchart of an application state adjustment method according to an embodiment of this application, which includes the following steps:

[0031] Step S202: Obtain the region parameters for each region, and configure the first configuration data corresponding to each region according to the region parameters. The region parameters include at least one of the following: the region code for each region, the privacy protocol for each region, the function configuration for each region, and the language version for each region.

[0032] Step S204: Determine the second configuration data corresponding to the target region from multiple first configuration data;

[0033] Step S206: Adjust the application state of the target application to match the target region according to the second configuration data, wherein the application state includes at least one of the following: interface display state, function state, and the target application state is used to configure the business of the target application in the target region.

[0034] Through the above steps, first configuration data for each region (which can be each country) can be configured based on its regional parameters (including the region code, privacy protocol, functional configuration, and language version). Second configuration data for the target region is determined from the first configuration data for multiple regions. The application state of the target application is then adjusted based on the second configuration data. In other words, this application does not require modification of the APP's (i.e., the target application's) native code; it only requires modification of the first configuration data in the APP's configuration file to adjust the application state of the target application, thereby enabling the expansion of the APP's multi-country business. This application solves the problem in related technologies where adding a new country's business to an APP requires modifying the APP's native code and re-releasing the APP, resulting in low efficiency in expanding the APP's multi-country business, thus improving the efficiency of APP's multi-country business expansion.

[0035] Optionally, the step S204 above, which involves determining the second configuration data corresponding to the target region from multiple first configuration data, includes: determining the location information corresponding to the target region, and determining the target region code corresponding to the target region based on the location information; traversing the multiple first configuration data, and determining the second configuration data that matches the target region code from the multiple first configuration data.

[0036] Understandably, this allows the application (target application) to dynamically obtain and apply secondary configuration data that best suits the target region. Specifically:

[0037] 1) Determine the location information corresponding to the target area: During the operation of the application, the application obtains the user's current location information by calling the device's location service (e.g., Global Positioning System (GPS), Wireless Fidelity (Wi-Fi), Cellular Network Positioning) or SubscriberIdentity Module (SIM card) information.

[0038] 2) Determine the target region code based on location information: After obtaining the location information, the application needs to convert it into a unified standard code, i.e., the target region code. The target region code can be a country code, for example, Brazil's country code is BR. During the conversion process, the application may use built-in logic or call external application programming interfaces (APIs, such as geocoding services) to determine the country or region based on latitude, longitude, or other location information.

[0039] 3) Traverse multiple first configuration data sets to determine the second configuration data that matches the target region code: A series of first configuration data sets are stored in the cloud database or file storage, each corresponding to a country or region. After the application determines the user's target region code, it traverses the first configuration dataset in the cloud, searches for the first configuration data that matches that region code, and then downloads and applies this specific configuration, i.e., the second configuration data.

[0040] Optionally, step S206 above, adjusting the application state of the target application to match the target region based on the second configuration data, includes: obtaining a first field, a second field, and a third field from the second configuration data, wherein the first field is used to indicate the privacy protocol template corresponding to the target application in the target region, the second field is used to indicate the different language versions supported by the target application in the target region, and the third field is used to indicate the functional configurations supported by the target application in the target region; adjusting the application state of the target application based on the target fields to generate the target application state, wherein the target fields include at least one of the following: the first field, the second field, and the third field.

[0041] Understandably, by parsing the initial configuration data for a specific target region, applications can be dynamically adjusted to adapt to the privacy policies, language environments, and functional requirements of different countries or regions. Specifically:

[0042] Retrieve the first, second, and third fields from the second configuration data:

[0043] 1) First field: This field indicates the privacy agreement template for the target application in the target region. It can be a Uniform Resource Locator (URL) pointing to a privacy agreement document specific to that country (target region), ensuring that the application complies with local privacy laws and regulations.

[0044] 2) Second field: This indicates the different language versions supported by the target application in the target region. It can be a list containing language codes and corresponding text resources, allowing the application to automatically switch the interface language based on the user's language preference.

[0045] 3) The third field: This indicates the configuration of features supported by the target application in the target region. It can be an object containing feature names and status (enabled / disabled) to control the availability of certain features or services within the application, adapting to the different needs of users in different countries.

[0046] Adjust the application state of the target application based on the target field:

[0047] Based on the first field obtained, the application updates the privacy agreement link, pointing to the latest version of the privacy agreement page for the target application in the target region. Based on the second field, it dynamically loads supported language resources; for example, in Brazil, the Portuguese version of the interface is displayed first. Based on the third field, certain functions are enabled or disabled; for example, when displaying payment method options, credit card payments and bank transfers are shown, but the service progress module may not be displayed because it is configured as false (not true).

[0048] Wherein, when the target field includes the first field, adjusting the application state of the target application based on the target field includes:

[0049] (1) Determine the privacy protocol template of the target application in the target region according to the first field, and determine the target region code corresponding to the target region; replace the target placeholder in the privacy protocol template according to the target region code to generate the target privacy protocol corresponding to the target region; adjust the application state of the target application according to the target privacy protocol.

[0050] Understandably, privacy protocols applicable to specific target areas can be dynamically generated and applied. Specifically:

[0051] 1) Determine the privacy agreement template based on the first field: When the target application detects that the user is located in a new target region, such as Brazil (BR), it searches for a privacy agreement template related to that region from the dynamic configuration data. The privacy agreement template may consist of a URL pointing to a webpage or document containing a privacy policy specific to that region.

[0052] 2) Determine the target area code: The target application determines the user's current country or region based on information such as SIM card, GPS or Wi-Fi signal, and thus obtains the target area code.

[0053] 3) Replace placeholders to generate target privacy protocol: The target application replaces the placeholders in the privacy protocol template with the target region code to generate a complete privacy protocol that directly points to the version corresponding to the target region;

[0054] 4) Adjust application status according to the target privacy agreement: Once a specific URL pointing to the target region's privacy agreement is generated, the target application needs to make corresponding adjustments to ensure that users can access and accept the correct privacy terms. This may include: displaying a pop-up or prompt asking users to read and agree to the version of the privacy policy corresponding to the target region; updating the in-app privacy settings page to display the privacy entries for the target region; and enabling or disabling certain data collection functions according to the requirements of the target region's privacy agreement to ensure the protection of users' personal data.

[0055] (2) If the target field includes the second field, parse the second field to obtain one or more language versions supported by the target application in the target region; determine the target object's historical usage record of the target application, and determine the language preference data corresponding to the target object based on the historical usage record; determine the target language version in the one or more language versions based on the language preference data; and adjust the application status of the target application based on the target language version.

[0056] Understandably, when users access different countries or regions, the application's language environment can be automatically adjusted to match the user's language preferences. Specifically:

[0057] Parse the second field to obtain the language version: Extract one or more language versions supported by the target region from the second field of the dynamically configured data. The second field can be a list containing different language codes and corresponding text resources.

[0058] Determine user history and language preferences: Determine user language preferences when using the application by analyzing user action records, settings preferences, or device language environment. For example, this might involve storing each user's recently used language or learning user preferences by analyzing how often they switch languages ​​within the application.

[0059] Determine the target language version based on language preference: Based on the user's historical usage records, determine the user's most likely language preference.

[0060] Adjust application state based on target language version: Adjust its state using a defined target language version, including: dynamically loading interface text corresponding to the target language version; automatically switching the target application's user interface (UI) elements, prompts, and help documentation to the user's preferred language; and updating the current language option in the multilingual switching menu.

[0061] (3) If the target field includes the third field, determine the key-value pair corresponding to each functional module supported by the target application in the third field; determine the on / off state of each functional module of the target application in the target area according to each key-value pair; and adjust the application state of the target application according to the on / off state of each functional module.

[0062] Understandably, certain functional modules can be dynamically enabled or disabled based on specific rules or user needs within the target area. Specifically:

[0063] The third field identifies the key-value pairs for each functional module: Key-value pairs corresponding to each functional module supported by the target application are parsed from the third field of the dynamic configuration data. The third field can contain a series of on / off states, each associated with a specific functional module.

[0064] Determine the on / off state of functional modules based on key-value pairs: Determine the on / off state of each functional module within the target area based on key-value pairs.

[0065] Functional modules may include: location tracking, cross-border services, language support, and currency conversion.

[0066] Adjust the application status based on the on / off status of the functional modules:

[0067] Finally, the application adjusts its state based on the on / off status of functional modules to respond to regional policies or user needs. This may include: enabling or disabling specific functions; updating the application interface to reflect changes in functionality; and adjusting background services to support or disable certain operations.

[0068] To better understand the process of the above application state adjustment method, the implementation flow of the above application state adjustment method will be described below in conjunction with optional embodiments, but it is not intended to limit the technical solution of the embodiments of this application.

[0069] The following technical issues exist when an app supports services in multiple countries:

[0070] 1) Low expansion efficiency: Each new country requires modification of the app's native code and a re-release, a process that can take 2-4 weeks;

[0071] 2) Poor flexibility: Parameters that differ between countries (e.g., Uniform Resource Locator (URL) for privacy protocols, service module switches) are hard-coded in the app and cannot be dynamically adjusted when policies change;

[0072] 3) Resource redundancy: Pre-configured settings for all countries result in an excessively large app installation package size.

[0073] The problems in the relevant technologies include: the need to re-release the version when adding a new country, and the delay in response to protocol / service changes due to the strong coupling between business logic and code in multiple countries.

[0074] Therefore, based on the above problems, the purpose of the optional embodiments of this application is to realize the cloud configuration of new country parameters, support without release, decouple business and country differences through standardized configuration, and support real-time hot update of business parameters of various countries. The core technical problem solved by the optional embodiments of this application is how to realize zero-code extension of APP to new country business and real-time parameter update through dynamic configuration.

[0075] Figure 3 This is a structural diagram of a dynamically configured multi-country business support system for apps according to an optional embodiment of this application, such as... Figure 3 As shown, the organizational structure of the dynamically configured multi-country business support system for apps includes:

[0076] 1. Cloud Configuration Center:

[0077] It stores JSON configuration files from multiple countries and provides a dynamic pull link and configuration file library through the Representational State Transfer Application Programming Interface (RESTful API).

[0078] Supports version management and canary releases (e.g., configuration changes take effect in batches according to country code).

[0079] 2. The file repository contains a JSON configuration structure, which stores country parameters:

[0080] 1) Country Code;

[0081] 2) privacyUrl (privacy agreement URL);

[0082] 3) monetary unit;

[0083] 4) Service Support;

[0084] 5) privateContent.

[0085] 3. Native App Container (Android / iOS (both operating systems)):

[0086] 1) Configuration loader: Retrieves the latest configuration at startup and caches it locally (caching strategy: entity tag plus last modified time (ETag + Last-Modified));

[0087] 2) Location Adapter: Obtains the current country code and matches the configuration via the Subscriber Identity Module (SIM card) / Global Positioning System (GPS);

[0088] 3) JSBridge: Exposes the getCountryConfig() method (get country configuration) to H5, returning structured data.

[0089] 4. H5 Business Layer:

[0090] 1) Privacy Protocol Rendering Module: Dynamically generates the privacy protocol URL ${countryCode} (replacing the country code variable);

[0091] 2) Service Module Controller: Show or hide service modules based on the servicesSupport field (service support configuration field) (e.g., isShowServiceProgress (whether to display service progress));

[0092] 3) Multilingual processor: Parses the privateContent field (private content) and selects the text according to the locale;

[0093] 4) Currency unit adapter.

[0094] Figure 4 This is a timing diagram of a dynamically configured method for supporting multi-country services in an app, according to an optional embodiment of this application. Figure 4 As shown, the process of the method for supporting multi-country services in an app based on dynamic configuration includes:

[0095] 1. H5 page triggers request:

[0096] When a user enters a page that requires country parameters, the native bridge interface getCountryConfig() (the method to obtain country configuration) is called;

[0097] 2. Native container handling:

[0098] 1) When there is no cache on the local device, an HTTPS request (HTTP GET request configuration (Hypertext Transfer Protocol GET request configuration information)) is sent to the cloud configuration center, and the cloud configuration center returns the configuration data (including all country parameters);

[0099] 2) Parse the JSON configuration, filter the current configuration from the configuration data based on the SIM card country code (i.e., match the current country, such as India countryCode:91), and return the structured configuration object to the H5 page;

[0100] 3. H5 dynamic rendering:

[0101] 1) Protocol URL concatenation (dynamically rendering privacy protocol privacyUrl): config.privacyUrl.replace("${countryCode}", countryCode) (This dynamically generates the privacy protocol URL link based on the current user's geographical location on the H5 page. Here, config.privacyUrl is a string containing the placeholder {countryCode}, which will be replaced with the actual code of the user's country, countryCode).

[0102] 2) Controlling the visibility of service modules: Iterate through the `servicesSupport` object and set the visibility of Document Object Model (DOM) elements (e.g., `document.getElementById("service-progress").style.display = config.servicesSupport.is`). `ShowServiceProgress? "block":"none"` (where `document.getElementById("service-progress")` is used to find the element with the ID "service-progress" in the HTML document; `{.style.display}` is used to access the `display` property of the `style` attribute of the found element; `config.servicesSupport.isShowServiceProgress` is a boolean value obtained from a configuration object, indicating whether the service progress module should be displayed; `"?"block":"none"` is a conditional (ternary) operator that determines whether to set the `display` property to "block" or "none" based on the value of `isShowServiceProgress`. The entire code snippet indicates that the `service-progress` element is shown or hidden on the page based on the dynamically obtained configuration `config.servicesSupport.isShowServiceProgress` from the server.)

[0103] 3) Update the currency symbol (monetary unit);

[0104] 4) Multilingual text: For example, Vietnamese users will preferentially use the privateContent.textVi1 (Vietnamese text 1 of private content) field.

[0105] In summary, the optional embodiments of this application define a cloud-based dynamic configuration structure, including: a JSON structure of countryCode, privacyUrl (containing variable templates), servicesSupport (service switch object), and privateContent (multilingual text); a configuration loading method: the native layer matches the configuration through countryCode and provides a standardized interface to H5 through JSBridge; an H5 dynamic rendering logic: based on the configuration, it implements protocol URL concatenation, service module visibility control, and currency symbol updates; and a multilingual privacy text processing mechanism: a coexistence structure of general fields and Vietnamese-specific fields is designed in privateContent. Based on the optional embodiments of this application, a revolutionary improvement in scalability can be achieved: support for new countries is shortened from a release cycle (2-4 weeks) to hours (only cloud-based JSON configuration is required); dynamic response capability: changes to privacy agreements, service modules, etc. of various countries can take effect in real time through hot updates, avoiding version lag caused by policy changes; resource optimization: compared with pre-setting all country resources, dynamic configuration reduces the size of the APP installation package by more than 30%; enhanced code maintainability: business logic and country parameters are decoupled, and adding new fields only requires extending the JSON structure without modifying the core code.

[0106] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0107] Figure 5 This is an architecture diagram of an application state adjustment system according to an embodiment of this application; such as Figure 5 As shown, it includes: cloud configuration layer 52, native layer 54, and business layer 56, wherein:

[0108] The cloud configuration layer 52 is used to obtain the region parameters of each region and configure the first configuration data corresponding to each region according to the region parameters. The region parameters include at least one of the following: the region code of each region, the privacy protocol corresponding to each region, the function configuration of each region, and the language version corresponding to each region.

[0109] The native layer 54 is used to determine the second configuration data corresponding to the target region from multiple first configuration data;

[0110] The service layer 56 is used to adjust the application state of the target application to match the target region according to the second configuration data, wherein the application state includes at least one of the following: interface display state and function state, and the target application state is used to configure the service of the target application in the target region.

[0111] Through the aforementioned system, first configuration data for each region (which can be each country) can be configured based on regional parameters (including the region code, privacy protocol, functional configuration, and language version). Second configuration data for the target region is determined from the first configuration data for multiple regions. The application state of the target application is then adjusted based on the second configuration data. In other words, this application does not require modification of the APP's (i.e., the target application's) native code; it only requires modification of the first configuration data in the APP's configuration file to adjust the target application's application state, thereby enabling the expansion of the APP's multi-country business. This application solves the problem in related technologies where adding a new country's business to an APP requires modifying the APP's native code and re-releasing the APP, resulting in low efficiency in expanding the APP's multi-country business, thus improving the efficiency of APP's multi-country business expansion.

[0112] In an exemplary embodiment, the service layer 56 is further configured to: send a service configuration request to the native layer via a bridging interface, so that the native layer determines the second configuration data in the cloud configuration layer according to the target region code of the target region contained in the service configuration request, and sends the second configuration data to the service layer via the bridging interface, wherein the bridging interface is an interface for enabling bidirectional communication between the service layer and the native layer.

[0113] In an exemplary embodiment, the native layer 54 is further configured to determine the location information corresponding to the target region, and determine the target region code corresponding to the target region based on the location information; traverse the plurality of first configuration data, and determine the second configuration data that matches the target region code from the plurality of first configuration data.

[0114] In an exemplary embodiment, the service layer 56 is further configured to: obtain a first field, a second field, and a third field from the second configuration data, wherein the first field is used to indicate the privacy protocol template corresponding to the target application in the target region, the second field is used to indicate different language versions supported by the target application in the target region, and the third field is used to indicate the functional configuration supported by the target application in the target region; adjust the application state of the target application according to the target fields to generate the target application state, wherein the target fields include at least one of the following: the first field, the second field, and the third field.

[0115] In an exemplary embodiment, the service layer 56 is further configured to: when the target field includes the first field, determine the privacy protocol template corresponding to the target application in the target region based on the first field, and determine the target region code corresponding to the target region; replace the target placeholder in the privacy protocol template according to the target region code to generate the target privacy protocol corresponding to the target region; and adjust the application state of the target application according to the target privacy protocol.

[0116] In an exemplary embodiment, the service layer 56 is further configured to: parse the second field if the target field includes the second field, to obtain one or more language versions supported by the target application in the target region; determine the historical usage records of the target object using the target application, and determine the language preference data corresponding to the target object based on the historical usage records; determine the target language version among the one or more language versions based on the language preference data; and adjust the application status of the target application based on the target language version.

[0117] In an exemplary embodiment, the service layer 56 is further configured to: if the target field includes the third field, determine a key-value pair corresponding to each functional module supported by the target application in the third field; determine the on / off state of each functional module corresponding to the target application in the target area based on each key-value pair; and adjust the application state of the target application based on the on / off state of each functional module.

[0118] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

[0119] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0120] S1, obtain the region parameters for each region, and configure the first configuration data corresponding to each region according to the region parameters, wherein the region parameters include at least one of the following: the region code of each region, the privacy protocol corresponding to each region, the function configuration of each region, and the language version corresponding to each region;

[0121] S2, determine the second configuration data corresponding to the target area from multiple first configuration data;

[0122] S3, adjust the application state of the target application to match the target region according to the second configuration data, wherein the application state includes at least one of the following: interface display state, function state, and the target application state is used to configure the business of the target application in the target region.

[0123] Embodiments of this application also provide an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0124] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0125] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0126] S1, obtain the region parameters for each region, and configure the first configuration data corresponding to each region according to the region parameters, wherein the region parameters include at least one of the following: the region code of each region, the privacy protocol corresponding to each region, the function configuration of each region, and the language version corresponding to each region;

[0127] S2, determine the second configuration data corresponding to the target area from multiple first configuration data;

[0128] S3, adjust the application state of the target application to match the target region according to the second configuration data, wherein the application state includes at least one of the following: interface display state, function state, and the target application state is used to configure the business of the target application in the target region.

[0129] Embodiments of this application also provide a computer program product, including a computer program that is executed by a processor through the steps of any of the above method embodiments.

[0130] Optionally, in this embodiment, the above-mentioned computer program product can be executed by a processor using the following steps:

[0131] S1, obtain the region parameters for each region, and configure the first configuration data corresponding to each region according to the region parameters, wherein the region parameters include at least one of the following: the region code of each region, the privacy protocol corresponding to each region, the function configuration of each region, and the language version corresponding to each region;

[0132] S2, determine the second configuration data corresponding to the target area from multiple first configuration data;

[0133] S3, adjust the application state of the target application to match the target region according to the second configuration data, wherein the application state includes at least one of the following: interface display state, function state, and the target application state is used to configure the business of the target application in the target region.

[0134] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0135] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0136] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0137] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for adjusting an application state, characterized in that, include: Obtain the region parameters for each region, and configure the first configuration data corresponding to each region according to the region parameters. The region parameters include at least one of the following: the region code for each region, the privacy protocol for each region, the function configuration for each region, and the language version for each region. Determine the second configuration data corresponding to the target region from multiple first configuration data; The application state in the target application is adjusted to match the target application state in the target region according to the second configuration data. The application state includes at least one of the following: interface display state and function state. The target application state is used to configure the business of the target application in the target region.

2. The method for adjusting the application state according to claim 1, characterized in that, Determine the second configuration data corresponding to the target region from multiple first configuration data sets, including: Determine the location information corresponding to the target area, and determine the target area code corresponding to the target area based on the location information; The plurality of first configuration data are traversed, and second configuration data matching the target region code is determined from the plurality of first configuration data.

3. The method for adjusting the application state according to claim 1, characterized in that, Adjusting the application state in the target application to match the target region based on the second configuration data includes: Obtain a first field, a second field, and a third field from the second configuration data. The first field is used to indicate the privacy protocol template corresponding to the target application in the target region. The second field is used to indicate the different language versions supported by the target application in the target region. The third field is used to indicate the functional configurations supported by the target application in the target region. The application state of the target application is adjusted according to the target field to generate the target application state, wherein the target field includes at least one of the following: the first field, the second field, and the third field.

4. The method for adjusting the application state according to claim 3, characterized in that, When the target field includes the first field, adjusting the application state of the target application based on the target field includes: Based on the first field, determine the privacy protocol template of the target application corresponding to the target region, and determine the target region code corresponding to the target region; The target placeholder in the privacy protocol template is replaced according to the target region code to generate the target privacy protocol corresponding to the target region; The application state of the target application is adjusted according to the target privacy protocol.

5. The method for adjusting the application state according to claim 3, characterized in that, When the target field includes the second field, adjusting the application state of the target application based on the target field further includes: Parse the second field to obtain one or more language versions supported by the target application in the target region; Determine the target object's historical usage records of the target application, and determine the language preference data corresponding to the target object based on the historical usage records; The target language version is determined from the one or more language versions based on the language preference data; the application status of the target application is adjusted according to the target language version.

6. The method for adjusting the application state according to claim 3, characterized in that, When the target field includes the third field, adjusting the application state of the target application based on the target field further includes: In the third field, determine the key-value pair corresponding to each functional module supported by the target application; and determine the on / off state of each functional module of the target application within the target area based on each key-value pair. The application state of the target application is adjusted according to the on / off state of each functional module.

7. An application state adjustment system, characterized in that, include: The cloud configuration layer, the native layer, and the business layer are as follows: The cloud configuration layer is used to obtain the region parameters of each region and configure the first configuration data corresponding to each region according to the region parameters. The region parameters include at least one of the following: the region code of each region, the privacy protocol corresponding to each region, the function configuration of each region, and the language version corresponding to each region. The native layer is used to determine the second configuration data corresponding to the target region from multiple first configuration data; The business layer is used to adjust the application state of the target application to match the target region according to the second configuration data, wherein the application state includes at least one of the following: interface display state and function state, and the target application state is used to configure the business of the target application in the target region.

8. The application state adjustment system according to claim 7, characterized in that, The business layer is also used for: A service configuration request is sent to the native layer through a bridging interface, so that the native layer determines the second configuration data in the cloud configuration layer according to the target area code of the target area contained in the service configuration request, and sends the second configuration data to the service layer through the bridging interface. The bridging interface is an interface used to enable bidirectional communication between the service layer and the native layer.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 6.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 6 through the computer program.