A method, device, electronic device and storage medium for updating page theme

By obtaining and using the page theme color information to update the code file, the problem of inconvenient page theme update is solved, convenient update without code modification is realized, risks and maintenance costs are reduced, and it is decoupled from the backend for easy management.

CN114510314BActive Publication Date: 2024-09-20BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210182512.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2024-09-20
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

In the existing technology, page theme updating is not convenient enough, and manual code modification is risky and the process is complex, resulting in difficulty in maintenance and management.

Method used

By obtaining the theme color information of the page, loading the code file, and running the code file with the theme color information as parameters, the page theme is updated, avoiding modifications to the site server-side code, and achieving convenient updates.

Benefits of technology

There is no need to modify the server-side code of the site, which enables convenient updates of page themes, reduces risks and maintenance costs, and is decoupled from the backend for easy management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510314B
    Figure CN114510314B
Patent Text Reader

Abstract

The present disclosure relates to a method, device, electronic device and storage medium for updating a page theme. The method comprises: obtaining theme color information of a page in response to a page access request; loading a code file for defining page style rules; and running the code file with the theme color information as an input parameter to update the theme of the page. In the embodiment of the present disclosure, the theme color information is used as a code file for defining page style rules, and the effect of updating the page theme can be easily achieved by updating the theme color information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a method, device, electronic device and storage medium for updating a page theme. Background Art

[0002] With the development of Internet technology, personalized web pages have emerged. In related technologies, the modification of the theme of the web page displayed on the terminal often relies on manual modification of the theme code on the website server. Manual modification of the code may cause errors and there is a great risk. In addition, after the code is modified, the publishing process must be carried out, which makes the update of the page theme inconvenient. Summary of the invention

[0003] The present disclosure provides a method, device, electronic device and storage medium for updating a page theme, so as to at least solve the technical problem that the page theme update is not convenient enough in the related art. The technical solution of the present disclosure is as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, a method for updating a page theme is provided, comprising:

[0005] In response to a page access request, obtaining theme color information of the page;

[0006] Load the code file used to define page style rules;

[0007] The code file is run with the theme color information as an input parameter to update the theme of the page.

[0008] In a possible implementation, in response to a page access request, obtaining theme color information of the page includes:

[0009] Responding to a request for access to a page, the request carrying an account identifier;

[0010] Acquire theme color information of the page corresponding to the account identifier.

[0011] In a possible implementation, the acquiring the theme color information of the page corresponding to the account identifier includes:

[0012] Receiving theme color information of the page corresponding to the account identifier;

[0013] Storing the account identifier and the theme color information in a local storage in the form of a key-value pair;

[0014] The theme color information is acquired from the local storage.

[0015] In a possible implementation, the method further includes:

[0016] Acquire the image information of the page corresponding to the account identifier from the site server, wherein the site server stores the association relationship between the account identifier and the page image information;

[0017] The picture information is displayed.

[0018] In a possible implementation, the acquiring the theme color information of the page includes:

[0019] Acquire the first theme color information of the page from the site server;

[0020] When the first theme color information is updated compared to the stored second theme color information, the first theme color information is determined to be the theme color information of the page.

[0021] In a possible implementation, the theme color information includes a theme color value and an auxiliary transparency; and taking the theme color information as an input parameter and running the code file to update the theme of the page includes:

[0022] The code file is run with the theme color value as an input parameter of a theme color variable and the auxiliary transparency as an input parameter of an auxiliary color variable to update the theme color and the auxiliary color in the page.

[0023] According to a second aspect of an embodiment of the present disclosure, there is provided a device for updating a page theme, including:

[0024] A first acquisition module, used for acquiring theme color information of a page in response to an access request of the page;

[0025] Loading module, used to load code files used to define page style rules;

[0026] The update module is used to run the code file with the theme color information as an input parameter to update the theme of the page.

[0027] In a possible implementation, the acquisition module includes:

[0028] A response submodule, used to respond to a page access request, wherein the access request carries an account identifier;

[0029] The first acquisition submodule is used to acquire theme color information of the page corresponding to the account identifier.

[0030] In a possible implementation, the acquisition submodule includes:

[0031] A receiving unit, configured to receive theme color information of the page corresponding to the account identifier;

[0032] A storage unit, used to store the account identifier and the theme color information in a local storage in the form of a key-value pair;

[0033] An acquiring unit is used to acquire the theme color information from the local storage.

[0034] In a possible implementation, the method further includes:

[0035] A second acquisition module is used to acquire the image information of the page corresponding to the account identifier from the site server, wherein the site server stores the association relationship between the account identifier and the page image information;

[0036] A display module is used to display the image information.

[0037] In a possible implementation, the first acquisition module includes:

[0038] A second acquisition submodule is used to acquire the first theme color information of the page from the website server;

[0039] The determination submodule is configured to determine that the first theme color information is the theme color information of the page when the first theme color information is updated compared to the stored second theme color information.

[0040] In a possible implementation, the theme color information includes a theme color value and auxiliary transparency, and the updating module includes:

[0041] The update submodule is used to run the code file with the theme color value as the input parameter of the theme color variable and the auxiliary transparency as the input parameter of the auxiliary color variable to update the theme color and auxiliary color in the page.

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

[0043] processor;

[0044] a memory for storing instructions executable by the processor;

[0045] Wherein, the processor is configured to execute the instructions to implement the page theme updating method as described in any one of the embodiments of the present disclosure.

[0046] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute a method for updating a page theme as described in any one of the embodiments of the present disclosure.

[0047] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, which includes instructions, and is characterized in that when the instructions are executed by a processor of an electronic device, the electronic device is enabled to execute a method for updating a page theme as described in any one of the embodiments of the present disclosure.

[0048] The technical solution provided by the embodiment of the present disclosure brings at least the following beneficial effects: In the embodiment of the present disclosure, the theme color information is used as the code file for defining the page style rules, and the effect of updating the page theme can be easily achieved by updating the theme color information. There is no need to modify the code of the page theme on the site server side, avoiding various costs and risks caused by modifying the code. In addition, the embodiment of the present disclosure is decoupled from the back-end site server when the page theme is updated, which is convenient for maintenance and management.

[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0051] Figure 1 The figure is a flow chart of a method for updating a page theme according to an exemplary embodiment.

[0052] Figure 2 The figure is a schematic block diagram of a device for updating a page theme according to an exemplary embodiment.

[0053] Figure 3 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0054] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0055] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0056] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0057] Figure 1 FIG. 1 is a flow chart showing a method for updating a page theme according to an exemplary embodiment. Figure 1 As shown, a method for updating a page theme includes:

[0058] Step S101, in response to a page access request, obtaining theme color information of the page.

[0059] In the disclosed embodiment, the theme color information may include color matching information in the web page, such as color values ​​of theme colors, auxiliary colors, etc., and may also include color formats of various colors, such as RGB format, YUV format, etc. Among them, the theme color may include the most important color in the page, that is, the color or main module that occupies a larger area in the web page; the auxiliary color may include the auxiliary color generated in response to the theme color. It should be noted that the setting method of the preset theme color is not limited to the above examples. For example, the highlight color, the technical personnel in the relevant field may make other changes under the inspiration of the technical essence of this application, but as long as the functions and effects achieved are the same or similar to those of this application, they should be covered within the scope of protection of this application.

[0060] In the disclosed embodiment, the access request of the page may include a trigger when the user inputs the access URL in the browser address bar, and may also include a trigger when the user clicks a page access URL link on the current page. In response to the trigger request to access the URL, the browser resolves the IP address according to the domain name in the URL and establishes a TCP connection with the site server. In one example, the theme color information sent by the site server can be directly received. In another example, the theme color information can also be stored in the local memory, and the theme color information of the page can be obtained from the local memory.

[0061] Step S103, loading a code file for defining page style rules.

[0062] In the disclosed embodiment, the page style may include the display content and display color of the elements in the page, such as the background color of the page, the colors of various borders in the page, the colors of various fonts in the page, etc. In one example, a style can be added to the style sheet through the addRule() method in the JavaScript language. For example: styleSheets.addRule(selector, style, [index]), styleSheets represents the style sheet reference, and the parameters are described as follows: selector: represents the style selector, which is passed in the form of a string. style: represents a specific declaration, which is passed in the form of a string. index: represents an index number, which represents the index position of the added style in the style sheet. The default value is -1, which means it is at the end of the style sheet. This parameter can be set. In another example, the insertRule() method can also be used to add a style. The usage is as follows: styleSheet.insertRule(rule, [index]), and the parameters are described as follows: rule: represents a complete style string. index: has the same function as the index parameter in the addRule() method, but defaults to 0 and is placed at the end of the style sheet.

[0063] The code file described in the embodiment of the present disclosure is described in detail below in conjunction with a section of program code, and the program code may include:

[0064] addRule(){let hosColor=globalContext.get('hosColor');

[0065] if(hosColor){ / / console.log(document.styleSheets);

[0066] let styleSheet=document.styleSheets[0];

[0067] styleSheet.addRule('.main_color',`color:rgb(${hosColor})!important`);

[0068] styleSheet.addRule('.bg_main_color',`background-color:rgb(${hosColor})!important`);

[0069] styleSheet.addRule('.bg_main_color_op30',`background-color:rgba(${hosColor},0.3)!important`);

[0070] styleSheet.addRule('.bg_main_color_op60',`background-color:rgba(${hosColor},0.6)!important`);

[0071] styleSheet.addRule('.before_text_main_color:before',`color:rgb(${hosColor})!important`);

[0072] styleSheet.addRule('.before_bg_main_color:before',`background-color:rgb(${hosColor})!important`);

[0073] styleSheet.addRule('.aside_main_color',`color:rgb(${hosColor})!important`);

[0074] styleSheet.addRule('.after_bg_main_color:after',`background-color:rgb(${hosColor})!important`);

[0075] Referring to the above program code, the addRule function is used in the program code to add style rules for the page, wherein .main_color, .before_text_main_color, .aside_main_color, etc. are used to represent the element content in the page, and hosColor represents the theme color information. The code file defining the page style rules can be pre-set and stored on the site server, and the code file is loaded when accessing the site server.

[0076] Step S105, running the code file with the theme color information as an input parameter to update the theme of the page.

[0077] In the embodiment of the present disclosure, the theme color information is used as an input parameter of the program code in the code file, such as hosColor in the above program code. The color value of the theme color information is copied to the parameter variable, and the code file is run to update the theme of the page. In one example, the change of the page theme is achieved by updating the color value of the theme color information.

[0078] In the disclosed embodiment, the theme color information is used as the code file to define the page style rules. By updating the theme color information, the effect of updating the page theme can be easily achieved. Compared with the prior art, the disclosed embodiment does not need to modify the code of the page theme on the site server side, avoiding various costs and risks caused by modifying the code. Since the disclosed embodiment does not need to modify the code, it is decoupled from the back-end site server when the page theme is updated, which is convenient for maintenance and management.

[0079] In a possible implementation, in response to a page access request, obtaining theme color information of the page includes:

[0080] Responding to a request for access to a page, the request carrying an account identifier;

[0081] Acquire theme color information of the page corresponding to the account identifier.

[0082] In the disclosed embodiment, the account identifier can be used to mark a business party, for example, hospital A and hospital B, hospital A corresponds to a first account identifier, hospital B corresponds to a second account identifier, and the first account identifier is different from the second account identifier. Hospital A has multiple terminal devices, such as device a, device b, and device c, and devices a, device b, and device c share the same account identifier, namely, the first account identifier. In one example, the account identifier can be written in the registry during the debugging phase of the device, and the account identifier will be read from the registry after the device is started. In one example, the account identifier can be sent by the terminal device to the site server together with the access request.

[0083] In the disclosed embodiment, the account identifier and the theme color information may have a preset association relationship, for example, one account identifier corresponds to one theme color information or multiple account identifiers correspond to one theme color information. In one example, the theme color information corresponding to the account identifier of the terminal device issued by the site server may be directly received, and in another example, the theme color information corresponding to the received account identifier may be stored in the local memory, and the theme color information of the page may be obtained from the local memory.

[0084] In the disclosed embodiment, there is a preset association relationship between the account identifier and the theme color information. Different business parties can enjoy different theme colors by setting different account identifiers, satisfying the personalized page theme. In addition, the page theme can be conveniently updated by modifying the account identifier or theme color information.

[0085] In a possible implementation, the acquiring the theme color information of the page corresponding to the account identifier includes:

[0086] Receiving theme color information of the page corresponding to the account identifier;

[0087] Storing the account identifier and the theme color information in a local storage in the form of a key-value pair;

[0088] The theme color information is acquired from the local storage.

[0089] In the disclosed embodiment, the theme color information of the page corresponding to the account identifier is received, and the account identifier and the theme color information can be stored using the localStorage function or sessionStorage of the browser. Among them, localStorage can save data for a long time, and the saved data has no expiration time until it is manually deleted. Its data attribute is read-only. SessionStorage can save data in the current session, and can temporarily save data. After closing the window or tab, the data will be automatically deleted. In one example, the account identifier and the theme color information can be stored in a key-value pair (key / value) format. For example: ("sign_1", "125, 235, 218"), ("sign_2", "127, 225, 228") and ("sign_3", "126, 229, 128"), etc. Then, the theme color information is obtained from the local storage. It should be noted that the method of locally storing account identification and theme color information is not limited to the functions exemplified above. Technical personnel in the relevant field may make other changes inspired by the technical essence of this application. However, as long as the functions and effects achieved are the same or similar to those of this application, they should be covered within the scope of protection of this application.

[0090] In a possible implementation, the method further includes:

[0091] Acquire the image information of the page corresponding to the account identifier from the site server, wherein the site server stores the association relationship between the account identifier and the page image information;

[0092] The picture information is displayed.

[0093] In the disclosed embodiment, the page image information includes background images, trademark images, or page element images of other functions in the page. An association relationship between an account identifier and page image information can be established in advance, and the association relationship can be stored in a site server. In the disclosed embodiment, the site server can include a central server for a website, or it can include edge servers deployed in various places such as CDN (Content Delivery Network). The latter enables users to obtain page image information nearby through the load balancing, content distribution, scheduling and other functions of the central server, thereby reducing network congestion and improving the user's access response speed and hit rate.

[0094] In the disclosed embodiment, the page image information corresponding to the account identifier is obtained from the site server according to the account identifier. If the account identifier is updated, the corresponding page image information is also updated. Therefore, the page image information in the page theme can be dynamically modified according to the different account identifiers.

[0095] In a possible implementation, the acquiring the theme color information of the page includes:

[0096] Acquire the first theme color information of the page from the site server;

[0097] When the first theme color information is updated compared to the stored second theme color information, the first theme color information is determined to be the theme color information of the page.

[0098] In the disclosed embodiment, after the first theme color information of the page is obtained from the site server, the first theme color information will be compared with the second theme color information. If the first theme color information and the second theme color information are the same, indicating that the page theme color information has not changed, the first theme color information will not be downloaded repeatedly, and the second theme color information will be used as an incoming parameter of the code file of the page style rules, and the code file will be run to update the theme of the page. If the first theme color information and the second theme color information are not the same, indicating that the page theme color information has been updated, the updated first theme color information will be downloaded, and the first theme color information will be used as an incoming parameter of the code file of the page style rules, and the code file will be run to update the theme of the page.

[0099] In the disclosed embodiment, when the theme color information of a page is updated, the updated theme color information is automatically downloaded. The updated theme color information is used as an input parameter of the code file, and the code file is run to update the theme of the page. The disclosed embodiment does not repeatedly download the unupdated theme color information, thereby ensuring the loading speed of the page.

[0100] In a possible implementation, the theme color information includes a theme color value and an auxiliary transparency; and taking the theme color information as an input parameter and running the code file to update the theme of the page includes:

[0101] The code file is run with the theme color value as an input parameter of a theme color variable and the auxiliary transparency as an input parameter of an auxiliary color variable to update the theme color and the auxiliary color in the page.

[0102] In the embodiment of the present disclosure, the theme color value can be used as the color value of the theme color, the auxiliary transparency can be used as the color value of the auxiliary color, and different auxiliary colors can be obtained by setting different transparency of the theme color. In one example, when designing the user interface, the page color format adopts the RGB format, and the color attribute of the user interface is set as the theme color and transparency. In this way, the theme color value is the input parameter of the theme color variable, and the auxiliary transparency is the input parameter of the auxiliary color variable. When the theme color value is updated, the theme color and the auxiliary color of the page can be modified synchronously. In another example, when designing the user interface, the page color format adopts the YUV format, and the color attribute of the user interface can also be set as the theme color value and the auxiliary saturation. The auxiliary saturation can be used as the color value of the auxiliary color. Different auxiliary colors can be obtained by setting different saturations of the theme color. In this way, the theme color value is the input of the theme color variable, and the auxiliary saturation is used as the input parameter of the auxiliary color variable. When the theme color value is updated, the theme color and the auxiliary color of the page can be modified synchronously. It should be noted that the setting method of the input parameters of the auxiliary color variable is not limited to the above example, and can be adaptively modified according to the format of the color space. The technicians in the relevant field may make other changes under the inspiration of the technical essence of this application, but as long as the functions and effects achieved are the same or similar to those of this application, they should be included in the protection scope of this application.

[0103] The code file described in the embodiment of the present disclosure is further described below in conjunction with a section of program code, and the program code may include:

[0104] styleSheet.addRule('.bg_main_color_op20',`background-color:rgba(${hosColor},0.2)!important`);

[0105] styleSheet.addRule('.bd_left_main_color_op20',`border-left-color:rgba(${hosColor},0.3)!important`);

[0106] styleSheet.addRule('.bd_main_color_op20',`border-color:rgba(${hosColor},0.2)!important`);

[0107] Referring to the above program code, the addRule function is used to add the style rules of the page, where `background-color, `border-left-color and `border-color are used to represent the element content in the page, and hosColor, 0.2 represents the transparency of the theme color information. By setting the transparency level, such as 0.2 or 0.3, the auxiliary color in the page element can be changed.

[0108] In the disclosed embodiment, the theme color value is used as the input parameter of the theme color variable, and the auxiliary transparency is used as the input parameter of the auxiliary color variable. The code file is run to achieve the synchronous modification of the theme color and the auxiliary color in the page. Furthermore, different auxiliary colors can be achieved by setting the transparency value in the code file to meet the diverse design requirements of the page.

[0109] It should be understood that, although the steps of each embodiment are displayed in sequence according to the description order, these steps are not necessarily executed in sequence according to this order. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0110] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can refer to each other, and each embodiment focuses on the differences from other embodiments. For related points, please refer to the description of other method embodiments.

[0111] Figure 2 FIG. 1 is a schematic block diagram of a device for updating a page theme according to an exemplary embodiment. Figure 2 As shown, the device 200 includes:

[0112] The first acquisition module 201 is used to obtain theme color information of a page in response to an access request of the page;

[0113] A loading module 203 is used to load a code file for defining page style rules;

[0114] The updating module 205 is used to run the code file with the theme color information as an input parameter to update the theme of the page.

[0115] In a possible implementation, the acquisition module includes:

[0116] A response submodule, used to respond to a page access request, wherein the access request carries an account identifier;

[0117] The first acquisition submodule is used to acquire theme color information of the page corresponding to the account identifier.

[0118] In a possible implementation, the acquisition submodule includes:

[0119] A receiving unit, configured to receive theme color information of the page corresponding to the account identifier;

[0120] A storage unit, used to store the account identifier and the theme color information in a local storage in the form of a key-value pair;

[0121] An acquiring unit is used to acquire the theme color information from the local storage.

[0122] In a possible implementation, the method further includes:

[0123] A second acquisition module is used to acquire the image information of the page corresponding to the account identifier from the site server, wherein the site server stores the association relationship between the account identifier and the page image information;

[0124] A display module is used to display the image information.

[0125] In a possible implementation, the first acquisition module includes:

[0126] A second acquisition submodule is used to acquire the first theme color information of the page from the website server;

[0127] The determination submodule is configured to determine that the first theme color information is the theme color information of the page when the first theme color information is updated compared to the stored second theme color information.

[0128] In a possible implementation, the theme color information includes a theme color value and auxiliary transparency, and the updating module includes:

[0129] The update submodule is used to run the code file with the theme color value as the input parameter of the theme color variable and the auxiliary transparency as the input parameter of the auxiliary color variable to update the theme color and auxiliary color in the page.

[0130] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0131] Figure 3 1 is a block diagram of an electronic device 300 for a method for updating a page theme according to an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0132] Reference Figure 3 , the electronic device 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output (I / O) interface 312 , a sensor component 314 , and a communication component 316 .

[0133] The processing component 302 generally controls the overall operation of the electronic device 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.

[0134] The memory 304 is configured to store various types of data to support operations on the electronic device 300. Examples of such data include instructions for any application or method operating on the electronic device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.

[0135] The power supply component 306 provides power to the various components of the electronic device 300. The power supply component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 300.

[0136] The multimedia component 308 includes a screen that provides an output interface between the electronic device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the electronic device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0137] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the electronic device 300 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting an audio signal.

[0138] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0139] The sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for the electronic device 300. For example, the sensor assembly 314 can detect the open / closed state of the electronic device 300, the relative positioning of the components, such as the display and keypad of the electronic device 300, and the sensor assembly 314 can also detect the position change of the electronic device 300 or the components of the electronic device 300, the presence or absence of contact between the user and the electronic device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the electronic device 300. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0140] The communication component 316 is configured to facilitate wired or wireless communication between the electronic device 300 and other devices. The electronic device 300 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0141] In an exemplary embodiment, the electronic device 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0142] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the above instructions can be executed by the processor 320 of the electronic device 300 to perform the above method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0143] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions. The instructions can be executed by the processor 320 of the electronic device 300 to complete the above method.

[0144] It should be noted that the above-mentioned devices, electronic devices, computer-readable storage media, computer program products, etc. may also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments, which will not be described one by one here.

[0145] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0146] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for updating a page theme, characterized in that: include: In response to a page access request, obtaining theme color information of the page corresponding to the account identifier; wherein the access request carries the account identifier; Loading a code file for defining page style rules from a site server; wherein the page style rules include display content and display color of elements in the page; The code file is run with the theme color information as an input parameter to update the theme of the page.

2. The method according to claim 1, characterized in that The acquiring the theme color information of the page corresponding to the account identifier includes: Receiving theme color information of the page corresponding to the account identifier; Storing the account identifier and the theme color information in a local storage in the form of a key-value pair; The theme color information is acquired from the local storage.

3. The method according to claim 1, characterized in that The method further comprises: Acquire the image information of the page corresponding to the account identifier from the site server, wherein the site server stores the association relationship between the account identifier and the page image information; The picture information is displayed.

4. The method according to claim 1, characterized in that: The obtaining of the theme color information of the page includes: Acquire the first theme color information of the page from the site server; When the first theme color information is updated compared to the stored second theme color information, the first theme color information is determined to be the theme color information of the page.

5. The method according to any one of claims 1 to 4, characterized in that The theme color information includes a theme color value and an auxiliary transparency; the code file is run with the theme color information as an input parameter to update the theme of the page, including: The code file is run with the theme color value as an input parameter of a theme color variable and the auxiliary transparency as an input parameter of an auxiliary color variable to update the theme color and the auxiliary color in the page.

6. A device for updating a page theme, characterized in that: include: A first acquisition module, configured to respond to a page access request and acquire the theme color information of the page; wherein the first acquisition module includes a response submodule and a first acquisition submodule, the response submodule is configured to respond to the page access request, the access request carries an account identifier; the first acquisition submodule is configured to acquire the theme color information of the page corresponding to the account identifier; A loading module, used to load a code file for defining page style rules from a site server; wherein the page style rules include display content and display color of elements in the page; The update module is used to run the code file with the theme color information as an input parameter to update the theme of the page.

7. The device according to claim 6, characterized in that The first acquisition submodule includes: A receiving unit, configured to receive theme color information of the page corresponding to the account identifier; A storage unit, used to store the account identifier and the theme color information in a local storage in the form of a key-value pair; An acquiring unit is used to acquire the theme color information from the local storage.

8. The device according to claim 6, characterized in that Also includes: A second acquisition module is used to acquire the image information of the page corresponding to the account identifier from the site server, wherein the site server stores the association relationship between the account identifier and the page image information; A display module is used to display the image information.

9. The device according to claim 6, characterized in that The first acquisition module includes: A second acquisition submodule is used to acquire the first theme color information of the page from the website server; The determination submodule is configured to determine that the first theme color information is the theme color information of the page when the first theme color information is updated compared to the stored second theme color information.

10. The device according to any one of claims 6 to 9, characterized in that The theme color information includes a theme color value and auxiliary transparency, and the updating module includes: The update submodule is used to run the code file with the theme color value as the input parameter of the theme color variable and the auxiliary transparency as the input parameter of the auxiliary color variable to update the theme color and auxiliary color in the page.

11. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the page theme updating method as described in any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method for updating the page theme as described in any one of claims 1 to 5.

13. A computer program product, comprising instructions, characterized in that: When the instruction is executed by a processor of an electronic device, the electronic device is enabled to execute the page theme updating method as described in any one of claims 1 to 5.