US20230259691A9 - Method, apparatus, device and storage medium for determining page theme - Google Patents

Method, apparatus, device and storage medium for determining page theme Download PDF

Info

Publication number
US20230259691A9
US20230259691A9 US17/213,447 US202117213447A US2023259691A9 US 20230259691 A9 US20230259691 A9 US 20230259691A9 US 202117213447 A US202117213447 A US 202117213447A US 2023259691 A9 US2023259691 A9 US 2023259691A9
Authority
US
United States
Prior art keywords
target
style resource
style
theme
resource link
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US17/213,447
Other languages
English (en)
Other versions
US20210216701A1 (en
Inventor
Da Qu
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Assigned to BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD. reassignment BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: QU, Da
Publication of US20210216701A1 publication Critical patent/US20210216701A1/en
Publication of US20230259691A9 publication Critical patent/US20230259691A9/en
Granted legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to a field of computer technologies, in particular, to a field of interface generation technologies, and more particularly, to a method, apparatus, device, and storage medium for determining a page theme.
  • the H5 (HTML5, HyperText Mark-up Language5) page is required to support a presentation of both theme of light and theme of dark.
  • the page In the dark mode, the page needs to be correspondingly switched to the theme of dark.
  • the page In the non-dark mode, the page needs to be correspondingly switched to the theme of light. Therefore, it is desirable to provide a method of determining a page theme to quickly switch themes corresponding to an operating environment.
  • a method of determining a page theme comprising: acquiring a current operating environment of a target page; determining a target theme that matches the current operating environment; searching for a target style resource link matching the target theme from a style resource link database, where the style resource link database pre-stores style resource links corresponding to different themes; loading a CSS variable value in the target style resource link onto the target page to obtain the target theme, where the CSS variable value in the target style resource link is used to indicate, among styles of the target page, a style that is changed at the time of switching the themes.
  • an apparatus for determining a page theme comprising: an acquisition module configured to acquire a target page current operating environment; a determination module configured to determine a target theme that matches the current operating environment; a searching module configured to search for a target style resource link matching the target theme from a database pre-stored with style resource links corresponding to different themes; a first loading module configured to load a CSS variable value in the target style resource link onto the target page to obtain the target theme, where the CSS variable value in the target style resource link is used to indicate, the styles of the target page, a style that is changed at the time of switching the themes.
  • FIG. 1 is an example system architecture diagram of the systems to which some embodiments of the present disclosure may be applied;
  • FIG. 2 is a flowchart of a method for determining a page theme according to embodiments of the present disclosure
  • FIG. 3 is a flowchart of a method for determining a page theme according to another embodiment of the present disclosure
  • FIG. 4 is a flowchart of a method for determining a page theme according to embodiments of the present disclosure
  • FIG. 5 is a schematic structural diagram of an apparatus for determining a page theme according to embodiments of the present disclosure
  • FIG. 6 is a schematic structural diagram of a computer system suitable for implementing a server or terminal according to embodiments of the present disclosure.
  • the page theme is switched by switching different CSS style files and there are too many redundant elements in the style files as well as a large volume of files, resulting in a long switching time, and the switching experience is not smooth.
  • the page theme switching may be completed by loading the CSS variable value in the target style resource link on the target page at the time of switching the themes.
  • the CSS variable value indicates a style that is changed when the themes are switched, without too many redundant elements participating, increasing the switching speed and thus making the switching smoother.
  • FIG. 1 illustrates an example system architecture 100 in which a method and apparatus for determining a page theme according to embodiments of the present disclosure may be applied.
  • the system architecture 100 may comprise terminal devices 101 , 102 , 103 , a network 104 , and a server 105 .
  • the network 104 serves as a medium for providing a communication link between the terminal devices 101 , 102 , 103 and the server 105 .
  • the network 104 may include various types of connections, such as wired, wireless communication links, or fiber optic cables, or the like.
  • a user may use the terminal devices 101 , 102 , 103 to interact with the server 105 through the network 104 to receive or send messages.
  • Various applications may be installed into the terminal devices 101 , 102 , 103 , such as various client applications, multi-party interactive applications, artificial intelligence applications, and the like.
  • the terminal devices 101 , 102 , 103 may be formed by hardware or software.
  • the terminal devices 101 , 102 , 103 are formed by hardware, they may be various electronic devices for supporting a document processing application, which include but are not limited to an intelligent terminal, a tablet computer, a laptop computer, a desktop computer, and the like.
  • the terminal devices 101 , 102 , and 103 are formed by software, they may be installed into the electronic devices listed above. They may be implemented, for example, as a plurality of software or software modules for providing distributed services, or as a single software or software module. It is not specifically limited herein.
  • the server 105 may be a server providing various services, such as a background server providing a support to the terminal devices 101 , 102 , 103 .
  • the background server may perform, for example, analyzing the received data such as request, and feeding the analyzed result back to the terminal devices.
  • the server may be formed by hardware or software. Where the server is formed by hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. Where the server is software, it may be implemented, for example, as a plurality of software or software modules for providing distributed services, or it may be implemented as a single software or software module. It is not specifically limited herein.
  • the method for determining the page theme provided in the embodiments of the present disclosure may be performed by the terminal devices 101 , 102 , 103 or the server 105 , and the apparatus for determining the page theme may also be provided in the terminal devices 101 , 102 , 103 or the server 105 .
  • terminal devices the number of terminal devices, networks and the number of servers in FIG. 1 are merely illustrative. There may be any number of terminal devices, networks, and servers as desired for implementation.
  • one solution is to write a plurality of sets of CSS style files, and the page theme is switched by switching different CSS style files.
  • a disadvantage of the solution is that there are too many redundant elements in different style files, and the files are large in size, so that the switching time is long and the switching experience is not smooth.
  • Another solution is to compile and build front-end page theme when the LESS operates.
  • a disadvantage of this scheme is that the compilation time is long, resulting in an unsmooth switching experience.
  • FIG. 2 there is illustrated a flow 200 of a method for determining a page theme in accordance with embodiments of the present disclosure.
  • the method for determining the page theme comprises the following steps.
  • the execution entity (for example, a terminal or a server illustrated in FIG. 1 ) of the method for determining the page theme may acquire the current operating environment of the target page.
  • the execution entity may acquire, from other electronic devices than the above-mentioned execution entity, a target theme matching the current operating environment.
  • the target page may refer to a page to be presented to a user.
  • the home page of a browser may be a target page when the browser is opened.
  • the search engine page When a search engine page is accessed from the first page of the browser, the search engine page may serve as the target page.
  • the result display page When a keyword is input for a query, the result display page may be the target page.
  • the current operating environment may be an automatically adaptive operating environment or the operating environments may be autonomously selected to be switched for the user, for example, the operating environment may be a dark mode, a daytime mode, a night mode, or the like.
  • the method for acquiring the current operating environment of the target page may be the conventional method or a technology to be developed in the future, which is not limited in the present disclosure.
  • the current operating environment of the target page may be implemented by programming in a JavaScript language, and the current operating environment of the target page may be implemented by crawling technology or by acquiring data in the target page by an applet having captured data.
  • an execution entity for example, a terminal or a server illustrated in FIG. 1
  • the method for determining the page theme may determine the target theme that matches the current operating environment.
  • the method for determining the target theme to be matched with the current operating environment may be the conventional method in the prior art or a future developed technology in the future, and this disclosure is not limited thereto.
  • a table is used to pre-store correspondences between the operating environments and the themes, in which each operating environment has a corresponding theme, for example, a dark mode corresponds to a theme of dark, a day mode corresponds to a day theme, and a night mode corresponds to a night theme.
  • the theme corresponding to the current operating environment may be found in the correspondence table as the target theme.
  • a model which outputs a corresponding theme according to an operating environment, may also be employed to predict the target theme that matches the current operating environment.
  • a style resource link refers to a link to a style resource.
  • the style resource includes a variable definition statement including a variable name and a variable value indicating the content of the variable name (i.e., a CSS variable value).
  • the execution entity for the method of determining the page theme may search for the target style resource link that matches the target theme, from the styles resource link database.
  • the style resource link database may be stored in other electronic devices outside the execution entity or in the locally execution entity.
  • the target style resource link may refer to a style resource link corresponding to the target theme.
  • the method, which the execution entity uses to search for the target style resource link matching the target theme may be the conventional method in the prior art or may be implemented with the future development technology, and this disclosure is not limited thereto.
  • a link name of a style resource link corresponding to a different theme and pre-stored in the style resource link database may include a theme name, and an execution entity may determine the style resource link of the target theme, which is included in the theme name of the link name, as a target style resource link matching the target theme.
  • the execution entity of the method for determining the page theme may load the CSS variable value in the target style resource link onto the target page, and further present the target theme on the target page.
  • the CSS variable value in the target style resource link may be loaded into the corresponding CSS variable, which corresponds to a style of the styles of the target page, which is changed at the time of switching the themes.
  • the style resource pointed to by the target style resource link includes a variable definition statement including a variable name and a variable value indicating the content of the variable name (i.e., a CSS variable value).
  • the CSS variable may include an attribute name and an attribute value, where the attribute value uses the function var () to invoke the variable name in the variable definition statement to obtain the variable value.
  • the attribute value in the CSS variable is changed according to the variable value.
  • the page style is changed accordingly, that is, the theme of the target page is switched to the target theme.
  • the CSS variable may be in the form of:
  • variable definition statement in the target style resource link may be in the form of:
  • “box” and “root” are the labels that indicate the category of the statement.
  • the variable value which defines the variable name “--textcolor” in the variable definition statement, is “red”, indicating that the text color is red.
  • “Color” is the attribute name and indicates that the CSS variable is used to indicate the color attribute in the page style.
  • “var (--textcolor) ” is an attribute value by invoking the function var () with the variable name “--textcolor” to obtain the variable value “red”. After loading the target style resource link onto the target page, the text color of the target page is displayed in red.
  • the style that is changed at the time of switching the themes may refer to such style, according to which an attribute in the page is changed during the page theme switching.
  • the background color is changed at the time of switching the themes
  • the background color may be used as a style that is changed at the time of switching the themes.
  • the font color may be used as the style changed at the time of switching the themes.
  • the style of the target page may comprise a style that is not changed at the time of switching the themes, for example, a font size of a text, a font name of a text, and the like, in addition to the style changed at the time of switching the themes.
  • the execution entity may acquire the current operating environment of the target page, determine a matched target theme according to the current operating environment, and then load a target style resource link matched with the target theme for purpose of switching the themes. It may present the theme adapted to the current operating environment to the user without providing theme switching instructions, thereby improving user experience.
  • the loaded target style resource link includes only the CSS variable value for indicating the style changed at the time of switching the themes from the style of the target page.
  • FIG. 3 there is illustrated a flow 300 of a method of determining a page theme in accordance with another embodiment of the present disclosure.
  • the method for determining a page theme includes the following steps.
  • the execution entity of the method for determining the page may acquire the current operating environment of the target page.
  • the execution entity may obtain the current operating environment of the target page from other electronic devices than the execution entity or locally.
  • the target page may refer to a page to be presented to the user.
  • the browser home page may be used as the target page when the browser is opened; after entering the search engine page from the first page of the browser, the search engine page may be used as a target page; after the keyword is input for query, the result display page may be a target page or the like.
  • the current operating environment may be an operating environment that is automatically adapted inside the terminal device or operating environments that may be autonomously selected to be switched by a user.
  • the operating environment may be a dark mode, a daytime mode, a night mode, or the like.
  • the method of acquiring the current operating environment of the target page may be the conventional method in the prior art or may be implemented with the future development technology, and this disclosure is not limited thereto.
  • the execution entity of the method for determining the page theme may determine the target theme that matches the current operating environment.
  • the method for determining the target theme to be matched with the current operating environment may be the conventional method in the prior art or may be implemented with the future development technology, and this disclosure is not limited thereto.
  • a style resource link refers to a link to a style resource.
  • the style resource includes a variable definition statement including a variable name and a variable value indicating the content of the variable name (i.e., a CSS variable value).
  • the execution entity of the method for determining the page theme may change the identification data for indicating the theme name stored in the body tag of the target page according to the target theme to obtain the target identification data. Then, the execution entity of the method for determining the page theme (for example, the terminal or server shown in FIG. 1 ) may search for the style resource link corresponding to the target identification data from the style resource link database, to obtain the target style resource link.
  • the style resource link database may be stored locally in other electronic devices outside the execution entity or in the execution entity.
  • the above-mentioned body tag is a tag in H5 page
  • the elements in the body tag define the main body of the document
  • the elements in the body tag contain all the contents of the document, such as text, hyperlinks, images, tables, lists, and the like.
  • the identification data for indicating the theme name stored in the body tag of the target page may be in the following forms.
  • the target theme may be determined as a theme of dark.
  • the target theme may be determined as a theme of light.
  • the process of obtaining the target identification data by changing the identification data for indicating the theme name stored in the body tag of the target page according to the target theme may be as follows:
  • the style resource link corresponding to the target data may be selected by the CSS selector based on the form of the key-value distributed storage system.
  • the corresponding style resource link “light.css” is selected by the CSS selector as the target style resource link:
  • Root means source for selection by the CSS selector.
  • --textcolor is the variable name, meaning text color.
  • #999 is the CSS variable value, pointing to a color according to a preset rule.
  • the corresponding style resource link “dark.css” is selected by the CSS selector as the target style resource link:
  • “Root” means source for selection by the CSS selector.
  • “--textcolor” is the variable name, meaning text color.
  • “rgba(0,0,0,0,8)” is the CSS variable value, pointing to a color according to a preset rule.
  • the current theme name is indicated by the identification data in the body tag, and the target style resource link corresponding to the target theme may be quickly acquired according to the identification data during searching.
  • the execution entity of the method for determining the page theme may load, on the target page, the CSS variable value in the target style resource link.
  • the CSS variable value in the target style resource link may be loaded into the corresponding CSS variable, which corresponds to a style in the style of the target page that is changed at the time of switching the themes.
  • the style resource pointed to by the target style resource link may include a variable definition statement including a variable name and a variable value indicating the content of the variable name (i.e., a CSS variable value).
  • the CSS variable may include an attribute name and an attribute value, where the attribute value uses the function var () to invoke the variable name in the variable definition statement to obtain the variable value.
  • the attribute value in the CSS variable is changed according to the variable value.
  • the page style is changed accordingly, that is, the theme of the target page is switched to the target theme.
  • step S 301 the operations of step S 301 , step S 302 , and step S 304 are substantially the same as those of step S 201 , step S 202 , and step S 204 . Details are not described herein.
  • the identification data indicating the theme name stored in the body tag of the target page may be monitored by MutationObserver or HttpSessionAttributeListener.
  • the executing entity of the method for determining the theme of the page may select and load the background picture corresponding to the target identification data.
  • the user may be provided with corresponding background pictures for selection and loading in advance for different themes, respectively, and the background pictures may be stored in a terminal or a server or the like.
  • the execution entity may select the background picture corresponding to the target identification data through the CSS selector for loading based on the form of the key-value distributed storage system.
  • body is a label for indicating a position
  • data-theme is theme name data
  • “dark” is assigned to the theme name data to represent the name of the theme, according to which it may determine that the target theme is a theme of dark
  • “i” indicates an element
  • “class” indicates a tag style class
  • “test-ico” indicates the name of a specific style class.
  • the presentation style of this element in the dark mode may be defined.
  • “background” is the style name of the background picture, and “url(‘light-icon.png’) no-repeat” indicates that the picture resource named light-icon.png is used as the background picture.
  • the background picture may be adaptively changed at the time of switching the themes, so that the intelligent degree of the theme switching is improved, and the diversified requirements of the user are met.
  • an execution entity may acquire the current operating environment of the target page, determine the matched target theme according to the current operating environment, and then load a target style resource link matched with the target theme for purpose of switching the themes. It may present the theme adapted to the current operating environment to the user without providing a theme switching instruction, thereby improving user experience.
  • the target style resource link loaded at the time of switching the themes includes only the CSS variable value for indicating the style changed at the time of switching the themes from the style of the target page.
  • the target style resource link may be quickly obtained.
  • the corresponding background picture may also be selected and loaded through the target identification data, so that the background picture may be replaced through the theme switching, the intelligent degree of the theme switching is improved, and more user's requirements are met.
  • the method for determining a page theme includes the steps of:
  • the execution entity of the method for determining the page theme may acquire the current operating environment of the target page.
  • the execution entity may acquire, from other electronic devices other than the execution entity, a target theme matching the current operating environment.
  • the target page may refer to a page to be presented to a user.
  • the browser home page may be a target page when the browser is opened.
  • the search engine page When entering the search engine page from the first page of the browser, the search engine page may serve as a target page.
  • the result display page When a keyword is input for a query, the result display page may be a target page.
  • the current operating environment may be an automatically adapted operating environment or an operating environment that may be autonomously selected to be switched for the user.
  • the operating environment may be a dark mode, a daytime mode, a night mode, or the like.
  • the method for acquiring the current operating environment of the target page may be the conventional method in the prior art or may be implemented with the future development technology, and this disclosure is not limited thereto.
  • an execution entity of a method for determining a page theme may determine a target theme that matches a current operating environment.
  • the execution entity may acquire, from other electronic devices than the execution entity, a target theme matching the current operating environment.
  • the method of determining the target theme to be matched with the current operating environment may be the conventional method in the prior art or may be implemented with the future development technology, and this disclosure is not limited thereto.
  • a style resource link refers to a link to a style resource.
  • the style resource includes a variable definition statement including a variable name and a variable value indicating the content of the variable name (i.e., a CSS variable value).
  • the execution entity of the method for determining the page theme such as the terminal or server shown in FIG. 1 , may search for the target style resource link matching the target theme from the style resource link database.
  • the style resource link database may be stored locally in other electronic devices outside the execution entity or in the execution entity.
  • the target style resource link may refer to a style resource link corresponding to the target theme.
  • the method of searching for the target style resource link matching the target theme may be the conventional method in the prior art or may be implemented with the future development technology, and this disclosure is not limited thereto.
  • the CSS variable value in the target style resource link is used to indicate, among the styles of the target page, a style that is changed at the time of switching the themes.
  • the execution entity of the method for determining the page theme may load the CSS variable value in the target style resource link onto the target page, and further present the target theme on the target page.
  • the CSS variable value in the target style resource link may be loaded into the corresponding CSS variable, which corresponds to a style in the styles of the target page, which is changed at the time of switching the themes.
  • the style resource pointed to by the target style resource link may include a variable definition statement including a variable name and a variable value indicating the content of the variable name (i.e., a CSS variable value).
  • the CSS variable may include an attribute name and an attribute value, where the attribute value uses the function var () to invoke the variable name in the variable definition statement to obtain the variable value.
  • the attribute value in the CSS variable is changed according to the variable value.
  • the page style is changed accordingly, that is, the theme of the target page is switched to the target theme.
  • step S 401 -S 404 is substantially the same as that of step S 201 -S 204 described above, and details are not described herein.
  • the execution entity may change the style resource in the style resource link in response to receiving a user's request for changing the style resource in the style resource link.
  • Changing the style resource in the style resource link may change the variable value in the variable definition statement.
  • “dark.css” is the name of the style resource link, indicating that the style resource link corresponds to the theme of dark. “Root” means source for selection by the CSS selector. “--Textcolor” is the variable name, meaning text color. “Rgba(0,0,0,0,8) and rgba(0,0,0,0,9)” are CSS variable values, each pointing to a color according to a predetermined rule.
  • the user may make change the style resources in the style resources link to meet the personalized needs of the user.
  • the execution entity may add the style resource in the style resource link in response to receiving the user's request for adding the style resource in the style resource link.
  • Adding a style resource in the style resource link may add a variable definition statement to the style resource link.
  • the style resource link may be added as follows:
  • “dark.css” is the name of the style resource link, indicating that the style resource link corresponds to the theme of dark. “Root” means source for selection by the CSS selector.
  • “--Textcolor” and “--bgcolor” are variable names, meaning text color and background color, respectively, “white” and “black” are CSS variable values, respectively, the variable definition statement “--textcolor:white” defines the text color as white, and the variable definition “--bgcolor: black” defines the background color as black.
  • the user may add the style resources in the style resources link to meet the personalized needs of the user.
  • the execution entity may delete the style resource in the style resource link in response to receiving a user's request for deleting the style resource in the style resource link.
  • Deleting a style resource in the style resource link may delete a variable definition statement in the style resource link.
  • the style resource link may be as follows:
  • “dark.css” is the name of the style resource link, indicating that the style resource link corresponds to the theme of dark.
  • “Root” means source for selection by the CSS selector.
  • “--Textcolor” and “--bgcolor” are variable names, meaning text color and background color, respectively.
  • “white” and “black” are CSS variable values, respectively.
  • the variable definition statement “--textcolorwhite” defines the text color as white, and the variable definition “--bgcolor: black” defines the background color as black.
  • the user may delete the style resources in the style resources link to meet the personalized requirements of the user.
  • an execution entity may acquire the current operating environment of the target page, determine a matched target theme according to the current operating environment, and then load a target style resource link matched with the target theme for purpose of switching the themes. It may present a theme adapted to the current operating environment to the user without giving a theme witching instruction, thereby improving user experience.
  • the target style resource link loaded at the time of switching the themes includes only the CSS variable value for indicating the style changed at the time of switching the themes from the style of the target page.
  • the CSS variable value When the CSS variable value is loaded, only a part of the style of the target page is changed, and the amount of the loaded data is significantly reduced compared with the CSS style table including all the style resources of the target page, thereby increasing the loading speed, reducing the time for switching theme, and further improving the switching speed and fluency.
  • the user may make changes, deletions, and/or additions to the style resources in the style resources link to meet the personalized needs of the user.
  • the apparatus 500 for determining a page theme includes an acquisition module 501 configured to acquire a current operating environment of a target page.
  • the determination module 502 is configured to determine a target theme that matches the current operating environment.
  • the searching module 503 is configured to search for a target style resource link matching the target theme from the style resource link database, where the style resource link database has a style resource link corresponding to a different theme pre-stored therein.
  • a first loading module 504 configured to load a CSS variable value in a target style resource link onto a target page to obtain the target theme.
  • the CSS variable value in the target style resource link is used to indicate, among the styles of the target page, a style that is changed at the time of switching the themes.
  • the current operating environment of a target page may be acquired, a matched target theme is determined according to the current operating environment, and then a target style resource link matched with the target theme is loaded for purpose of switching the themes, so that it may present a theme adapted to the current operating environment to the user without giving a theme switching instruction, thereby improving user experience.
  • the target style resource link loaded at the time of switching the themes includes only the CSS variable value for indicating the style changed at the time of switching the themes from the style of the target page.
  • the CSS variable value When the CSS variable value is loaded, only a part of the style of the target page changes, and the loading data amount is significantly reduced compared with the CSS style table including all the style resources of the target page, thereby increasing the loading speed, reducing the time for switching theme, and further improving the switching speed and fluency.
  • the means for determining the page theme further includes a first change module (not shown) configured to change the identification data indicating the theme name stored in the body tag of the target page according to the target theme to obtain the target identification data.
  • the searching module 503 is further configured to search for a style resource link corresponding to the target identification data to obtain a target style resource link.
  • the means for determining a page theme further comprises a detection module (not shown) configured to detect identification data stored in the body tag of the target page for indicating a theme name.
  • a second loading module (not shown) configured to select and load a background picture corresponding to the target identification data when the identification data indicating the theme name stored in the body tag of the target page is changed.
  • the means for determining the page theme also comprises a second change module (not shown) configured to change the style resource in the style resource link after receiving a user's request for changing the style resource in the style resource link.
  • the means for determining a page theme further comprises an adding module (not shown) configured to add a style resource in the style resource link after receiving a user's for adding a style resource in the style resource link.
  • a deleting module (not shown in the figure) configured to delete the style resource in the style resource link after receiving a user's request for deleting the style resource in the style resource link.
  • the present disclosure also provides an electronic device and a readable storage medium.
  • FIG. 6 is a block diagram of an electronic device of a method of determining a page theme according to embodiments of the present disclosure.
  • Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, worktables, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
  • Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
  • the components shown herein, their connections and relationships, and their functions are by way of example only and are not intended to limit the implementation of the present disclosure as described and/or claimed herein.
  • the electronic device includes one or more processors 601 , a memory 602 , and an interface for connecting components including a high speed interface and a low speed interface.
  • the various components are interconnected by different buses and may be mounted on a common motherboard or otherwise as desired.
  • the processor may process instructions executed within the electronic device, including instructions stored in or on a memory to display graphical information of the GUI on an external input/output apparatus, such as a display device coupled to an interface.
  • multiple processors and/or multiple buses may be used with multiple memories and multiple memories, if desired.
  • a processor 601 is exemplified in FIG. 6 .
  • the memory 602 is a non-transitory computer readable storage medium provided herein.
  • the memory stores instructions executable by at least one processor to cause the at least one processor to perform a method of determining a page theme provided herein.
  • the non-transitory computer readable storage medium of the present disclosure stores computer instructions for causing a computer to perform the method for determining a page theme provided herein.
  • the memory 602 may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules.
  • the processor 601 executes various functional applications and data processing of the server by operating non-transitory software programs, instructions, and modules stored in the memory 602 , that is, a method of determining a page theme in the above-described method embodiment.
  • the memory 602 may include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data or the like created according to the use of the electronic device that determines the page theme.
  • memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
  • memory 602 may optionally include remotely disposed memory relative to processor 601 , which may be connected via a network to an electronic device that determines a page theme. Examples of such networks include, but are not limited to, the interne, enterprise intranets, local area networks, mobile communication networks, and combinations thereof.
  • the electronic device for determining the page theme may further comprise input means 603 and output means 604 .
  • the processor 601 , the memory 602 , the input apparatus 603 , and the output apparatus 604 may be connected via a bus or otherwise, as illustrated in FIG. 6 .
  • the input apparatus 603 may receive input number or character information, and generate key signal input related to user settings and functional control of an electronic device that determines a page theme, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer bar, one or more mouse buttons, a trackball, a joystick, and the like.
  • the output apparatus 604 may include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), and the like.
  • the display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.
  • the various embodiments of the systems and techniques described herein may be implemented in digital electronic circuit systems, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that may execute and/or interpret on a programmable system including at least one programmable processor, which may be a dedicated or general purpose programmable processor, may receive data and instructions from a memory system, at least one input apparatus, and at least one output apparatus, and transmit the data and instructions to the memory system, the at least one input apparatus, and the at least one output apparatus.
  • a programmable processor which may be a dedicated or general purpose programmable processor, may receive data and instructions from a memory system, at least one input apparatus, and at least one output apparatus, and transmit the data and instructions to the memory system, the at least one input apparatus, and the at least one output apparatus.
  • These computing programs include machine instructions of a programmable processor and may be implemented in high-level procedures and/or object-oriented programming languages, and/or assembly/machine languages.
  • the terms“machine-readable medium”and “computer readable medium” refer to any computer program product, device, and/or device (e.g., magnetic disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as machine-readable signals.
  • machine readable signal refer to any signal used to provide machine instructions and/or data to a programmable processor.
  • the systems and techniques described herein may be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user may provide input to a computer.
  • a display device e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor
  • a keyboard and a pointing device e.g., a mouse or a trackball
  • Other types of devices may also be used to provide interaction with a user.
  • the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
  • the systems and techniques described herein may be implemented in a computing system including a background component (e.g., as a data server), or a computing system including a middleware component (e.g., an application server), or a computing system including a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user may interact with embodiments of the systems and techniques described herein), or a computing system including any combination of such background component, middleware component, or front-end component.
  • the components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
  • the computer system may include a client and a server.
  • the client and server are typically remote from each other and typically interact through a communication network.
  • the relationship between the client and the server is generated by a computer program operating on the corresponding computer and having a client-server relationship with each other.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)
  • Document Processing Apparatus (AREA)
US17/213,447 2020-09-10 2021-03-26 Method, apparatus, device and storage medium for determining page theme Granted US20230259691A9 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN202010947215.XA CN112099790B (zh) 2020-09-10 2020-09-10 确定页面主题的方法、装置、设备以及存储介质
CN202010947215 2020-09-10
CN202010947215.X 2020-09-10

Publications (2)

Publication Number Publication Date
US20210216701A1 US20210216701A1 (en) 2021-07-15
US20230259691A9 true US20230259691A9 (en) 2023-08-17

Family

ID=73752204

Family Applications (1)

Application Number Title Priority Date Filing Date
US17/213,447 Granted US20230259691A9 (en) 2020-09-10 2021-03-26 Method, apparatus, device and storage medium for determining page theme

Country Status (5)

Country Link
US (1) US20230259691A9 (ja)
EP (1) EP3822828A3 (ja)
JP (1) JP7366078B2 (ja)
KR (1) KR102585797B1 (ja)
CN (1) CN112099790B (ja)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783493A (zh) * 2021-01-29 2021-05-11 北京百度网讯科技有限公司 用于界面主题的样式配置方法、装置、电子设备及介质
CN112800372B (zh) * 2021-02-03 2023-06-13 网易(杭州)网络有限公司 页面加载方法、装置和电子设备
CN113065083B (zh) * 2021-02-26 2023-10-31 北京达佳互联信息技术有限公司 一种页面处理方法、装置、电子设备及存储介质
CN113157374A (zh) * 2021-04-27 2021-07-23 北京有竹居网络技术有限公司 页面模式切换方法、装置、设备以及存储介质
CN113569171A (zh) * 2021-09-26 2021-10-29 上海观安信息技术股份有限公司 网页主题更换方法及装置、存储介质、计算机设备
CN114047846A (zh) * 2021-10-22 2022-02-15 北京鲸鲮信息系统技术有限公司 一种控件风格的控制方法及装置
CN113987318B (zh) * 2021-11-01 2024-03-12 盐城天眼察微科技有限公司 页面监控方法、装置、设备及计算机存储介质
CN114185629A (zh) * 2021-11-26 2022-03-15 北京达佳互联信息技术有限公司 一种页面展示方法、装置、电子设备和存储介质
CN114625459A (zh) * 2022-02-23 2022-06-14 浙江百应科技有限公司 一种页面主题风格切换的方法、系统、装置和介质
CN115150653B (zh) * 2022-06-25 2024-02-06 北京字跳网络技术有限公司 媒体内容的展示方法、装置、电子设备和存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7117429B2 (en) * 2002-06-12 2006-10-03 Oracle International Corporation Methods and systems for managing styles electronic documents
US7917860B2 (en) * 2005-03-03 2011-03-29 Microsoft Corporation Simple styling
JP4867246B2 (ja) * 2005-09-13 2012-02-01 富士ゼロックス株式会社 文書処理装置
US7908551B2 (en) * 2006-06-29 2011-03-15 Google Inc. Dynamically generating customized user interfaces
KR100850021B1 (ko) * 2006-12-27 2008-08-01 엔에이치엔(주) 웹문서 스타일 변경 시스템 및 방법
US9330077B2 (en) * 2009-11-18 2016-05-03 Google Inc. Dynamic image generation for customizable user interfaces
US9443014B2 (en) * 2011-03-30 2016-09-13 Google Inc. Custom web page themes
JP6322629B2 (ja) * 2013-06-04 2018-05-09 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America 情報表示方法およびプログラム
CN106569885A (zh) * 2016-10-13 2017-04-19 乐视控股(北京)有限公司 应用主题切换方法及装置
CN110968808B (zh) * 2018-09-29 2023-05-23 北京国双科技有限公司 一种实现网页主题更新的方法及装置
CN111104117A (zh) * 2019-12-17 2020-05-05 深圳前海环融联易信息科技服务有限公司 页面主题风格切换方法、装置、电子设备及计算机存储介质

Also Published As

Publication number Publication date
US20210216701A1 (en) 2021-07-15
KR102585797B1 (ko) 2023-10-10
EP3822828A2 (en) 2021-05-19
JP7366078B2 (ja) 2023-10-20
CN112099790A (zh) 2020-12-18
JP2022033689A (ja) 2022-03-02
KR20220033967A (ko) 2022-03-17
CN112099790B (zh) 2024-03-29
EP3822828A3 (en) 2021-10-06

Similar Documents

Publication Publication Date Title
US20230259691A9 (en) Method, apparatus, device and storage medium for determining page theme
US20190251143A1 (en) Web page rendering method and related device
WO2018095306A1 (zh) 应用程序页面处理方法、装置及存储介质
US9921665B2 (en) Input method editor application platform
US20220308900A1 (en) Method and apparatus of pre-rendering page, electronic device, and storage medium
KR102310648B1 (ko) 상황 정보 탐색 및 내비게이션 기법
US9940396B1 (en) Mining potential user actions from a web page
CN103034517A (zh) 浏览器控制工具加载方法和装置
US20150207854A1 (en) External application request
US9069829B2 (en) Data items manager
US11270669B2 (en) Rendering method and apparatus, electronic device and storage medium
EP3848824A1 (en) Landing page processing method, apparatus, device and medium
US20230004362A1 (en) Code execution and data processing pipeline
CN103034518A (zh) 加载浏览器控制工具的方法及浏览器
US11741002B2 (en) Test automation systems and methods using logical identifiers
WO2020004156A1 (ja) 表示制御装置、表示制御方法、および表示制御プログラム
US20190073428A1 (en) Method, system and terminal for performing search in a browser
CN112506854A (zh) 页面模板文件的存储和页面生成方法、装置、设备及介质
EP3889770B1 (en) Mini program material processing
CN112163143B (zh) 页面切换的方法、装置、设备以及存储介质
US20180059887A1 (en) Direct navigation to modal dialogs
CN113568608A (zh) 一种组件信息的展示方法、装置、设备及存储介质
CN113157722A (zh) 一种数据处理方法、装置、服务器、系统及存储介质
US20150277723A1 (en) Exporting a component of a currently displayed user interface to a development system
CN111931111A (zh) 一种网页开发方法、网页展示方法、装置及设备

Legal Events

Date Code Title Description
AS Assignment

Owner name: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD., CHINA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:QU, DA;REEL/FRAME:055746/0011

Effective date: 20201120

FEPP Fee payment procedure

Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: FINAL REJECTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE AFTER FINAL ACTION FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: ADVISORY ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

STPP Information on status: patent application and granting procedure in general

Free format text: AWAITING TC RESP, ISSUE FEE PAYMENT VERIFIED

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STPP Information on status: patent application and granting procedure in general

Free format text: AWAITING TC RESP, ISSUE FEE PAYMENT VERIFIED

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED