CN112596810B - Loading prompt information display method and device, electronic equipment and storage medium - Google Patents

Loading prompt information display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112596810B
CN112596810B CN202011508006.1A CN202011508006A CN112596810B CN 112596810 B CN112596810 B CN 112596810B CN 202011508006 A CN202011508006 A CN 202011508006A CN 112596810 B CN112596810 B CN 112596810B
Authority
CN
China
Prior art keywords
data
loading
component
attribute
data model
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
CN202011508006.1A
Other languages
Chinese (zh)
Other versions
CN112596810A (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202011508006.1A priority Critical patent/CN112596810B/en
Publication of CN112596810A publication Critical patent/CN112596810A/en
Application granted granted Critical
Publication of CN112596810B publication Critical patent/CN112596810B/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/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a method and a device for displaying loading prompt information, electronic equipment and a storage medium, and belongs to the technical field of computers. The loading prompt information display method comprises the following steps: and when the loading interface operates, the state attribute of the loading interface can be automatically updated, and the state attribute of the loading prompt information corresponding to the component is automatically adjusted based on the updated state attribute, so that the loading prompt information is displayed in the page, corresponding codes for modifying the state attribute are not required to be arranged in the process, and the data volume in the data model is reduced.

Description

Loading prompt information display method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a method and a device for displaying loading prompt information, electronic equipment and a storage medium.
Background
Pages commonly used are composed of a plurality of components, and with the development of computer technology, the functions of the pages are more and more rich and diverse. When the triggering operation is executed on the components in the page, corresponding loading prompt information can be displayed in the page so as to prompt the user that the data are being loaded.
In the related art, when a technician configures data of a component in a page of an application, a set of code of modification state needs to be configured for each interface corresponding to the component, and when a triggering operation is executed on the component in the page, the component can call the corresponding interface to load the data and execute the code of modification state corresponding to the interface, so that the state of loading prompt information in the page is modified to be a display state, and the loading prompt information is displayed in the page. However, this approach requires a set of code to modify state for each interface, resulting in a large data size of components in the page, increasing costs.
Disclosure of Invention
The disclosure provides a method, a device, electronic equipment and a storage medium for displaying loading prompt information, which improve the development efficiency of applications.
According to an aspect of the embodiments of the present disclosure, there is provided a method for displaying loading hint information, including:
responding to triggering operation of a component in a page, and calling a loading interface in a data model corresponding to the component;
When the loading interface runs, a first attribute updating message is sent to the component through the data model, the first attribute updating message is used for updating the state of loading prompt information corresponding to the component, and the first attribute updating message carries a first attribute value used for representing the display state;
and updating the state attribute of the loading prompt information corresponding to the component into the first attribute value through the component, and displaying the loading prompt information in the page.
According to the method provided by the embodiment of the disclosure, the state attribute of the loading interface in the data model is configured, when the loading interface runs, the state attribute of the loading interface can be automatically updated, and the state attribute of the loading prompt information corresponding to the component is automatically adjusted based on the updated state attribute, so that the loading prompt information is displayed in the page, and the corresponding code for modifying the state attribute is not required to be arranged in the process, so that the data amount in the data model is reduced, the cost is saved, and the development efficiency of the application is improved.
In some embodiments, said sending, by said data model, a first attribute update message to said component while said loading interface is running, comprises:
When the loading interface runs, updating a state attribute of the loading interface from a second attribute value to the first attribute value, wherein the state attribute is used for indicating the state of loading prompt information corresponding to the component, and the second attribute value represents a hidden state;
and sending the first attribute updating message to the component through the data model.
When the loading interface operates, the state attribute of the loading interface is automatically updated, and the state attribute of the loading prompt information can be automatically updated by sending a first attribute updating message to the component, so that the component automatically updates the state attribute of the loading instruction information without arranging corresponding codes for modifying the state attribute.
In some embodiments, the data model further comprises a scheduler; said sending, by said data model, said first attribute update message to said component, comprising:
when the loading interface runs, a second attribute updating message is sent to the scheduler, wherein the second attribute updating message carries the first attribute value and the component identifier of the component;
And sending, by the scheduler, the first attribute update message to the component.
The dispatcher in the data model sends the first attribute updating message to the component, so that interaction between the data model and the component is realized, and the subsequent component can update the loading prompt information through the first attribute updating message, so that automatic display of the loading prompt information is realized.
In some embodiments, after the responding to the triggering operation on the component in the page and invoking the loading interface in the data model corresponding to the component, the loading prompt information display method further includes:
and sending a data loading request to a server through the loading interface, wherein the server is used for returning corresponding data according to the data loading request.
Corresponding data can be obtained from the server through the loading interface, so that corresponding functions can be realized through the returned data in the follow-up process.
In some embodiments, the updating, by the component, the status attribute of the loading hint information corresponding to the component to the first attribute value, and after the loading hint information is displayed in the page, the loading hint information display method further includes:
Responding to the data returned by the server acquired by the loading interface, and sending a third attribute updating message to the component through the data model when the loading interface runs, wherein the third attribute updating message is used for updating the state of the loading prompt information corresponding to the component, and the third attribute updating message carries a second attribute value used for representing the hidden state;
And updating the state attribute of the loading prompt information corresponding to the component into the second attribute value through the component, and canceling the display of the loading prompt information in the page.
After the loading interface acquires the data returned by the server, when the loading interface operates, the state attribute of the loading interface is automatically updated, and the state attribute of the loading prompt information corresponding to the component is automatically updated through interaction with the component, so that the loading prompt information is canceled from being displayed in the page, codes for correspondingly modifying the state attribute are not required to be arranged in the process, the data quantity in the data model is reduced, the cost is saved, and the development efficiency of the application is improved.
In some embodiments, said sending, by said data model, a third attribute update message to said component while said loading interface is running, comprises:
When the loading interface runs, updating the state attribute of the loading interface from the first attribute value to the second attribute value;
And sending the third attribute updating message to the component through the data model.
When the loading interface operates, the state attribute of the loading interface is automatically updated, and the third attribute updating message is sent to the component, so that the component automatically updates the state attribute of the loading indication information, and the state attribute of the loading prompt information can be automatically updated without arranging corresponding codes for modifying the state attribute.
In some embodiments, the data model further comprises a subscription component identification indicating a subscription component that invoked the data model; the loading prompt information display method further comprises the following steps:
Responding to the loading interface to acquire the data returned by the server, and updating the data in the data model according to the returned data;
and in response to the change of the data in the data model, sending a data update message to a subscription component in the data model, wherein the subscription component is corresponding to the subscription component identification, and the data update message indicates the subscription component to recall the data model.
When the data in the data model is changed, the subscription component is instructed to recall the updated data model through the data updating message, so that the subscription component re-renders according to the updated data model, and automatic updating of the page is realized.
In some embodiments, the data model further comprises a scheduler having the subscription component identification stored therein;
The sending, in response to a change in data in the data model, a data update message to a subscription component corresponding to a subscription component identifier in the data model, including:
And responding to the change of the data in the data model, and sending the data update message to a subscription component in the data model by identifying the corresponding subscription component based on a scheduler in the data model.
The scheduler in the data model can monitor the data change condition in the data model, and when the data in the data model is restored, a data update message is sent to the subscription component, so that the data model called by the subscription component can be updated in time.
In some embodiments, the data model further includes a data update interface, and the responding to the loading interface to obtain the returned data from the server, updating the data in the data model according to the returned data includes:
Responding to the loading interface to acquire the data returned by the server, and calling the data updating interface through the loading interface;
And updating the data in the data model according to the returned data through the data updating interface.
In some embodiments, before the responding to the triggering operation on the component in the page and invoking the loading interface in the data model corresponding to the component, the loading prompt information display method further includes:
When a data container is operated, converting the data of the component to obtain a data model of the component, wherein the data model comprises the loading interface and the state attribute of the loading interface;
and loading the data model into the data container.
The data of the component is stored in the data container in the form of the data model by converting the data of the component, and the data model is taken as a basic unit, so that the expansion of the component can be facilitated, different data models can be called mutually, and the application flexibility is improved.
In some embodiments, the method for displaying loading prompt information further includes:
And when the target application is started, running the data container of the target application.
In some embodiments, the data model includes a data processing interface, and the loading interface is generated at runtime of the data processing interface.
According to still another aspect of the embodiments of the present disclosure, there is provided a loading hint information display apparatus including:
the calling unit is configured to execute a triggering operation for responding to a component in a page and call a loading interface in a data model corresponding to the component;
The sending unit is configured to send a first attribute updating message to the component through the data model when the loading interface runs, wherein the first attribute updating message is used for updating the state of loading prompt information corresponding to the component, and the first attribute updating message carries a first attribute value used for representing the display state;
And the display unit is configured to update the state attribute of the loading prompt information corresponding to the component into the first attribute value through the component, and display the loading prompt information in the page.
In some embodiments, the transmitting unit includes:
A first updating subunit, configured to update, when the loading interface runs, a state attribute of the loading interface from a second attribute value to the first attribute value, where the state attribute is used to indicate a state of loading prompt information corresponding to the component, and the second attribute value characterizes a hidden state;
a sending subunit configured to send the first attribute update message to the component via the data model.
In some embodiments, the data model further comprises a scheduler; the sending subunit is configured to send a second attribute update message to the scheduler when the loading interface runs, wherein the second attribute update message carries the first attribute value and the component identifier of the component; and sending, by the scheduler, the first attribute update message to the component.
In some embodiments, the sending unit is further configured to send a data loading request to a server through the loading interface, where the server is configured to return corresponding data according to the data loading request.
In some embodiments, the sending unit is further configured to perform sending, by the data model, a third attribute update message to the component when the loading interface runs in response to the loading interface obtaining the data returned by the server, where the third attribute update message is used to update the state of the loading hint information corresponding to the component, and the third attribute update message carries a second attribute value used to characterize the hidden state;
And the display unit is further configured to update the state attribute of the loading prompt information corresponding to the component to the second attribute value through the component, and cancel the display of the loading prompt information in the page.
In some embodiments, the transmitting unit includes:
A first updating subunit configured to perform updating, when the load interface is running, a state attribute of the load interface from the first attribute value to the second attribute value;
a sending subunit configured to send the third attribute update message to the component via the data model.
In some embodiments, the data model further comprises a subscription component identification indicating a subscription component that invoked the data model; the loading prompt information display device further comprises:
the updating unit is configured to execute the data in the data model according to the returned data, which is obtained by the loading interface and returned by the server;
The sending unit is further configured to perform sending, in response to a change of data in the data model, a data update message to a subscription component corresponding to a subscription component identifier in the data model, the data update message indicating that the subscription component recalls the data model.
In some embodiments, the data model further comprises a scheduler having the subscription component identification stored therein;
The transmitting unit includes:
A sending subunit configured to perform sending the data update message to a subscription component in the data model identifying a corresponding subscription component based on a scheduler in the data model in response to a change in data in the data model.
In some embodiments, the data model further comprises a data update interface, the update unit comprising:
A calling subunit, configured to execute the data updating interface through the loading interface in response to the loading interface obtaining the data returned by the server;
And the second updating subunit is configured to update the data in the data model according to the returned data through the data updating interface.
In some embodiments, the loading hint information display device further includes:
The conversion unit is configured to execute conversion of the data of the component when the data container is operated to obtain a data model of the component, wherein the data model comprises the loading interface and the state attribute of the loading interface;
And a loading unit configured to perform loading of the data model into the data container.
In some embodiments, the loading hint information display device further includes:
and an execution unit configured to execute the data container that runs the target application when the target application is started.
In some embodiments, the data model includes a data processing interface, and the loading interface is generated at runtime of the data processing interface.
According to still another aspect of the embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to perform the loading hint information display method of the above aspect.
According to still another aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the loading hint information display method of the above aspect.
According to yet another aspect of the disclosed embodiments, a computer program product is provided, which when executed by a processor of an electronic device, enables the electronic device to perform the loading hint information display method of the above aspect.
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 a flowchart illustrating a method of displaying load hint information according to an exemplary embodiment.
FIG. 2 is a flowchart illustrating a method of displaying load hint information according to an exemplary embodiment.
FIG. 3 is a schematic diagram of a reaction framework, shown according to an example embodiment.
FIG. 4 is a flowchart illustrating a component invocation data model, according to an example embodiment.
Fig. 5 is a block diagram illustrating a loading hint information display device according to an exemplary embodiment.
Fig. 6 is a block diagram illustrating a loading hint information display device according to an exemplary embodiment.
Fig. 7 is a block diagram of a terminal according to an exemplary embodiment.
Fig. 8 is a block diagram of a server, according to an example embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description of the present disclosure and the claims and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. 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 terms "at least one," "a plurality," "each," "any" as used herein, at least one includes one, two or more, a plurality includes two or more, and each refers to each of a corresponding plurality, any of which refers to any of the plurality. For example, the plurality of data models includes 3 data models, and each refers to each of the 3 data models, and any one refers to any one of the 3 data models, which may be the first, the second, or the third.
The user information (including but not limited to user equipment information, user personal information, etc.) related to the present disclosure is information authorized by the user or sufficiently authorized by each party.
The loading prompt information display method provided by the embodiment of the disclosure can be applied to computer equipment. In some embodiments, the computer device is a terminal, for example, the terminal is a mobile phone, a tablet computer, a computer, or other types of terminals. In some embodiments, the computer device is a server, for example, the server is a server, or a server cluster composed of several servers, or a cloud computing service center.
The following embodiments are a brief description of the principles of the present disclosure, and fig. 1 is a flowchart illustrating a method for displaying loading hint information according to an exemplary embodiment, and referring to fig. 1, the method is applied to a computer device, and includes the following steps:
101. And the computer equipment responds to the triggering operation of the components in the page and calls the loading interfaces in the data model corresponding to the components.
In the embodiment of the present disclosure, the page includes a component, which is an arbitrary component, for example, a component that provides a search function, a component that provides a sliding operation, or the like. Each component corresponds to a data model, and the data model comprises a loading interface. The loading interface is used for loading data, for example, the component is a component providing searching function, and then the loading interface is an interface loaded on the data related to the search terms; or the component is a component providing a page skip function, the loading interface is an interface loading data of a page to be skipped. The triggering operation of the component is an arbitrary operation, for example, the triggering operation is a click operation, a drag operation, or other operations.
In the page display process, when a triggering operation is executed on a component in a page, the function of the component, such as a search function or a page skip function, needs to be realized, and then a loading interface in a data model corresponding to the component needs to be called, so that data is loaded through the loading interface subsequently, and the function of the component is realized.
102. The computer device, when the loading interface is running, sends a first attribute update message to the component through the data model.
The first attribute updating message is used for updating the state of the loading prompt information corresponding to the component, and the first attribute updating message carries a first attribute value used for representing the display state.
And sending a first attribute updating message to the component through the data model so that the component can update the state attribute of the loading prompt information according to the first attribute value carried in the first attribute updating message.
103. The computer equipment updates the state attribute of the loading prompt information corresponding to the component into a first attribute value through the component, and displays the loading prompt information in the page.
After the component receives the first attribute updating message, a first attribute value carried by the first attribute updating message is obtained, and the state attribute of the loading prompt information is updated according to the obtained first attribute value, so that the state attribute of the loading prompt information is the first attribute value, the first attribute value is characterized as a display state, rendering is carried out according to the updated state attribute of the loading prompt information, and the loading prompt information can be displayed in a page to prompt a user that data is currently loaded.
According to the method provided by the embodiment of the disclosure, the state attribute of the loading interface in the data model is configured, when the loading interface runs, the state attribute of the loading interface can be automatically updated, and the state attribute of the loading prompt information corresponding to the component is automatically adjusted based on the updated state attribute, so that the loading prompt information is displayed in the page, and the corresponding code for modifying the state attribute is not required to be arranged in the process, so that the data amount in the data model is reduced, the cost is saved, and the development efficiency of the application is improved.
FIG. 2 is a flowchart illustrating a method for displaying loading hint information according to an exemplary embodiment, and referring to FIG. 2, the method is applied to a computer device, and includes the following steps:
201. And the computer equipment responds to the triggering operation of the components in the page and calls the loading interfaces in the data model corresponding to the components.
In the embodiment of the present disclosure, the page includes a component, which is an arbitrary component, for example, a component that provides a search function, a component that provides a sliding operation, or the like. In some embodiments, the page includes a plurality of components, and the component performing the triggering operation is any one of the plurality of components. Each component corresponds to a data model, and the data model comprises a loading interface. In some embodiments, the data model includes data for the component, and the loading interface is an interface included in the data for the component. The loading interface is used for loading data, for example, the component is a component providing searching function, and then the loading interface is an interface loaded on the data related to the search terms; or the component is a component providing a page skip function, the loading interface is an interface loading data of a page to be skipped. The triggering operation on the component is any operation, and in some embodiments, is a click operation, a drag operation, or other operation, etc.
In the page display process, when a triggering operation is executed on a component in a page, the function of the component, such as a search function or a page skip function, needs to be realized, and then a loading interface in a data model corresponding to the component needs to be called, so that data is loaded through the loading interface subsequently, and the function of the component is realized.
In some embodiments, the data model includes a data processing interface, the load interface being generated at runtime of the data processing interface. For example, in response to a triggering operation on the component, a data model corresponding to the component is called, a data processing interface in the data model is operated, and the loading interface is generated. In addition, when the data processing interface is running, a plurality of interfaces can be generated in addition to the loading interface.
202. When the computer equipment runs the loading interface, the state attribute of the loading interface is updated from the second attribute value to the first attribute value.
The status attribute is used for indicating the status of the loading prompt information corresponding to the component, wherein the loading prompt information is information for indicating that data is being loaded, and for example, the loading prompt information is graphic information or text information. The state attribute includes a first attribute value or a second attribute value, the second attribute value representing a hidden state and the first attribute value representing a display state. For example, the status attribute is a loading attribute, the second attribute value is false, and the first attribute value is wire.
In the embodiment of the disclosure, a loading interface in a data model corresponds to a state attribute, a default value of the state attribute is a second attribute value, and when a component invokes the loading interface, the loading interface is operated to update the state attribute of the loading interface from the second attribute value to a first attribute value.
In some embodiments, the data model is stored in a data container, the data model is obtained by converting data of the component when the data container runs, and the converted data model is loaded into the data container, so that in the process of loading the data model of the component into the data container, the loading interface included in the data model is configured with state attributes. The state data is configured for the loading interface in the data model, so that when the loading interface is called, the state of the loading prompt information corresponding to the component is adjusted, and the loading prompt information is displayed in the page to prompt that the data is being loaded.
In one possible implementation of the above embodiment, the data model of the component includes a plurality of interfaces, and in the process of loading the data model of the component into the data container, each interface included in the data model is configured with a state attribute, that is, each interface included in the data model has a corresponding state attribute. For example, the data model includes a data processing interface, and when the data processing interface runs, the loading interface and other interfaces are generated, and the generated loading interface and other interfaces have corresponding state attributes. For example, when the data processing interface of the data model runs, a loading interface is generated, or a loading function (such as INCREASEASYNC), and when a triggering operation is performed on a component corresponding to the data model, an asynchronous processing interface (such as HANDLEASYNC) corresponding to the component is called, INCREASEASYNC in the data model is called through HANDLEASYNC, and a state attribute (effects. Input async. Loading) of INCREASEASYNC is updated from a second attribute value false to a first attribute value ure.
203. The computer device sends a first attribute update message to the component via the data model.
The first attribute updating message is used for updating the state of the loading prompt information corresponding to the component, and the first attribute updating message carries a first attribute value. After updating the state attribute of the loading interface, a first attribute updating message is sent to the component through the data model, so that the component can acquire that the state attribute of the loading interface is updated, and the component can update the state attribute of the loading prompt information according to a first attribute value carried in the first attribute updating message.
In one possible implementation, the data model further includes a scheduler; the step 203 includes: when the loading interface is running, a second attribute update message is sent to the scheduler, and the first attribute update message is sent to the component through the scheduler.
Wherein the scheduler is configured to send a message to the component to trigger a view update of the component. The second attribute update message carries the first attribute value and the component identification of the component. In the running process of the loading interface, a second attribute updating message is sent to the scheduler through the loading interface, so that the scheduler determines a component to be updated according to the component identification in the second attribute updating message, and then the scheduler sends a first attribute updating message to the determined component, so that the subsequent component updates the state attribute of the corresponding loading prompt information according to the first attribute updating message.
It should be noted that, in the embodiment of the present disclosure, the update of the state attribute of the loading interface is first performed, and then the first attribute update message is sent to the component, which is described by taking another embodiment, steps 203 to 204 are not required to be performed, and when the loading interface runs, other manners can be adopted to send the first attribute update message to the component through the data model.
204. The computer equipment updates the state attribute of the loading prompt information corresponding to the component into a first attribute value through the component, and displays the loading prompt information in the page.
After the component receives the first attribute updating message, a first attribute value carried by the first attribute updating message is obtained, and the state attribute of the loading prompt information is updated according to the obtained first attribute value, so that the state attribute of the loading prompt information is the first attribute value, the first attribute value is characterized as a display state, rendering is carried out according to the updated state attribute of the loading prompt information, and the loading prompt information can be displayed in a page to prompt a user that data is currently loaded.
For example, if the loading prompt information is text information in the loading process, after updating the state attribute of the loading prompt information corresponding to the component to the first attribute value, displaying a word in the loading process in the page, and prompting the user that data is currently being loaded.
205. The computer device sends a data loading request to the server through the loading interface.
The data loading request is used for loading data, for example, the data loading request is a page data loading request, the page data loading request is used for loading data of a page to be displayed, or the data loading request is a search data loading request, and the search data loading request is used for loading data related to a search word. And when the loading interface is operated, sending a data loading request to the server so that the server returns corresponding data according to the data loading request.
In some embodiments, after the step 205, the method further comprises: after the server receives the data loading request, the server obtains data matched with the data loading request according to the data loading request, and the obtained data is sent to the computer equipment.
In some embodiments, the loading interface is a search data loading interface, then the step 205 includes: and sending a search data loading request to a server through the search data loading interface, searching data related to the search terms carried by the search data loading request by the server according to the search data loading request, and returning the searched data.
It should be noted that, in the embodiment of the present disclosure, after step 201, the update of the state attribute of the loading prompt information corresponding to the component is described by taking an example of sending a data loading request to the server, and in another embodiment, after step 201, the process of updating the state attribute of the loading prompt information corresponding to the component is performed synchronously with the process of sending the data loading request to the server, or the process of sending the data loading request to the server is performed first, and then the process of updating the state attribute of the loading prompt information corresponding to the component is performed.
206. And the computer equipment responds to the data returned by the server acquired by the loading interface, and updates the state attribute of the loading interface from the first attribute value to the second attribute value when the loading interface runs.
After the loading interface acquires the data returned by the server, the loading interface indicates that the data is loaded, and then the state attribute of the loading interface is updated from the first attribute value to the second attribute value, so that the state attribute of the loading prompt information corresponding to the component is updated subsequently, and the display state of the loading prompt information corresponding to the component is updated.
207. The computer device sends a third attribute update message to the component via the data model.
Wherein the third attribute update message carries a second attribute value. The computer equipment sends a third attribute updating message to the component through the data model so that the component can update the state attribute of the loading indication information corresponding to the component according to the second attribute value carried by the third attribute updating message.
In one possible implementation, the data model further includes a scheduler, the step 207 including: when the loading interface is running, a fourth attribute updating message is sent to the scheduler, and a third attribute updating message is sent to the component through the scheduler.
The fourth attribute updating message carries the second attribute value and the component identifier of the component. In the running process of the loading interface, a fourth attribute updating message is sent to the scheduler through the loading interface, so that the scheduler determines a component to be updated according to the component identification in the fourth attribute updating message, and then the scheduler sends a third attribute updating message to the determined component, so that the subsequent component updates the state attribute of the corresponding loading prompt information according to the third attribute updating message. In the embodiment of the disclosure, after the state attribute of the loading interface is updated, the loading interface sends the attribute updating message to the scheduler, the scheduler sends the attribute updating message to the components, and the interaction among the loading interface, the scheduler and the components to be updated is realized by sequentially transmitting the attribute updating message, so that the effect of notifying the components to be updated that the state attribute of the loading interface is updated is finally achieved, the components to be updated can timely acquire the attribute value of the loading function after the state attribute is updated, and the subsequent components can adjust the loading prompt information according to the acquired attribute value.
It should be noted that, in the embodiment of the present disclosure, when the loading interface obtains the data returned by the server, the state attribute update of the loading interface is updated first, and then the third attribute update message is sent to the component, which is described by taking, as an example, in another embodiment, without executing steps 206-207, in response to the loading interface obtaining the data returned by the server, other manners can be adopted, and when the loading interface runs, the third attribute update message is sent to the component through the data model.
208. The computer equipment updates the state attribute of the loading prompt information corresponding to the component into a second attribute value through the component, and the loading prompt information is canceled from being displayed in the page.
After the component receives the third attribute updating message, a second attribute value carried by the third attribute updating message is obtained, and the state attribute of the loading prompt information is updated according to the obtained second attribute value, so that the state attribute of the loading prompt information is the second attribute value, the second attribute value is characterized as a hidden state, rendering is performed according to the updated state attribute of the loading prompt information, and the loading prompt information can be canceled from being displayed in a page to indicate that the data is loaded.
In some embodiments, then after step 205, the method further comprises the steps 209-210 of:
209. And responding to the loading interface to acquire the data returned by the server, and updating the data in the data model according to the returned data.
After receiving the data returned by the server, updating the data in the data model according to the returned data so that the subsequent updating of the components in the page can be triggered. For example, the value stored in the data model is 1, the returned data indicates that the value is 2, and after the data in the data model is updated, the value in the data model is 2.
In some embodiments, the data model further includes a data update interface, the step 209 comprising: and responding to the loading interface to acquire the data returned by the server, calling a data updating interface through the loading interface, and updating the data in the data model according to the returned data through the data updating interface.
The data updating interface is used for updating the data in the data model, and after the data returned by the server is acquired through the loading interface, the data updating interface is called, and the data in the data model is updated according to the data returned by the server through the data updating interface so that the corresponding components can be re-rendered later.
In one possible implementation manner of the foregoing embodiment, the data model further includes a data storage interface, where the data storage interface is configured to store data in the data model, and the process of updating the data in the data model includes: and updating the data in the data storage interface according to the returned data through the data updating interface. And the data in the data storage interface is updated through the data updating interface, so that the accuracy of data modification is ensured.
For example, the data model includes a data storage interface (State), a data update interface or function (Reducer), and a data processing interface (Effects), and after the Effects receive a data update request, the Reducer is called to update the data stored in the State based on the update data in the data update request.
210. The computer device sends a data update message to a subscription component in the data model that identifies the corresponding subscription component in the data model in response to the data in the data model changing.
Wherein the data update message instructs the subscription component to recall the data model. The data model also includes a subscription component identification that indicates a subscription component that invokes the data model. For example, for any data model, the components subscribed to the data model include component 1, component 2, and component 3, and then the data model includes the component identifications of component 1, component 2, and component 3.
Because the subscription component has called the data model, when the data of the data model is changed, a data update message is sent to the subscription component, so that the subscription component can call the data model again after receiving the data update message, and the changed data model can show the subscription component again.
In one possible implementation manner of the foregoing embodiment, the data model further includes a scheduler, where a subscription component identifier is stored; then the step 210 includes: in response to a change in data in the data model, a data update message is sent to a subscription component in the data model identifying a corresponding subscription component according to a scheduler in the data model.
The scheduler in the data model can detect the data change condition in the data model, and when the data in the data model is changed, a data update message is sent to the subscription component, so that the data model called by the subscription component can be updated in time.
In some embodiments, the page is a page in the target application, and then before step 201, the method further includes: and when the data container is operated, converting the data of the component to obtain a data model of the component, and loading the data model into the data container.
Wherein the data container is a container for loading data of the component, in some embodiments, the data container is a global data container of the application, or is a local data container of the application. For example, for an application, the data models corresponding to all components of the application are stored in a data container, i.e., the data container is a global data container; or the application comprises a plurality of pages, each page corresponds to one data container, the data model corresponding to the components in each page is stored in the corresponding data container, and the data container is a local data container.
When the target application is started, the data of the components in the page are converted, the data model obtained through conversion is loaded into a data container, so that the page can be displayed through the data model in the data container, and in the page display process, when the components in the page are operated, corresponding instructions can be executed through the data model corresponding to the components, so that corresponding functions of the components can be realized.
In one possible implementation of the above embodiment, the target application is a browsing application, a searching application, or other application, etc. For example, when the target application is a browsing application, the page is a page in the browsing application.
In one possible implementation of the above embodiment, the process of generating a data model in a data container includes the following steps 211-214:
211. The computer device stores the component file named with the component identification of the component under a specified directory.
In the embodiment of the disclosure, the page of the application is generally composed of a plurality of components, each component has corresponding data, and the presentation of the page can be realized by running the data of the components included in the page. By associating the component files of the components with the configuration files of the data container, a data model can be generated for the associated components later when the data container runs, so that the data model in the data container can be called by the subsequent components, and page display is realized.
Wherein the component identification of a component is a unique identification for indicating the component, in the embodiments of the present disclosure, the component identifications of different components are different. A component file is a form of storage of data that includes data for a component. In some embodiments, the component file is stored in script form.
The component files used for storing the components under the specified directory are, in some embodiments, directories corresponding to pages to which the components belong. That is, under the specified directory, not only the component files of the component but also the component files of other components in the page to which the component belongs are stored. In some embodiments, the specified directory is a directory corresponding to a plurality of pages, where the plurality of pages includes a page to which the component belongs. Under the specified directory, not only the component files of other components in the page to which the component belongs, but also the component files of the components in other pages may be stored.
The data container is enabled to generate a data model for the component based on the component file by naming the component file with the component identification of the component and storing under a specified directory to enable subsequent association of the component file with the data container.
212. The computer device adds the component identification of the component in the configuration file of the data container.
Because the component files are named with the component identifications of the components under the specified directory, the configuration files of the data container are associated with the component files named with the component identifications by adding the component identifications of the components in the configuration files of the data container, so that the component files can be operated through the configuration files when the data container is operated later, and a data model of the newly added components is generated.
In some embodiments, the data container is a global data container of the application or a local data container of the application. For example, for an application, the data models corresponding to all components of the application are stored in a data container, i.e., the data container is a global data container; or the application comprises a plurality of pages, each page corresponds to one data container, the data model corresponding to the components in each page is stored in the corresponding data container, and the data container is a local data container.
In some embodiments, the configuration file of the data container also includes component identifications of other components.
The other component files of the components are named by the component identifiers of the other components, and the other component files are also stored under the appointed directory, and comprise the data of the other components. And generating a data model of the plurality of components in the data container through the component identification in the configuration file of the data container and the subsequent component files of the plurality of components under the specified directory.
In some embodiments, the configuration file is stored under the specified directory. For example, a data container corresponds to a page, the designated directory is a directory corresponding to the page, under the designated directory, component files of components in the page and configuration files of the data container are stored, and the configuration files comprise component identifiers corresponding to a plurality of component files under the designated directory, so that data association between the configuration files and the components in the page is realized.
213. And when the computer equipment runs the data container, converting the data of the components associated with the configuration file to obtain a data model of the components.
In some embodiments, the components to which the configuration file has been associated also include other components. The data model of the component comprises data of the component and a model calling interface, and the model calling interface is used for calling other data models in the data container.
When the data container is operated, the data of the related components are determined through the configuration file, the data of the related components are converted, the data model of the components is generated, the container aggregation function of the data container is realized, the data model comprises a model calling interface for calling other data models, the data of the other data models can be called through the model calling interface subsequently, and the data sharing among the data models of the components is realized.
In some embodiments, the data model includes a data update interface, a data processing interface, and a data storage interface, where the data storage interface stores data in the data model, the data update interface is used to update the data in the data storage interface, and the data processing interface is used to process the acquired asynchronous request.
In one possible implementation of the above embodiment, the model call interface is generated while the data processing interface is running. Other data models can be invoked through the model invocation interface.
In some embodiments, the model calling interface includes an interface for calling a data update interface of the other data model, and then any data model can call the data update interface of the other data model by calling the interface of the data update interface of the other data model, and update the data in the data storage interface of the other data model by the data update interface of the other data model.
In some embodiments, this step 213 includes: and in response to the starting of the application, operating the data container, and converting the data of the components associated with the configuration file to obtain a data model of the components.
In the embodiment of the disclosure, the component is a component in a page of the application, and when the application is started, the data model of the component is obtained by running the data container, so that the page of the application is displayed by the data model of the newly added component.
In some embodiments, this step 213 includes: when the data container is operated, converting the data of the components related to the configuration file through a parser to obtain a data model of the components. Wherein the parser is to convert data of the component into a data model. In some embodiments, the parser is provided by a React (a script library that builds user interfaces) framework, which is a development hierarchy.
In some embodiments, the data container is a data container corresponding to the target application, and then the method further includes, before step 203: and when the target application is started, running a data container of the target application. When the target application is started, a data container of the target application is run, so that a data model of the component is generated through the data container.
Additionally, in some embodiments, this step 213 includes: and when the data container is operated, carrying out boundary check on the data of the components related to the configuration file, and converting the data of the components related to the configuration file to obtain a data model of the components in response to the passing of the boundary check. Wherein the boundary check is used to check the data format of the component. And the accuracy of the data of the component is ensured by carrying out boundary inspection on the data of the component, so that the accuracy of the generated data model is ensured.
In one possible implementation of the above embodiment, the data of the component corresponds to a reference format, the boundary check passing of the data of the component is determined in response to the data of the component satisfying the reference format, and the boundary check failing of the data of the component is determined in response to the data of the component not satisfying the reference format.
214. The computer device stores the data model in a data container in correspondence with the component identifications of the corresponding components.
By storing the data model in the data container in correspondence with the component identity of the corresponding component, the corresponding data model can be subsequently queried by means of the component identity.
In some embodiments, the data container includes a mounting container therein, and the data model is stored in the mounting container. For example, after generating a plurality of data models, a mounting container is generated for each data model, and the mounting container is stored in the data container as a carrier of the data model.
The process of generating the data model in the data container can provide data support for the subsequent process, so that the page display and the update of the display state of the loading prompt information are realized by using the data model based on the generated data model in the subsequent process.
The method provided by the embodiment of the disclosure can be applied to a reaction (script library for constructing a user interface) framework, and the user interface can be constructed based on the reaction framework. For example, the reaction development framework is ReactHooks (a new component architecture) framework. In the development system of the compact framework, the pages of the application are composed of components, and data among the components is transferred in a unidirectional form. According to the loading prompt information display method provided by the embodiment of the disclosure, the data model of the component is assembled in the data container by taking the data model as a basic unit, so that the component can directly call the data model of the data container, and when the component is newly added on an application page, the component file of the newly added component is associated with the configuration file of the data container, so that the updating of the component can be realized, all data in the data container are not required to be reconfigured, the application flexibility is improved, and the maintainability of codes is improved. According to the loading prompt information display method provided by the embodiment of the disclosure, a frame for automatically updating the page view of an asynchronous request is configured for a reaction frame, loading prompt information is displayed on a page in the process of loading data, and after loading the data is completed, the information is canceled from loading the prompt information on the page, so that the user experience is enhanced by displaying the form of the loading prompt information in the process of loading the data on the page.
According to the method provided by the embodiment of the disclosure, the state attribute of the loading interface in the data model is configured, when the loading interface runs, the state attribute of the loading interface can be automatically updated, and the state attribute of the loading prompt information corresponding to the component is automatically adjusted based on the updated state attribute, so that the loading prompt information is displayed in the page, and the corresponding code for modifying the state attribute is not required to be arranged in the process, so that the data amount in the data model is reduced, the cost is saved, and the development efficiency of the application is improved.
And when a data loading request is sent to the server, the state attribute of the loading prompt information corresponding to the component is automatically updated through interaction between the data model and the component, so that the loading prompt information is displayed in the page, and after the data returned by the server is acquired, the state attribute of the loading prompt information corresponding to the component is automatically updated through interaction between the data model and the component, so that the loading prompt information is canceled to be displayed in the page, thereby realizing automatic updating of the page, avoiding arranging codes for correspondingly modifying the state attribute in the process, reducing the data quantity in the data model, saving the cost and improving the development efficiency of the application.
And when the loading interface runs, the state attribute of the loading interface is automatically updated, and the state attribute of the loading prompt information can be automatically updated by sending a first attribute updating message to the component, so that the component automatically updates the state attribute of the loading instruction information without arranging corresponding codes for modifying the state attribute.
And the dispatcher in the data model sends the first attribute updating message to the component, so that the interaction between the data model and the component is realized, and the subsequent component can update the loading prompt information through the first attribute updating message, thereby realizing the automatic display of the loading prompt information.
And after the loading interface acquires the data returned by the server, when the loading interface runs, the state attribute of the loading interface is automatically updated, and the state attribute of the loading prompt information corresponding to the component is automatically updated through interaction with the component, so that the display of the loading prompt information in the page is canceled, and the corresponding code for modifying the state attribute is not required to be arranged in the process, thereby reducing the data quantity in the data model, saving the cost and improving the development efficiency of the application.
And when the data in the data model is changed, the subscription component is instructed to recall the updated data model through the data update message so as to render the subscription component again according to the updated data model, thereby realizing automatic update of the page.
And the scheduler in the data model can monitor the data change condition in the data model, and when the data in the data model is restored, a data update message is sent to the subscription component, so that the data model called by the subscription component can be updated in time.
And through converting the data of the component, the data of the component is stored in a data container in the form of a data model, and the data model is taken as a basic unit, so that the expansion of the component can be facilitated, different data models can be mutually called, and the application flexibility is improved.
Based on the method for displaying the loading prompt information provided by the embodiment, a schematic diagram of a reaction frame is provided, and as shown in fig. 3, the display of the page can be realized through the reaction frame.
For a target application, the target application includes a plurality of pages, each page including a plurality of components, a data container is configured for each page, and a specified directory is created for each page. And for any page, naming the component files of the components in the page by the identification of the components, storing the component files under a specified directory corresponding to the page, storing the configuration file of the data container under the specified directory, and adding the component identifications corresponding to a plurality of component files under the specified directory in the configuration file to realize the association between the components and the data container.
When the target application is started, the data container is operated, the accuracy of the component files is ensured by carrying out boundary inspection on the component files, after the boundary inspection of the component files is passed, the component files related to the configuration files of the data container are converted into data models through container aggregation action of a parser and the data container, a mounting container is created for each data model in the data container, and the data models are stored in the mounting container. And storing in the scheduler of each data model the subscription component identity of the data model.
The data model in the data container is mounted on the component in the page display through the hanging container in the data container, so that the component can send a model calling message to the data container through the mounting container, the data container can determine the data model corresponding to the component identifier by carrying out model indexing on the component identifier carried in the model calling message, the data model is sent to the component, and the process of calling the data model by the component is shown in fig. 4. After the component receives the data model returned by the data container, a data storage interface, a data update interface and a data processing interface which are included in the data model can be obtained, and the page is rendered based on the data stored in the data storage interface so as to display the rendered page.
Fig. 5 is a block diagram illustrating a loading hint information display device according to an exemplary embodiment. Referring to fig. 5, the loading hint information display apparatus includes:
A calling unit 501 configured to execute a trigger operation in response to a component in a page, and call a loading interface in a data model corresponding to the component;
The sending unit 502 is configured to send a first attribute update message to the component through the data model when the loading interface runs, where the first attribute update message is used to update the state of the loading prompt information corresponding to the component, and the first attribute update message carries a first attribute value used to characterize the display state;
and the display unit 503 is configured to update the status attribute of the loading prompt information corresponding to the component to the first attribute value through the component, and display the loading prompt information in the page.
According to the device provided by the embodiment of the disclosure, the state attribute is configured for the loading interface in the data model, when the loading interface runs, the state attribute of the loading interface can be automatically updated, and the state attribute of the loading prompt information corresponding to the component is automatically adjusted based on the updated state attribute, so that the loading prompt information is displayed in the page, and the corresponding code for modifying the state attribute is not required to be arranged in the process, so that the data amount in the data model is reduced, the cost is saved, and the development efficiency of the application is improved.
In some embodiments, as shown in fig. 6, the sending unit 502 includes:
The first updating subunit 5021 is configured to update a state attribute of the loading interface from a second attribute value to a first attribute value when the loading interface runs, wherein the state attribute is used for indicating the state of loading prompt information corresponding to the component, and the second attribute value represents a hidden state;
The sending subunit 5022 is configured to send the first attribute update message to the component through the data model.
In some embodiments, the data model further comprises a scheduler; a sending subunit 5022 configured to send a second attribute update message to the scheduler when the loading interface is running, where the second attribute update message carries the first attribute value and the component identifier of the component; a first attribute update message is sent to the component by the scheduler.
In some embodiments, the sending unit 502 is further configured to send a data loading request to a server through the loading interface, where the server is configured to return corresponding data according to the data loading request.
In some embodiments, the sending unit 502 is further configured to perform sending, by the data model, a third attribute update message to the component in response to the loading interface obtaining the data returned by the server, where the third attribute update message is used to update the state of the loading prompt information corresponding to the component, and the third attribute update message carries a second attribute value used to characterize the hidden state;
The display unit 503 is further configured to update, by the component, the status attribute of the loading prompt information corresponding to the component to a second attribute value, and cancel displaying the loading prompt information in the page.
In some embodiments, as shown in fig. 6, the sending unit 502 includes:
A first updating subunit 5021 configured to perform updating of the state attribute of the load interface from the first attribute value to the second attribute value when the load interface is running;
a sending subunit 5022 configured to send a third attribute update message to the component through the data model.
In some embodiments, the data model further includes a subscription component identification indicating a subscription component that invoked the data model; as shown in fig. 6, the loading hint information display device further includes:
an updating unit 504 configured to perform updating of the data in the data model according to the returned data in response to the loading interface acquiring the data returned from the server;
the sending unit 502 is further configured to perform sending, in response to a change of data in the data model, a data update message to a subscription component in the data model that identifies the corresponding subscription component, the data update message instructing the subscription component to recall the data model.
In some embodiments, the data model further comprises a scheduler having stored therein a subscription component identification;
As shown in fig. 6, the transmitting unit 502 includes:
A sending subunit 5022 configured to perform sending, in response to the data in the data model changing, a data update message to the subscription component in the data model identifying the corresponding subscription component based on the scheduler in the data model.
In some embodiments, the data model further includes a data update interface, as shown in fig. 6, an update unit 504, including:
A calling subunit 5041 configured to execute a data update interface through the loading interface in response to the loading interface acquiring the data returned by the server;
a second updating subunit 5042 configured to perform updating of the data in the data model according to the returned data via the data updating interface.
In some embodiments, as shown in fig. 6, the loading hint information display apparatus further includes:
The conversion unit 505 is configured to perform conversion on the data of the component when the data container is operated, so as to obtain a data model of the component, where the data model includes a loading interface and a state attribute of the loading interface;
a loading unit 506 configured to perform loading of the data model into the data container.
In some embodiments, as shown in fig. 6, the loading hint information display apparatus further includes:
An execution unit 507 configured to execute a data container of the target application when the target application is started.
In some embodiments, the data model includes a data processing interface, and the loading interface is generated at runtime of the data processing interface.
In an exemplary embodiment, there is also provided an electronic apparatus, characterized in that the electronic apparatus includes:
one or more processors;
volatile or non-volatile memory for storing one or more processor-executable instructions;
wherein the one or more processors are configured to perform the steps performed by the terminal or the server in the loading hint information display method.
In some embodiments, the electronic device is provided as a terminal. Fig. 7 is a block diagram illustrating a structure of a terminal 700 according to an exemplary embodiment. The terminal 700 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 700 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, etc.
The terminal 700 includes: a processor 701 and a memory 702.
Processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 701 may be implemented in at least one hardware form of DSP (DIGITAL SIGNAL Processing), FPGA (Field-Programmable gate array), PLA (Programmable Logic Array ). The processor 701 may also include a main processor and a coprocessor, wherein the main processor is a processor for processing data in an awake state, and is also called a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 701 may also include an AI (ARTIFICIAL INTELLIGENCE ) processor for processing computing operations related to machine learning.
Memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 702 is used to store at least one program code for execution by processor 701 to implement the load hint information display method provided by the method embodiments of the present disclosure.
In some embodiments, the terminal 700 may further optionally include: a peripheral interface 703 and at least one peripheral. The processor 701, the memory 702, and the peripheral interface 703 may be connected by a bus or signal lines. The individual peripheral devices may be connected to the peripheral device interface 703 via buses, signal lines or a circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 704, a display 705, a camera assembly 706, audio circuitry 707, a positioning assembly 708, and a power supply 709.
A peripheral interface 703 may be used to connect I/O (Input/Output) related at least one peripheral device to the processor 701 and memory 702. In some embodiments, the processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
The Radio Frequency circuit 704 is configured to receive and transmit RF (Radio Frequency) signals, also referred to as electromagnetic signals. The radio frequency circuitry 704 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 704 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. The radio frequency circuitry 704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the world wide web, metropolitan area networks, intranets, generation mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (WIRELESS FIDELITY ) networks. In some embodiments, the radio frequency circuitry 704 may also include NFC (NEAR FIELD Communication) related circuitry, which is not limited by the present disclosure.
The display screen 705 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 705 is a touch display, the display 705 also has the ability to collect touch signals at or above the surface of the display 705. The touch signal may be input to the processor 701 as a control signal for processing. At this time, the display 705 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, the display 705 may be one and disposed on the front panel of the terminal 700; in other embodiments, the display 705 may be at least two, respectively disposed on different surfaces of the terminal 700 or in a folded design; in other embodiments, the display 705 may be a flexible display disposed on a curved surface or a folded surface of the terminal 700. Even more, the display 705 may be arranged in a non-rectangular irregular pattern, i.e. a shaped screen. The display 705 may be made of LCD (Liquid CRYSTAL DISPLAY), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 706 is used to capture images or video. Optionally, the camera assembly 706 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 701 for processing, or inputting the electric signals to the radio frequency circuit 704 for voice communication. For the purpose of stereo acquisition or noise reduction, a plurality of microphones may be respectively disposed at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, the audio circuit 707 may also include a headphone jack.
The location component 708 is operative to locate the current geographic location of the terminal 700 for navigation or LBS (Location Based Service, location-based services). The positioning component 708 may be a positioning component based on the United states GPS (Global Positioning System ), the Beidou system of China, or the Galileo system of Russia.
A power supply 709 is used to power the various components in the terminal 700. The power supply 709 may be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 709 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 700 further includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyroscope sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 700. For example, the acceleration sensor 711 may be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 701 may control the display screen 705 to display a user interface in a landscape view or a portrait view based on the gravitational acceleration signal acquired by the acceleration sensor 711. The acceleration sensor 711 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 712 may detect a body direction and a rotation angle of the terminal 700, and the gyro sensor 712 may collect a 3D motion of the user to the terminal 700 in cooperation with the acceleration sensor 711. The processor 701 may implement the following functions based on the data collected by the gyro sensor 712: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
The pressure sensor 713 may be disposed at a side frame of the terminal 700 and/or at a lower layer of the display screen 705. When the pressure sensor 713 is disposed at a side frame of the terminal 700, a grip signal of the user to the terminal 700 may be detected, and the processor 701 performs left-right hand recognition or quick operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at the lower layer of the display screen 705, the processor 701 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 714 is used to collect a fingerprint of the user, and the processor 701 identifies the identity of the user based on the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 701 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 714 may be provided on the front, back, or side of the terminal 700. When a physical key or vendor Logo is provided on the terminal 700, the fingerprint sensor 714 may be integrated with the physical key or vendor Logo.
The optical sensor 715 is used to collect the ambient light intensity. In one embodiment, the processor 701 may control the display brightness of the display screen 705 based on the ambient light intensity collected by the optical sensor 715. Specifically, when the intensity of the ambient light is high, the display brightness of the display screen 705 is turned up; when the ambient light intensity is low, the display brightness of the display screen 705 is turned down. In another embodiment, the processor 701 may also dynamically adjust the shooting parameters of the camera assembly 706 based on the ambient light intensity collected by the optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is provided on the front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front face of the terminal 700 gradually decreases, the processor 701 controls the display 705 to switch from the bright screen state to the off screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually increases, the processor 701 controls the display screen 705 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 7 is not limiting of the terminal 700 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In some embodiments, the electronic device is provided as a server. Fig. 8 is a schematic diagram of a server according to an exemplary embodiment, where the server 800 may have a relatively large difference between configurations or performances, and may include one or more processors (Central Processing Units, CPU) 801 and one or more memories 802, where at least one program code is stored in the memories 802, and the at least one program code is loaded and executed by the processor 801 to implement the methods provided in the above-described method embodiments. Of course, the server may also have a wired or wireless network interface, a keyboard, an input/output interface, and other components for implementing the functions of the device, which are not described herein.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, which when executed by a processor of an electronic device, enables the electronic device to perform the steps performed by the terminal or the server in the above-described loading hint information display method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, a ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the steps performed by the terminal or the server in the above-described loading hint information display method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure 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 (27)

1. The method for displaying the loading prompt information is characterized by comprising the following steps:
when a data container corresponding to a page is operated, operating a component file corresponding to a component identifier based on the component identifier of the component in the page included in a configuration file of the data container, generating a data model corresponding to the component, and loading the data model into the data container;
Responding to the triggering operation of the component in the page, and calling a loading interface in a data model corresponding to the component;
When the loading interface runs, a first attribute updating message is sent to the component through the data model, the first attribute updating message is used for updating the state of loading prompt information corresponding to the component, and the first attribute updating message carries a first attribute value used for representing the display state;
and updating the state attribute of the loading prompt information corresponding to the component into the first attribute value through the component, and displaying the loading prompt information in the page.
2. The method for displaying loading hint information according to claim 1, wherein the sending, by the data model, a first attribute update message to the component when the loading interface is running, includes:
When the loading interface runs, updating a state attribute of the loading interface from a second attribute value to the first attribute value, wherein the state attribute is used for indicating the state of loading prompt information corresponding to the component, and the second attribute value represents a hidden state;
and sending the first attribute updating message to the component through the data model.
3. The loading hint information display method of claim 2, wherein the data model further comprises a scheduler; said sending, by said data model, said first attribute update message to said component, comprising:
when the loading interface runs, a second attribute updating message is sent to the scheduler, wherein the second attribute updating message carries the first attribute value and the component identifier of the component;
And sending, by the scheduler, the first attribute update message to the component.
4. The method for displaying loading prompt message according to claim 1, wherein after the triggering operation of the component in the page is responded, the loading prompt message displaying method further comprises:
and sending a data loading request to a server through the loading interface, wherein the server is used for returning corresponding data according to the data loading request.
5. The method for displaying loading prompt message according to claim 4, wherein the updating, by the component, the status attribute of the loading prompt message corresponding to the component to the first attribute value, after displaying the loading prompt message in the page, the method for displaying loading prompt message further comprises:
Responding to the data returned by the server acquired by the loading interface, and sending a third attribute updating message to the component through the data model when the loading interface runs, wherein the third attribute updating message is used for updating the state of the loading prompt information corresponding to the component, and the third attribute updating message carries a second attribute value used for representing the hidden state;
And updating the state attribute of the loading prompt information corresponding to the component into the second attribute value through the component, and canceling the display of the loading prompt information in the page.
6. The method for displaying loading hint information according to claim 5, wherein the sending a third attribute update message to the component through the data model when the loading interface is running, comprises:
When the loading interface runs, updating the state attribute of the loading interface from the first attribute value to the second attribute value;
And sending the third attribute updating message to the component through the data model.
7. The load hint information display method of claim 4, wherein the data model further comprises a subscription component identification that indicates a subscription component that invokes the data model; the loading prompt information display method further comprises the following steps:
Responding to the loading interface to acquire the data returned by the server, and updating the data in the data model according to the returned data;
and in response to the change of the data in the data model, sending a data update message to a subscription component in the data model, wherein the subscription component is corresponding to the subscription component identification, and the data update message indicates the subscription component to recall the data model.
8. The method of claim 7, wherein the data model further comprises a scheduler, the scheduler having the subscription component identification stored therein;
The sending, in response to a change in data in the data model, a data update message to a subscription component corresponding to a subscription component identifier in the data model, including:
And responding to the change of the data in the data model, and sending the data update message to a subscription component in the data model by identifying the corresponding subscription component based on a scheduler in the data model.
9. The method for displaying loading hint information according to claim 7, wherein the data model further includes a data update interface, and the responding to the loading interface to obtain the data returned by the server, and updating the data in the data model according to the returned data includes:
Responding to the loading interface to acquire the data returned by the server, and calling the data updating interface through the loading interface;
And updating the data in the data model according to the returned data through the data updating interface.
10. The method for displaying loading prompt information according to any one of claims 1-9, wherein before the triggering operation on the component in the page is responded, and the loading interface in the data model corresponding to the component is called, the method for displaying loading prompt information further comprises:
And when the data container is operated, converting the data of the component to obtain a data model of the component, wherein the data model comprises the loading interface and the state attribute of the loading interface.
11. The loading hint information display method of claim 10, wherein the loading hint information display method further comprises:
And when the target application is started, running the data container of the target application.
12. The load hint information display method of any one of claims 1-9, wherein the data model includes a data processing interface, the load interface being generated at runtime of the data processing interface.
13. A loading hint information display device, characterized in that the loading hint information display device comprises:
a unit configured to perform the steps of: when a data container corresponding to a page is operated, operating a component file corresponding to a component identifier based on the component identifier of the component in the page included in a configuration file of the data container, and generating a data model corresponding to the component;
A loading unit configured to perform loading of the data model into the data container;
The calling unit is configured to execute a triggering operation for responding to the component in the page and call a loading interface in a data model corresponding to the component;
The sending unit is configured to send a first attribute updating message to the component through the data model when the loading interface runs, wherein the first attribute updating message is used for updating the state of loading prompt information corresponding to the component, and the first attribute updating message carries a first attribute value used for representing the display state;
And the display unit is configured to update the state attribute of the loading prompt information corresponding to the component into the first attribute value through the component, and display the loading prompt information in the page.
14. The loading hint information display device of claim 13, wherein the sending unit includes:
A first updating subunit, configured to update, when the loading interface runs, a state attribute of the loading interface from a second attribute value to the first attribute value, where the state attribute is used to indicate a state of loading prompt information corresponding to the component, and the second attribute value characterizes a hidden state;
a sending subunit configured to send the first attribute update message to the component via the data model.
15. The loading hint information display device of claim 14, wherein the data model further comprises a scheduler; the sending subunit is configured to send a second attribute update message to the scheduler when the loading interface runs, wherein the second attribute update message carries the first attribute value and the component identifier of the component; and sending, by the scheduler, the first attribute update message to the component.
16. The loading hint information display device of claim 13 wherein,
The sending unit is further configured to send a data loading request to a server through the loading interface, and the server is used for returning corresponding data according to the data loading request.
17. The loading hint information display device of claim 16 wherein,
The sending unit is further configured to perform responding to the data returned by the server acquired by the loading interface, and send a third attribute updating message to the component through the data model when the loading interface runs, wherein the third attribute updating message is used for updating the state of the loading prompt information corresponding to the component, and the third attribute updating message carries a second attribute value used for representing the hidden state;
And the display unit is further configured to update the state attribute of the loading prompt information corresponding to the component to the second attribute value through the component, and cancel the display of the loading prompt information in the page.
18. The loading hint information display device of claim 17, wherein the sending unit includes:
A first updating subunit configured to perform updating, when the load interface is running, a state attribute of the load interface from the first attribute value to the second attribute value;
a sending subunit configured to send the third attribute update message to the component via the data model.
19. The load hint information display apparatus of claim 16, wherein the data model further comprises a subscription component identification that indicates a subscription component that invokes the data model; the loading prompt information display device further comprises:
the updating unit is configured to execute the data in the data model according to the returned data, which is obtained by the loading interface and returned by the server;
The sending unit is further configured to perform sending, in response to a change of data in the data model, a data update message to a subscription component corresponding to a subscription component identifier in the data model, the data update message indicating that the subscription component recalls the data model.
20. The loading hint information display device of claim 19, wherein the data model further comprises a scheduler having the subscription component identification stored therein;
The transmitting unit includes:
A sending subunit configured to perform sending the data update message to a subscription component in the data model identifying a corresponding subscription component based on a scheduler in the data model in response to a change in data in the data model.
21. The loading hint information display device of claim 19, wherein the data model further comprises a data update interface, the update unit comprising:
A calling subunit, configured to execute the data updating interface through the loading interface in response to the loading interface obtaining the data returned by the server;
And the second updating subunit is configured to update the data in the data model according to the returned data through the data updating interface.
22. The loading hint information display device of any one of claims 13-21, wherein the loading hint information display device further comprises:
And the conversion unit is configured to execute the conversion of the data of the component when the data container is operated to obtain a data model of the component, wherein the data model comprises the loading interface and the state attribute of the loading interface.
23. The loading hint information display device of claim 22, wherein the loading hint information display device further comprises:
and an execution unit configured to execute the data container that runs the target application when the target application is started.
24. The loading hint information display device of any one of claims 13-21, wherein the data model includes a data processing interface, the loading interface generated at runtime of the data processing interface.
25. An electronic device, the electronic device comprising:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
Wherein the one or more processors are configured to perform the load hint information display method of any of claims 1 to 12.
26. A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the loading hint information display method of any of claims 1 to 12.
27. A computer program product, characterized in that instructions in the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the loading hint information display method of any of claims 1 to 12.
CN202011508006.1A 2020-12-18 2020-12-18 Loading prompt information display method and device, electronic equipment and storage medium Active CN112596810B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011508006.1A CN112596810B (en) 2020-12-18 2020-12-18 Loading prompt information display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011508006.1A CN112596810B (en) 2020-12-18 2020-12-18 Loading prompt information display method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112596810A CN112596810A (en) 2021-04-02
CN112596810B true CN112596810B (en) 2024-05-14

Family

ID=75199396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011508006.1A Active CN112596810B (en) 2020-12-18 2020-12-18 Loading prompt information display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112596810B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391165A (en) * 2017-06-01 2017-11-24 阿里巴巴集团控股有限公司 Control display methods, client and storage medium
WO2018149365A1 (en) * 2017-02-17 2018-08-23 腾讯科技(深圳)有限公司 Data acquisition method, mobile terminal, and server
CN110309441A (en) * 2018-03-09 2019-10-08 阿里巴巴集团控股有限公司 Page display method, device and equipment
CN110515688A (en) * 2019-08-28 2019-11-29 广州酷狗计算机科技有限公司 Page display method, device, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018149365A1 (en) * 2017-02-17 2018-08-23 腾讯科技(深圳)有限公司 Data acquisition method, mobile terminal, and server
CN107391165A (en) * 2017-06-01 2017-11-24 阿里巴巴集团控股有限公司 Control display methods, client and storage medium
CN110309441A (en) * 2018-03-09 2019-10-08 阿里巴巴集团控股有限公司 Page display method, device and equipment
CN110515688A (en) * 2019-08-28 2019-11-29 广州酷狗计算机科技有限公司 Page display method, device, terminal and storage medium

Also Published As

Publication number Publication date
CN112596810A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN113204298B (en) Method and device for displaying release progress, electronic equipment and storage medium
CN113127130B (en) Page jump method, device and storage medium
CN110677713B (en) Video image processing method and device and storage medium
CN112612539B (en) Data model unloading method and device, electronic equipment and storage medium
CN113051015B (en) Page rendering method and device, electronic equipment and storage medium
CN113204302B (en) Virtual robot-based operation method, device, equipment and storage medium
CN107943484B (en) Method and device for executing business function
CN110569064B (en) Interface identifier generation method, device, equipment and storage medium
CN112181442B (en) Unloading page display method, device, terminal, server and storage medium
CN112612540B (en) Data model configuration method, device, electronic equipment and storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN111275607A (en) Interface display method and device, computer equipment and storage medium
CN111064657A (en) Method, device and system for grouping concerned accounts
CN116418771A (en) Message display method, message processing method, device and electronic equipment
CN113485596B (en) Virtual model processing method and device, electronic equipment and storage medium
CN112596810B (en) Loading prompt information display method and device, electronic equipment and storage medium
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN110941458B (en) Method, device, equipment and storage medium for starting application program
CN110390065B (en) Webpage acquisition method, device and system
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium
CN113268234A (en) Page generation method, device, terminal and storage medium
CN112783533A (en) Version information updating method, version information updating device, terminal and storage medium
CN112231619A (en) Conversion method, conversion device, electronic equipment and storage medium
CN111275561B (en) Method, device, computer equipment and storage medium for acquiring association relation

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