CN111580873B - Page updating method and device, terminal and storage medium - Google Patents

Page updating method and device, terminal and storage medium Download PDF

Info

Publication number
CN111580873B
CN111580873B CN202010250617.4A CN202010250617A CN111580873B CN 111580873 B CN111580873 B CN 111580873B CN 202010250617 A CN202010250617 A CN 202010250617A CN 111580873 B CN111580873 B CN 111580873B
Authority
CN
China
Prior art keywords
layout
page
updated
file
page layout
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.)
Active
Application number
CN202010250617.4A
Other languages
Chinese (zh)
Other versions
CN111580873A (en
Inventor
张宇飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Pinecone Electronic Co Ltd
Original Assignee
Beijing Xiaomi Pinecone Electronic 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 Xiaomi Pinecone Electronic Co Ltd filed Critical Beijing Xiaomi Pinecone Electronic Co Ltd
Priority to CN202010250617.4A priority Critical patent/CN111580873B/en
Publication of CN111580873A publication Critical patent/CN111580873A/en
Application granted granted Critical
Publication of CN111580873B publication Critical patent/CN111580873B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a page updating method and device, a terminal and a storage medium. The method comprises the following steps: when an application is started, receiving a configuration file of a page to be updated issued by a server, wherein the configuration file comprises a first corresponding relation between a first identifier of a layout label to be updated and a second identifier of the layout of the page to be updated; searching the layout label to be updated stored in the application corresponding to the first identifier and the page layout to be updated corresponding to the second identifier according to the configuration file; when a page layout file is loaded, determining whether a layout tag contained in the page layout file belongs to the layout tag to be updated; and when the layout label contained in the page layout file belongs to the layout label to be updated, updating the page layout to be displayed in the page layout file into the page layout to be updated. By the method, time consumption of page updating can be reduced, and performance is improved.

Description

Page updating method and device, terminal and storage medium
Technical Field
The disclosure relates to the field of electronic technology, and in particular, to a page updating method and device, a terminal and a storage medium.
Background
Mobile internet has been developed for more than ten years, the business functions of many enterprises have been relatively stable, and a platform is formed, so that the whole center of gravity starts to deviate from operation, and the changing operation activity demands put higher demands on client architecture and release mode. The modification of the mobile terminal generally needs to undergo lengthy processes such as development, online, auditing, full delivery, etc., and the update mode cannot respond to the requirement rapidly.
The current popularity of dynamic update schemes such as the 5 th edition of hypertext markup language (Hypertext Markup Language, HTML5) and open-source cross-platform mobile application development framework (real Native) is also to cope with the current requirement of rapid iteration, but the current schemes cannot respond to the requirement rapidly.
Disclosure of Invention
The disclosure provides a page updating method and device, a terminal and a storage medium.
According to a first aspect of an embodiment of the present disclosure, there is provided a page update method, applied to a terminal, the method including:
when an application is started, receiving a configuration file of a page to be updated issued by a server, wherein the configuration file comprises a first corresponding relation between a first identifier of a layout label to be updated and a second identifier of the layout of the page to be updated;
searching the layout label to be updated stored in the application corresponding to the first identifier and the page layout to be updated corresponding to the second identifier according to the configuration file;
when a page layout file is loaded, determining whether a layout tag contained in the page layout file belongs to the layout tag to be updated;
and when the layout label contained in the page layout file belongs to the layout label to be updated, updating the page layout to be displayed in the page layout file into the page layout to be updated.
In one embodiment, the determining whether the layout tag included in the page layout file belongs to the layout tag to be updated includes:
traversing the layout labels in the page layout file through a first type loader, and determining whether the traversed layout labels belong to the layout labels to be updated, wherein the function of the first type loader is different from that of a second type loader contained in an operating system supporting the running of the application.
In one embodiment, the method further comprises:
and if the active component contained in the application is started, loading the page layout file through the first type loader.
In one embodiment, the method further comprises:
and calling an activity function through the content providing component of the application, and starting the activity component.
In one embodiment, the method further comprises:
when the application is started, receiving page data issued by a server; the identification of the page data and the second identification of the page layout to be updated in the configuration file have a second corresponding relation;
loading page data corresponding to the page layout to be updated into the page layout to be updated according to the second corresponding relation;
and displaying the page layout to be updated loaded with the page data.
In one embodiment, when the application is started, the receiving the configuration file of the page to be updated issued by the server includes:
when the application is started, sending a page layout update request to the server;
and receiving the configuration file issued by the server in response to the page layout update request.
According to a second aspect of an embodiment of the present disclosure, there is provided a page updating apparatus, applied to a terminal, the apparatus including:
the first receiving module is configured to receive a configuration file of a page to be updated issued by the server when the application is started, wherein the configuration file comprises a first corresponding relation between a first identifier of a layout label to be updated and a second identifier of the layout of the page to be updated;
the searching module is configured to search the layout label to be updated stored in the application corresponding to the first identifier and the page layout to be updated corresponding to the second identifier according to the configuration file;
the first determining module is configured to determine whether a layout tag contained in a page layout file belongs to the layout tag to be updated when the page layout file is loaded;
and the updating module is configured to update the page layout to be displayed in the page layout file into the page layout to be updated when the layout tag contained in the page layout file belongs to the layout tag to be updated.
In one embodiment, the first determining module is specifically configured to traverse the layout tag in the page layout file by a first type loader, and determine whether the traversed layout tag belongs to the layout tag to be updated, where a function of the first type loader is different from a function of a second type loader included in an operating system supporting the application running.
In one embodiment, the apparatus further comprises:
and the second determining module is configured to load the page layout file through the first type loader if the active component contained in the application is started.
In one embodiment, the apparatus further comprises:
and the third determining module is configured to call an activity function through the content providing component of the application and start the activity component.
In one embodiment, the apparatus further comprises:
the second receiving module is configured to receive page data issued by the server when the application is started; the identification of the page data and the second identification of the page layout to be updated in the configuration file have a second corresponding relation;
the loading module is configured to load the page data corresponding to the page layout to be updated into the page layout to be updated according to the second corresponding relation;
and the display module is configured to display the page layout to be updated loaded with the page data.
In one embodiment, the first receiving module is configured to send a page layout update request to the server when the application is started; and receiving the configuration file issued by the server in response to the page layout update request.
According to a third aspect of embodiments of the present disclosure, there is provided a terminal comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the page update method as described in the first aspect above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium comprising:
the instructions in the storage medium, when executed by the processor of the terminal, enable the terminal to perform the page update method as described in the first aspect above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in an embodiment of the present disclosure, a correspondence between a layout tag to be updated and a page layout to be updated is identified through a configuration file, and when the page layout file is loaded, the layout tag and the corresponding page layout to be displayed are not directly loaded and then displayed, but it is determined whether the layout tag contained in the page layout file belongs to the layout tag to be updated. When the layout label is determined to belong to the layout label to be updated stored in the application, the page layout to be updated is used for replacing the page layout to be displayed according to the corresponding relation, so that the page layout is updated. According to the embodiment of the invention, the page update can be realized by the corresponding relation in the configuration file and when the comparison determines that the loaded page layout file contains the layout label to be updated, so that the time consumption of the page update can be reduced, and the performance is improved. In addition, by means of the configuration file, the application developer can update the configuration file into a required page form at any time, and the use experience of a user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is an architecture diagram of an android system shown in an embodiment of the present disclosure.
Fig. 2 is a flowchart of a page update method according to an embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating an exemplary page update method according to an embodiment of the present disclosure.
Fig. 4 is a diagram illustrating a page updating apparatus according to an exemplary embodiment.
Fig. 5 is a block diagram of a terminal shown in an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The operating system of the mobile terminal comprises an android operating system, an apple operating system and the like. In an embodiment of the present disclosure, taking an android system as an example, fig. 1 is a schematic diagram of an android system in an embodiment of the present disclosure, as shown in fig. 1, an architecture of the android system may be divided into four layers, including: the system comprises a linux kernel layer, a system operation library layer, an application framework layer and an application layer, wherein the functions of the layers are as follows:
linux kernel layer: the method provides a bottom layer of drive for various hardware of the Android device, such as display, audio, camera, bluetooth, power management and the like;
system runtime layer: comprising two parts, one is a system library and the other is a runtime library. The system library is a support of an application framework, is an important link connecting an application framework layer and a linux kernel layer, and all components in the system library are in use of a c/c++ library, so that main characteristic support is provided, for example, SQLite provides support for data, openGL|ES libraries provide support for three-dimensional drawing, and runtime libraries provide core libraries capable of allowing developers to write Android applications by using JAVA language.
Application framework layer: this layer mainly provides various application programming interfaces (Application Programming Interface, APIs) that may be used when building applications, and some core applications that Android is built with use of these APIs. The Android application framework provides a series of class libraries required by developing the Android application program and adopts a reuse mechanism, so that a developer can rapidly develop the application program, and personalized expansion can be conveniently and efficiently realized by using components of the Android platform or various application program components of the inheritance platform.
Application layer: including one or more user-oriented applications, such as, but not limited to: applications carried by the mobile phone or applications downloaded by the user, etc.
The page updating method in the embodiment of the disclosure relates to an application framework layer of an android system.
Fig. 2 is a flowchart of a page update method according to an embodiment of the present disclosure, and as shown in fig. 2, the page update method applied to a terminal includes the following steps:
s11, when the application is started, receiving a configuration file of a page to be updated, which is issued by the server, wherein the configuration file comprises a first corresponding relation between a first identifier of a layout label to be updated and a second identifier of the layout of the page to be updated.
S12, searching a layout label to be updated stored in the application corresponding to the first identifier and a page layout to be updated corresponding to the second identifier according to the configuration file.
S13, when the page layout file is loaded, determining whether the layout tag contained in the page layout file belongs to the layout tag to be updated.
S14, when the layout label contained in the page layout file belongs to the layout label to be updated, updating the page layout to be displayed in the page layout file into the page layout to be updated.
In an embodiment of the present disclosure, a terminal device includes: a mobile device and a stationary device; the mobile device includes: a cell phone, a tablet computer or a wearable device, etc. The stationary device includes, but is not limited to, a personal computer (Personal Computer, PC).
The terminal may communicate with the server, for example, by way of cellular Wireless networking based on cellular mobile communication technology, or by way of Wireless-Fidelity (Wi-Fi) based communication with the server. The terminal adopts an android operating system, and realizes page updating through an Activity (Activity) component supported by application development of the android operating system.
In step S11, when the application is started, the terminal receives a configuration file of a page to be updated issued by the server. The configuration file is defined by a developer of the application, and when the developer wants to update a page in the application, the server issues the configuration file to inform the terminal of updating according to the configuration file.
The configuration file comprises a first corresponding relation between a first identifier of the page layout label to be updated and a second identifier of the page layout to be updated.
In the embodiment of the present disclosure, the page layout tab to be updated and the page layout to be updated are class (class) files in the android operating system, for example, the application is a Java application, and the class files may include: java class files. The layout label to be updated is a layout label for identifying that the layout can be changed, and the layout label to be updated can be a page label for representing supporting page updating or a control label supporting updating in a page. The page layout to be updated is a layout form corresponding to the layout label to be updated, for example, a list form, an edit box form, a text box form, or the like. The page layout to be updated is based on a View (View) class, and the construction method is rewritten (for example, by a method such as a ListView) to realize a customized page layout form. When the page layout to be updated is application development, the page layout to be updated is packaged into class files in an android application package (Android application package, APK), and can also be class files issued by a server.
However, it should be noted that, if the page layout to be updated is issued by the server, the application in the android system may be loaded by using an external class loader (e.g. dexclassloader), so that the page layout to be updated may be flexibly changed. However, when the page layout is issued by the server, if the version of the application is changed, the path configuration for loading the page layout to be updated may be changed, so that the problem of jump adaptation may exist.
The first identifier of the page layout tag to be updated in the configuration file may be a file name of the page layout tag to be updated, and the second identifier of the page layout to be updated may be a file name of the page layout to be updated.
It should be noted that, in the embodiment of the present disclosure, the first identifier and the second identifier are not limited to file names, but may be other identifier information, for example, when the page layout label to be updated and the storage path of the page layout to be updated are fixed, and may also be path identifier information.
The application in the terminal can receive the configuration file issued by the server, and the configuration file can be issued based on the request of the application, or can be actively issued to the application in the terminal when the server detects that a new configuration file exists.
In one embodiment, step S11 includes:
when an application is started, sending a page layout update request to a server;
and receiving a configuration file issued by the server in response to the page layout update request.
In this embodiment, if the page layout to be updated is also issued by the server, the page layout to be updated may also be issued based on the page layout update request sent by the application.
In step S12, the application in the terminal searches for a layout label to be updated corresponding to the first identifier and a page layout to be updated corresponding to the second identifier according to the configuration file. Based on the correspondence between the first identifier and the second identifier in step S11, the layout label to be updated stored in the application also has a correspondence with the layout of the page to be updated.
For example, mapping < key, value > (map < key, value >) is used to represent the correspondence between the layout label to be updated and the page layout to be updated, the key is the layout label to be updated, and the value is the page layout to be updated.
In step S13, when the application in the terminal loads the page layout file, it is determined whether the layout tag included in the page layout file belongs to the layout tag to be updated. The page layout file may be a file based on an extensible markup language (Extensible Markup Language, xml) format, in which different layout tags are identified by field names, under which the contents of the page layout are to be displayed.
It should be noted that, after the page layout file is loaded, the application in the terminal will analyze the layout tag in the page layout file and the page layout tool to be displayed into class files, so that the class file of one layout tag corresponds to the class file of one page layout to be displayed.
In one embodiment, an application in a terminal determines whether a layout tag contained in a page layout file belongs to a layout tag to be updated, including:
traversing the layout labels in the page layout file by a first type loader and determining whether the traversed layout labels belong to the layout labels to be updated, wherein the function of the first type loader is different from that of a second type loader contained in an operating system supporting the running of the application.
In this embodiment, the first type of loader is a newly added type of loader, the first type of loader having a different function than the second type of loader in the operating system supporting the running of the application. In general, in an application of the android system, one page corresponds to an active page, and when the application loads a certain page, for example, a class file of a layout tag is loaded through a class loader getClassLoader in an active component, and the corresponding class file of a page layout to be displayed is used for subsequent page display. The class loader getClassLoader in the movable component is a second class loader preset in an operating system supporting the running of the application. In the embodiment of the disclosure, the newly added first class loader is a recorder customized by a developer, and the first class loader not only loads the layout tag and the page layout to be displayed, but also traverses the class file of the layout tag and determines whether the traversed layout tag belongs to the layout tag to be updated.
Illustratively, the class file of the layout tag is traversed by a first class loader and it is determined whether the class file of the layout tag currently traversed belongs to a key in the map.
In one embodiment, if an active component included in the application is launched, the page layout file is loaded by the first class loader.
As previously described, a page corresponds to an active page, and the active component is started, and determines to load the page layout file. The active component may be an Activity component supported by the android system, the Activity component includes the getClassLoader described above, and the present disclosure does not use a getClassLoader method included in the Activity component, but loads a first type loader, and determines whether the traversed layout tag belongs to a layout tag to be updated through the first type loader, where in the case of belonging to the layout tag to be updated, the application may load the layout of the page to be updated according to the layout tag to be updated to update. It should be noted that, in the embodiment of the present disclosure, after the active component is started, the first class loader is preferentially loaded.
In one embodiment, the active component is launched by the content providing component of the application invoking the active function.
In the embodiment of the disclosure, after an application is started, an intention (Intent) is generated inside the application, the Intent is responsible for describing actions of one operation in the application, data related to the actions and additional data, and the android application is responsible for finding out a corresponding component according to the description of the Intent, transmitting the Intent to the invoked component, and completing the invocation of the component. In an embodiment of the present disclosure, the content includes information of an active page to be started, and the content providing component is the content.
Illustratively, when an application starts a startactyactyForResult () function based on an intent, since the intent indicates an active page, then the Activity component is started, and the active page is started by a first class loader custom in the Activity component.
In S14 of the embodiment of the present disclosure, when the layout tag included in the page layout file belongs to the layout tag to be updated, the page layout to be updated is used to replace the page layout to be displayed in the page layout file.
In this embodiment, the layout form of the page is changed by replacing the page layout to be displayed in the page layout file with the page layout to be updated.
For example, when a certain area in the page is identified by a layout tag, and when it is determined that the page layout tag in the page layout file belongs to a key in the map, a value corresponding to the key is used to replace the layout form that the area originally needs to display. For example, the page layout to be displayed, i.e. the page layout form to be displayed originally, is in list form, and the page layout value to be updated is in text box form, then the area in the page will be presented in text box form.
When the HTML5 scheme is adopted for page updating, the client needs to load a web view (webview) container, and the initialization of the webview container loading takes a long time, so that a white screen phenomenon is often seen on the client. In addition, in the HTML5 scheme, the webpage (web) usually needs to rely on JavaScript (JS for short), and the execution efficiency of JS is far less than that of android native code, so that the performance of HTML5 is insufficient, and the user experience cannot be satisfied.
The RN solution is different from HTML5 in that it does not use webview, but uses javascript core to bridge, converts the dynamically changeable language JS into a native User Interface (UI) through bridging, and then uses the android system to implement Interface display for the rendering technology of the native UI. Based on the RN scheme, the RN issues a new bundle package file each time, and the updated JS codes are contained in the bundle package file, so that the Javascript core can convert the updated JS codes into a native UI, and rendering is completed by a rendering mechanism which delivers the updated JS codes to the native UI in the later period. However, in the RN-based scheme, the process of converting the dynamic language JS into the native UI is complicated and takes a long time. In addition, because the RN is an open-source cross-platform mobile application development framework, there is also an adaptation problem when the android operating system or the apple operating system is applied.
Compared with the two schemes, the method and the device for updating the page layout label identify the corresponding relation between the page layout label to be updated and the page layout to be updated through the configuration file, and when the page layout file is loaded, the page layout label and the corresponding page layout to be displayed are not directly loaded and then displayed, but whether the layout label contained in the page layout file belongs to the layout label to be updated is determined. When the layout label is determined to belong to the layout label to be updated stored in the application, the page layout to be updated is used for replacing the page layout to be displayed according to the corresponding relation, so that the page layout is updated. The code for realizing the process is a machine instruction code which can directly enable an operating system supporting the running of the application to execute, namely belongs to the native code, and does not need to be converted through the code, so that the time consumption of page updating can be reduced, and the performance is improved. In addition, by means of the configuration file, the application developer can update the configuration file into a required page form at any time, and the use experience of a user is improved.
In one embodiment, the page update method further includes:
when an application is started, receiving page data issued by a server; the identification of the page data and the second identification of the page layout to be updated in the configuration file have a second corresponding relation;
loading page data corresponding to the page layout to be updated into the page layout to be updated according to the second corresponding relation;
and displaying the page layout to be updated of the loaded page data.
In this embodiment, when the application is started, page data issued by the server is also received, and the page data refers to content filled into the page layout to be updated. For example, when the page layout to be updated is in the form of a text box, the page data is the text content to be filled, and when the page layout to be updated is in the form of a list, the page data is the content to be displayed in the list.
It should be noted that, in the embodiment of the present disclosure, the identifier of the page data and the second identifier of the page layout to be updated in the configuration file have a second corresponding relationship, which includes: the identity of the page data is the same as the second identity of the page layout to be updated. And loading page data corresponding to the page layout to be updated according to the second corresponding relation by the application. Based on the loaded page data corresponding to the page layout to be updated, the page layout to be updated of the loaded page data is displayed, and then the page is updated.
It can be understood that, the present disclosure identifies, through a configuration file, a correspondence between a layout tag to be updated and a page layout to be updated, and when loading the page layout file, the layout tag and the corresponding page layout to be displayed are not directly loaded and then displayed, but rather it is determined whether the layout tag included in the page layout file belongs to the layout tag to be updated. When the layout label is determined to belong to the layout label to be updated stored in the application, the page layout to be updated is used for replacing the page layout to be displayed according to the corresponding relation, so that the page layout is updated. According to the embodiment of the invention, the page update can be realized by the corresponding relation in the configuration file and when the comparison determines that the loaded page layout file contains the layout label to be updated, so that the time consumption of the page update can be reduced, and the performance is improved. In addition, by means of the configuration file, the application developer can update the configuration file into a required page form at any time, and the use experience of a user is improved.
Fig. 3 is an exemplary diagram of a page update method in an android system according to an embodiment of the disclosure, where, as shown in fig. 3, the page update method includes the following steps:
s21, starting the application, and sending a page layout update request to the server.
S22, the server sends the configuration file and the page data according to the page layout update request.
In this embodiment, the configuration file includes a first correspondence between the file name of the layout tab to be updated and the file name of the page layout to be updated.
S23, searching a layout label to be updated and a page layout to be updated according to the configuration file by the application.
In this embodiment, the application searches for a class file of the layout tag to be updated according to the file name of the layout tag to be updated in the configuration file, and searches for a class file of the file name of the page layout to be updated according to the file name of the page layout to be updated. The class file of the layout label to be updated and the class file of the file name of the page layout to be updated have a mapping relation.
S24, when the active component in the application is started, loading the page layout file through a custom class loader and traversing the layout label class in the layout file.
It should be noted that, in this embodiment, the layout tag to be updated is pre-embedded in the page layout file. Custom class loaders, i.e., the first class loader of the embodiments of the present disclosure.
S25, if the layout label traversed to the page layout file belongs to the layout label to be updated, using the page layout to be updated, and loading and displaying the interface data to the page layout to be updated.
It can be understood that in this embodiment, the page update can be implemented by the corresponding relationship in the configuration file and when the comparison determines that the loaded page layout file includes the layout label to be updated, so that the time consumption of the page update can be reduced and the performance can be improved. In addition, by means of the configuration file, the application developer can update the configuration file into a required page form at any time, and the use experience of a user is improved.
Fig. 4 is a diagram illustrating a page updating apparatus according to an exemplary embodiment. Referring to fig. 4, the page updating apparatus includes:
the first receiving module 121 is configured to receive a configuration file of a page to be updated issued by the server when the application is started, where the configuration file includes a first correspondence between a first identifier of a layout label to be updated and a second identifier of a layout of the page to be updated;
the searching module 122 is configured to search the layout label to be updated stored in the application corresponding to the first identifier and the page layout to be updated corresponding to the second identifier according to the configuration file;
a first determining module 123 configured to determine, when a page layout file is loaded, whether a layout tag contained in the page layout file belongs to the layout tag to be updated;
and the updating module 124 is configured to update the page layout to be displayed in the page layout file to the page layout to be updated when the layout tag contained in the page layout file belongs to the layout tag to be updated.
In one embodiment, the first determining module 123 is specifically configured to traverse the layout tag in the page layout file by a first type loader, and determine whether the traversed layout tag belongs to the layout tag to be updated, where the first type loader has a function different from a second type loader included in an operating system supporting the application running.
In one embodiment, the apparatus further comprises:
and the second determining module is configured to load the page layout file through the first type loader if the active component contained in the application is started.
In one embodiment, the apparatus further comprises:
and the third determining module is configured to call an activity function through the content providing component of the application and start the activity component.
In one embodiment, the apparatus further comprises:
the second receiving module is configured to receive page data issued by the server when the application is started; the identification of the page data and the second identification of the page layout to be updated in the configuration file have a second corresponding relation;
the loading module is configured to load the page data corresponding to the page layout to be updated into the page layout to be updated according to the second corresponding relation;
and the display module is configured to display the page layout to be updated loaded with the page data.
In one embodiment, the first receiving module 121 is configured to send a page layout update request to the server when the application is started; and receiving the configuration file issued by the server in response to the page layout update request.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 5 is a block diagram of a terminal device 800 according to an exemplary embodiment. For example, the device 800 may be a smart phone, a computer, or the like.
Referring to fig. 5, apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the apparatus 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phonebook data, messages, pictures, videos, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk.
The power supply component 806 provides power to the various components of the device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen between the device 800 and the user that provides an output interface. 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 a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 800 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of the apparatus 800. For example, the sensor assembly 814 may detect an on/off state of the device 800, a relative positioning of the components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, an orientation or acceleration/deceleration of the device 800, and a change in temperature of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 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 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communication between the apparatus 800 and other devices, either in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as Wi-Fi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 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 elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 804 including instructions executable by processor 820 of apparatus 800 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of a mobile terminal, enables the terminal to perform a page update method, the method comprising:
when an application is started, receiving a configuration file of a page to be updated issued by a server, wherein the configuration file comprises a first corresponding relation between a first identifier of a layout label to be updated and a second identifier of the layout of the page to be updated;
searching the layout label to be updated stored in the application corresponding to the first identifier and the page layout to be updated corresponding to the second identifier according to the configuration file;
when a page layout file is loaded, determining whether a layout tag contained in the page layout file belongs to the layout tag to be updated;
and when the layout label contained in the page layout file belongs to the layout label to be updated, updating the page layout to be displayed in the page layout file into the page layout to be updated.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. The page updating method is characterized by being applied to a terminal, and comprises the following steps:
when an application is started, receiving a configuration file of a page to be updated issued by a server, wherein the configuration file comprises a first corresponding relation between a first identifier of a layout label to be updated and a second identifier of the layout of the page to be updated;
searching the layout label to be updated stored in the application corresponding to the first identifier and the page layout to be updated corresponding to the second identifier according to the configuration file;
when a page layout file is loaded, determining whether a layout tag contained in the page layout file belongs to the layout tag to be updated;
and when the layout label contained in the page layout file belongs to the layout label to be updated, updating the page layout to be displayed in the page layout file into the page layout to be updated.
2. The method of claim 1, wherein the determining whether the layout tag contained in the page layout file belongs to the layout tag to be updated comprises:
traversing the layout labels in the page layout file through a first type loader, and determining whether the traversed layout labels belong to the layout labels to be updated, wherein the function of the first type loader is different from that of a second type loader contained in an operating system supporting the running of the application.
3. The method according to claim 2, wherein the method further comprises:
and if the active component contained in the application is started, loading the page layout file through the first type loader.
4. A method according to claim 3, characterized in that the method further comprises:
and calling an activity function through the content providing component of the application, and starting the activity component.
5. The method according to claim 1, wherein the method further comprises:
when the application is started, receiving page data issued by a server; the identification of the page data and the second identification of the page layout to be updated in the configuration file have a second corresponding relation;
loading page data corresponding to the page layout to be updated into the page layout to be updated according to the second corresponding relation;
and displaying the page layout to be updated loaded with the page data.
6. The method according to claim 1, wherein the receiving the configuration file of the page to be updated issued by the server when the application is started comprises:
when the application is started, sending a page layout update request to the server;
and receiving the configuration file issued by the server in response to the page layout update request.
7. A page updating apparatus, characterized in that it is applied in a terminal, the apparatus comprising:
the first receiving module is configured to receive a configuration file of a page to be updated issued by the server when the application is started, wherein the configuration file comprises a first corresponding relation between a first identifier of a layout label to be updated and a second identifier of the layout of the page to be updated;
the searching module is configured to search the layout label to be updated stored in the application corresponding to the first identifier and the page layout to be updated corresponding to the second identifier according to the configuration file;
the first determining module is configured to determine whether a layout tag contained in a page layout file belongs to the layout tag to be updated when the page layout file is loaded;
and the updating module is configured to update the page layout to be displayed in the page layout file into the page layout to be updated when the layout tag contained in the page layout file belongs to the layout tag to be updated.
8. The apparatus of claim 7, wherein the device comprises a plurality of sensors,
the first determining module is specifically configured to traverse the layout tag in the page layout file through a first type loader, and determine whether the traversed layout tag belongs to the layout tag to be updated, wherein the function of the first type loader is different from that of a second type loader contained in an operating system supporting the application running.
9. The apparatus of claim 8, wherein the apparatus further comprises:
and the second determining module is configured to load the page layout file through the first type loader if the active component contained in the application is started.
10. The apparatus of claim 9, wherein the apparatus further comprises:
and the third determining module is configured to call an activity function through the content providing component of the application and start the activity component.
11. The apparatus of claim 7, wherein the apparatus further comprises:
the second receiving module is configured to receive page data issued by the server when the application is started; the identification of the page data and the second identification of the page layout to be updated in the configuration file have a second corresponding relation;
the loading module is configured to load the page data corresponding to the page layout to be updated into the page layout to be updated according to the second corresponding relation;
and the display module is configured to display the page layout to be updated loaded with the page data.
12. The apparatus of claim 7, wherein the device comprises a plurality of sensors,
the first receiving module is configured to send a page layout update request to the server when the application is started; and receiving the configuration file issued by the server in response to the page layout update request.
13. A terminal, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the page update method of any one of claims 1 to 6.
14. A non-transitory computer readable storage medium, which when executed by a processor of a terminal, causes the terminal to perform the page update method of any of claims 1 to 6.
CN202010250617.4A 2020-04-01 2020-04-01 Page updating method and device, terminal and storage medium Active CN111580873B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010250617.4A CN111580873B (en) 2020-04-01 2020-04-01 Page updating method and device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010250617.4A CN111580873B (en) 2020-04-01 2020-04-01 Page updating method and device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111580873A CN111580873A (en) 2020-08-25
CN111580873B true CN111580873B (en) 2023-11-07

Family

ID=72115098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010250617.4A Active CN111580873B (en) 2020-04-01 2020-04-01 Page updating method and device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111580873B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667939A (en) * 2021-01-04 2021-04-16 天津中新智冠信息技术有限公司 Webpage refreshing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9268562B1 (en) * 2015-01-21 2016-02-23 PredictSpring, Inc. Methods and apparatuses for dynamically generating mobile application layouts using client-independent configuration
CN105893075A (en) * 2015-12-28 2016-08-24 乐视网信息技术(北京)股份有限公司 Update method and device of application
CN106155708A (en) * 2015-03-24 2016-11-23 Tcl集团股份有限公司 A kind of dynamic load and the method and system of renewal content of pages
CN106293765A (en) * 2016-08-23 2017-01-04 乐视控股(北京)有限公司 A kind of layout updates method and device
CN108399072A (en) * 2017-02-06 2018-08-14 腾讯科技(深圳)有限公司 Five application page update method and device
CN110704143A (en) * 2019-08-14 2020-01-17 中国平安财产保险股份有限公司 Page generation method and device
CN110806873A (en) * 2019-10-31 2020-02-18 拉扎斯网络科技(上海)有限公司 Target control determining method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8606892B2 (en) * 2011-11-28 2013-12-10 Wyse Technology Inc. Deployment and updating of applications and drivers on a client device using an extensible markup language (XML) configuration file
US20180260481A1 (en) * 2018-04-01 2018-09-13 Yogesh Rathod Displaying search result associated identified or extracted unique identity associated structured contents or structured website

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9268562B1 (en) * 2015-01-21 2016-02-23 PredictSpring, Inc. Methods and apparatuses for dynamically generating mobile application layouts using client-independent configuration
CN106155708A (en) * 2015-03-24 2016-11-23 Tcl集团股份有限公司 A kind of dynamic load and the method and system of renewal content of pages
CN105893075A (en) * 2015-12-28 2016-08-24 乐视网信息技术(北京)股份有限公司 Update method and device of application
CN106293765A (en) * 2016-08-23 2017-01-04 乐视控股(北京)有限公司 A kind of layout updates method and device
CN108399072A (en) * 2017-02-06 2018-08-14 腾讯科技(深圳)有限公司 Five application page update method and device
CN110704143A (en) * 2019-08-14 2020-01-17 中国平安财产保险股份有限公司 Page generation method and device
CN110806873A (en) * 2019-10-31 2020-02-18 拉扎斯网络科技(上海)有限公司 Target control determining method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱珊虹 ; 李彦 ; .利用CSS样式表制作网站中的动态实时更新.计算机与信息技术.2011,(第06期),全文. *
李平平 ; 胡志勇 ; .基于AngularJS的电商运营管理系统设计.电子设计工程.2017,(第22期),全文. *

Also Published As

Publication number Publication date
CN111580873A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
US11706331B2 (en) Information processing method and apparatus, storage medium, and electronic device
CN110990105B (en) Interface display method and device, electronic equipment and storage medium
US9870239B2 (en) Method and device for running application program
CN110990075B (en) Method, device, equipment and storage medium for starting fast application
CN104281478B (en) The method and device of more new application
CN110874217A (en) Interface display method and device for fast application and storage medium
CN110865837B (en) Method and terminal for system upgrade
CN111736916A (en) Dynamic expansion method and device based on Java language, electronic equipment and storage medium
CN110851240B (en) Function calling method, device and storage medium
CN110865863B (en) Interface display method and device for fast application and storage medium
CN111580873B (en) Page updating method and device, terminal and storage medium
US11210449B2 (en) Page display method and device and storage medium
CN107402756B (en) Method, device and terminal for drawing page
CN112328330A (en) iOS component calling method, device, middleware, electronic equipment and medium
CN111221613A (en) Program calling method and device and storage medium
CN108563487B (en) User interface updating method and device
CN110908629A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN114546436A (en) Micro front-end service updating method and device, electronic equipment and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN111104110A (en) Global style sharing method, global style sharing device and electronic device
CN116126320B (en) Data processing method and device, electronic equipment and storage medium
CN115098200B (en) Language switching method and device, electronic equipment and storage medium
CN111596949B (en) Method and device for developing application program
CN111273910B (en) Method, device and storage medium for acquiring resource number identifier

Legal Events

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