CN112596810A - 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
CN112596810A
CN112596810A CN202011508006.1A CN202011508006A CN112596810A CN 112596810 A CN112596810 A CN 112596810A CN 202011508006 A CN202011508006 A CN 202011508006A CN 112596810 A CN112596810 A CN 112596810A
Authority
CN
China
Prior art keywords
component
data
loading
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.)
Granted
Application number
CN202011508006.1A
Other languages
Chinese (zh)
Other versions
CN112596810B (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

Images

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 loading prompt information display method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. The loading prompt information display method comprises the following steps: the method comprises the steps of responding to triggering operation of components in a page, calling a loading interface in a data model corresponding to the components, sending a first attribute updating message to the components through the data model when the loading interface runs, updating the state attribute of loading prompt information corresponding to the components into a first attribute value through the components, displaying the loading prompt information in the page, configuring the state attribute for the loading interface in the data model, automatically updating the state attribute of the loading interface when the loading interface runs, and automatically adjusting the state attribute of the loading prompt information corresponding to the components based on the updated state attribute to enable the loading prompt information to be displayed in the page.

Description

Loading prompt information display method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying loading hint information, an electronic device, and a storage medium.
Background
Generally, an applied page is composed of a plurality of components, and as computer technology develops, the functions of the page are more and more rich and varied. When a triggering operation is executed on a component in the page, corresponding loading prompt information can be displayed in the page to prompt a user that data is being loaded.
In the related art, when a technician configures data of a component in an application page, the technician needs to configure a group of codes in a modification state for each interface corresponding to the component, and when a trigger operation is performed on the component in the page, the component can call the corresponding interface to load the data and execute the codes in the modification state corresponding to the interface, so that the state of loading prompt information in the page is modified into a display state, and the loading prompt information is displayed in the page. However, this approach requires a set of code for modifying the state for each interface, resulting in a large amount of data for the components in the page and increased cost.
Disclosure of Invention
The disclosure provides a loading prompt information display method and device, electronic equipment and a storage medium, and improves the development efficiency of applications.
According to an aspect of the embodiments of the present disclosure, a method for displaying loading hint information is provided, where the method for displaying loading hint information includes:
responding to the triggering operation of the components in the page, and calling a loading interface in a data model corresponding to the components;
when the loading interface runs, sending a first attribute updating message to the component through the data model, 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 a display state;
and updating the state attribute of the loading prompt message corresponding to the component into the first attribute value through the component, and displaying the loading prompt message in the page.
According to the method 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.
In some embodiments, said sending a first attribute update message to said component through said data model while said load 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;
sending, by the data model, the first attribute update message to the component.
When the loading interface runs, the state attribute of the loading interface is automatically updated, the state attribute of the loading indication information is automatically updated by sending a first attribute update message to the component, and the state attribute of the loading prompt information can be automatically updated without arranging a corresponding code for modifying the state attribute.
In some embodiments, the data model further comprises a scheduler; the sending, by the data model, the first attribute update message to the component includes:
when the loading interface runs, sending a second attribute updating message to the dispatcher, wherein the second attribute updating message carries the first attribute value and the component identifier of the component;
sending, by the scheduler, the first attribute update message to the component.
And sending a first attribute updating message to the component through a scheduler in the data model, so that interaction between the data model and the component is realized, subsequent components can update the loading prompt information through the first attribute updating message, and the automatic display of the loading prompt information is realized.
In some embodiments, after the invoking of the loading interface in the data model corresponding to the component in response to the triggering operation on the component in the page, 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.
Through the loading interface, corresponding data can be obtained from the server, so that corresponding functions can be realized through returned data subsequently.
In some embodiments, the updating, by the component, the state attribute of the loading prompt information corresponding to the component to the first attribute value, and after the loading prompt information is displayed in the page, the loading prompt information display method further includes:
responding to 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 loading prompt information corresponding to the component, and the third attribute updating message carries a second attribute value used for representing a hidden state;
and updating the state attribute of the loading prompt message corresponding to the component to the second attribute value through the component, and canceling the display of the loading prompt message in the page.
After the loading interface acquires the data returned by the server, the state attribute of the loading interface is automatically updated when the loading interface runs, 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 cancelled and displayed in the page.
In some embodiments, said sending a third attribute update message to said component through said data model while said load interface is running comprises:
updating the state attribute of the loading interface from the first attribute value to the second attribute value when the loading interface runs;
sending, by the data model, the third attribute update message to the component.
When the loading interface runs, the state attribute of the loading interface is automatically updated, and the state attribute of the loading indication information is automatically updated by sending a third attribute updating message to the component, so that the component can automatically update the state attribute of the loading indication information without arranging a corresponding code for modifying the state attribute, and the automatic updating of the state attribute of the loading indication information can be realized.
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 data returned by the server acquired by the loading interface, and updating the data in the data model according to the returned data;
and responding to the change of the data in the data model, and sending a data updating message to a subscription component corresponding to the subscription component identification in the data model, wherein the data updating message instructs 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 performs re-rendering according to the updated data model, and the 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 of a data update message to a subscription component in the data model that identifies a corresponding subscription component in response to a change in data in the data model comprises:
in response to a change in data in the data model, 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.
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, the data updating 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 updating the data in the data model according to the data returned by the server in response to the data returned by the server being acquired by the load interface further includes:
calling the data updating interface through the loading interface in response to the loading interface acquiring the data returned by the server;
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 before the invoking of 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;
loading the data model into the data container.
Through converting the data of the component, the data of the component is stored in the data container in the form of a data model, and the data model is used as a basic unit, so that the component can be conveniently expanded, different data models can be mutually called, and the application flexibility is improved.
In some embodiments, the loading prompt information display method further includes:
upon launching a target application, running the data container of the target application.
In some embodiments, the data model includes a data processing interface, the load interface being 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 prompt information display apparatus including:
the calling unit is configured to execute a triggering operation responding to a component in a page and call a loading interface in a data model corresponding to the component;
a sending unit, configured to execute, when the loading interface runs, sending a first attribute update message to the component through the data model, where the first attribute update message is used to update a state of loading prompt information corresponding to the component, and the first attribute update message carries a first attribute value used to represent a display state;
and the display unit is configured to update the state 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.
In some embodiments, the sending unit includes:
a first updating subunit, configured to execute, when the load interface runs, updating a state attribute of the load interface from a second attribute value to the first attribute value, where the state attribute is used to indicate a state of load hint information corresponding to the component, and the second attribute value represents a hidden state;
a sending subunit configured to perform sending the first attribute update message to the component through the data model.
In some embodiments, the data model further comprises a scheduler; the sending subunit is configured to send, when the load interface runs, a second attribute update message to the scheduler, where the second attribute update message carries the first attribute value and the component identifier of the component; sending, by the scheduler, the first attribute update message to the component.
In some embodiments, the sending unit is further configured to execute sending, by the load interface, a data load request to a server, where the server is configured to return corresponding data according to the data load request.
In some embodiments, the sending unit is further configured to execute, in response to the load interface acquiring data returned by the server, sending, by the data model, a third attribute update message to the component when the load interface is running, where the third attribute update message is used to update a state of load prompt information corresponding to the component, and the third attribute update message carries a second attribute value used to represent a hidden state;
the display unit is further configured to update the state attribute of the loading prompt message corresponding to the component to the second attribute value through the component, and cancel displaying the loading prompt message in the page.
In some embodiments, the sending unit includes:
a first updating subunit configured to execute, when the load interface runs, updating the state attribute of the load interface from the first attribute value to the second attribute value;
a sending subunit configured to perform sending the third attribute update message to the component through 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 includes:
the updating unit is configured to execute the steps of responding to the data returned by the server acquired by the loading interface, and updating the data in the data model according to the returned data;
the sending unit is further configured to execute sending, in response to a change of data in the data model, a data update message to a subscription component identified in the data model, where the data update message instructs the subscription component to recall 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, based on a scheduler in the data model, the data update message to a subscription component in the data model that identifies a corresponding subscription component 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:
the calling subunit is configured to execute the data returned by the server in response to the acquisition of the data by the loading interface, and call the data updating interface through the loading interface;
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 prompt information display device further includes:
the conversion unit is configured to convert the data of the component to obtain a data model of the component when the data container is operated, wherein the data model comprises the loading interface and the state attribute of the loading interface;
a loading unit configured to perform loading of the data model into the data container.
In some embodiments, the loading prompt information display device further includes:
an execution unit configured to execute the data container of a target application when the target application is started.
In some embodiments, the data model includes a data processing interface, the load interface being 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 apparatus 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 load prompt information display method of the above aspect.
According to yet another aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of 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 the above aspect.
According to yet another aspect of the embodiments of the present disclosure, there is provided a computer program product, wherein when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the loading prompt information display method according to 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 present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method for load hint information display in accordance with an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a method for load hint information display in accordance with an exemplary embodiment.
FIG. 3 is a schematic diagram of a React frame, shown in accordance with an exemplary embodiment.
FIG. 4 is a flow diagram illustrating a component invoking a data model in accordance with an exemplary embodiment.
Fig. 5 is a block diagram illustrating a load prompt information display apparatus according to an example embodiment.
Fig. 6 is a block diagram illustrating a load prompt information display apparatus according to an example embodiment.
Fig. 7 is a block diagram illustrating a terminal according to an example embodiment.
FIG. 8 is a block diagram illustrating a server in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in 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 and claims of the present disclosure and in the description of the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
As used in this disclosure, the terms "at least one," "a plurality," "each," "any," at least one includes one, two, or more than two, and a plurality includes two or more than two, each referring to each of the corresponding plurality, and any referring to any one of the plurality. For example, the plurality of data models includes 3 data models, each of the 3 data models refers to each of the 3 data models, and any one of the 3 data models refers to any one of the 3 data models, which may be the first one, the second one, or the third one.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) referred to in 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, a computer, or the like. 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 intended to briefly explain the principles of the present disclosure, and fig. 1 is a flowchart illustrating a loading prompt information display method 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 a loading interface in the data model corresponding to the components.
In the embodiment of the present disclosure, a page includes a component, which is an arbitrary component, for example, a component providing a search function, or a component providing a sliding operation, and the like. Each component corresponds to a data model, and the data model comprises a loading interface. The loading interface is an interface for loading data, for example, if the component is a component providing a search function, the loading interface is an interface for loading data related to a search term; or, the component is a component providing a page jump function, and the loading interface is an interface for loading data of a page to be jumped. The trigger operation on the component is any operation, for example, the trigger operation is a click operation, a drag operation, or another operation.
In the page display process, when a trigger operation is performed on a component in a page, which indicates that a function of the component needs to be implemented, for example, a search function or a page jump function, a load interface in a data model corresponding to the component needs to be called, so that data is loaded through the load interface subsequently, and the function of the component is implemented.
102. The computer device sends a first attribute update message to the component through the data model while the load interface is running.
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 message according to the first attribute value carried in the first attribute updating message.
103. And the computer equipment updates the state attribute of the loading prompt message corresponding to the component into a first attribute value through the component, and displays the loading prompt message 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, the state attribute of the loading prompt message is updated according to the obtained first attribute value, so that the state attribute of the loading prompt message is the first attribute value, the first attribute value is represented as a display state, rendering is carried out according to the state attribute after the loading prompt message is updated, and the loading prompt message 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 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.
Fig. 2 is a flowchart illustrating a loading prompt information display method 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 a loading interface in the data model corresponding to the components.
In the embodiment of the present disclosure, a page includes a component, which is an arbitrary component, for example, a component providing a search function, or a component providing a sliding operation, and the like. In some embodiments, the page includes a plurality of components, and the component that performs the trigger 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 load interface is an interface included in the data for the component. The loading interface is an interface for loading data, for example, if the component is a component providing a search function, the loading interface is an interface for loading data related to a search term; or, the component is a component providing a page jump function, and the loading interface is an interface for loading data of a page to be jumped. The triggering operation on the component is any operation, and in some embodiments, the triggering operation is a click operation, a drag operation, or other operations.
In the page display process, when a trigger operation is performed on a component in a page, which indicates that a function of the component needs to be implemented, for example, a search function or a page jump function, a load interface in a data model corresponding to the component needs to be called, so that data is loaded through the load interface subsequently, and the function of the component is implemented.
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 run, and the loading interface is generated. In addition, when the data processing interface is operated, besides the loading interface, other interfaces can be generated.
202. And when the loading interface runs, the computer equipment updates the state attribute of the loading interface from the second attribute value to the first attribute value.
The state attribute is used to indicate a state of loading prompt information corresponding to the component, where the loading prompt information is information used to indicate that data is being loaded, and the loading prompt information is, for example, graphical information or text information. The state attribute includes a first attribute value or a second attribute value, the second attribute value characterizing a hidden state, the first attribute value characterizing a displayed state. For example, the state attribute is loading attribute, the second attribute value is false, and the first attribute value is true.
In the embodiment of the present 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 calls the loading interface, the loading interface is operated to update the state attribute of the loading interface from the second attribute value to the first attribute value.
In some embodiments, the data model is stored in the 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, and then the state attribute is configured for a loading interface included in the data model in the process of loading the data model of the component into the data container. The loading interface in the data model is configured with state data, so that when the loading interface is called, the state of the loading prompt information corresponding to the component is adjusted, the loading prompt information is displayed in a page, and the loading of data is prompted.
In a possible implementation manner of the foregoing 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, a state attribute is configured for each interface included in the data model, 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 the load interface and other interfaces are generated when the data processing interface is running, and the generated load interface and other interfaces have corresponding state attributes. For example, when a data processing interface of the data model runs, a load interface is generated, or a function (e.g., increaseAsync) is loaded, and when a trigger operation is performed on a component corresponding to the data model, an asynchronous processing interface (e.g., handleAsync) corresponding to the component is called, and the increaseAsync in the data model is called through the handleAsync, so that a state attribute (effect.
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 message corresponding to the component, and the first attribute updating message carries a first attribute value. After the state attribute of the loading interface is updated, a first attribute updating message is sent to the component through the data model, so that the component can know that the state attribute of the loading interface is updated, and the subsequent component can update the state attribute of the loading prompt message according to a first attribute value carried in the first attribute updating message.
In one possible implementation, the data model further comprises a scheduler; this step 203 comprises: and sending a second attribute updating message to the dispatcher when the loading interface runs, and sending the first attribute updating message to the component through the dispatcher.
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 identifier of the component. And in the operation process of the loading interface, sending a second attribute updating message to the scheduler through the loading interface so that the scheduler determines the component to be updated according to the component identifier in the second attribute updating message, and then sending a first attribute updating message to the determined component by the scheduler so that the subsequent component updates the state attribute of the corresponding loading prompt message according to the first attribute updating message.
It should be noted that, in the embodiment of the present disclosure, the updating of the state attribute of the loading interface is first updated, and then the first attribute update message is sent to the component, but in another embodiment, step 203 and step 204 do not need to be executed, and when the loading interface runs, the first attribute update message can be sent to the component through the data model in other ways.
204. And the computer equipment updates the state attribute of the loading prompt message corresponding to the component into a first attribute value through the component, and displays the loading prompt message 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, the state attribute of the loading prompt message is updated according to the obtained first attribute value, so that the state attribute of the loading prompt message is the first attribute value, the first attribute value is represented as a display state, rendering is carried out according to the state attribute after the loading prompt message is updated, and the loading prompt message 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 "loading", the component updates the state attribute of the loading prompt information corresponding to the component to the first attribute value, and then displays the word "loading" in the page to prompt the user that data is currently being loaded.
205. The computer equipment 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 term. 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: and 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 sends the obtained data to the computer equipment.
In some embodiments, the loading interface is a search data loading interface, and step 205 includes: and sending a search data loading request to the 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 state attribute of the loading hint information corresponding to the component is updated first, and then the data loading request is sent to the server, for example, in another embodiment, after step 201, the process of updating the state attribute of the loading hint information corresponding to the component is performed in synchronization 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 hint 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 and indicates that the data is loaded completely, the state attribute of the loading interface is updated to a second attribute value from the first 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.
And the third attribute updating message carries a second attribute value. And 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 a second attribute value carried by the third attribute updating message.
In one possible implementation, the data model further includes a scheduler, and step 207 includes: and when the loading interface runs, sending a fourth attribute updating message to the dispatcher, and sending a third attribute updating message to the component through the dispatcher.
And the fourth attribute updating message carries the second attribute value and the component identifier of the component. And in the running process of the loading interface, sending a fourth attribute updating message to the scheduler through the loading interface so that the scheduler determines the component to be updated according to the component identifier in the fourth attribute updating message, and then sending a third attribute updating message to the determined component by the scheduler so that the subsequent component updates the state attribute of the corresponding loading prompt message according to the third attribute updating message. In the embodiment of the present disclosure, after the state attribute of the loading interface is updated, the loading interface sends an attribute update message to the scheduler, the scheduler sends the attribute update message to the component, and the attribute update messages are sequentially transmitted, so that multi-party interaction among the loading interface, the scheduler, and the component to be updated is realized, and finally, an effect of notifying the component to be updated that the state attribute of the loading interface is updated is achieved, so that the component to be updated can timely obtain an attribute value of the loading function after the state attribute is updated, and a subsequent component adjusts the loading prompt information according to the obtained attribute value.
It should be noted that, in the embodiment of the present disclosure, when the loading interface acquires 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, but in another embodiment, step 206 and step 207 do not need to be executed, and in response to the data acquired by the loading interface and 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. And the computer equipment updates the state attribute of the loading prompt message corresponding to the component into a second attribute value through the component, and cancels and displays the loading prompt message in the page.
After the component receives the third attribute updating message, a second attribute value carried by the third attribute updating message is acquired, the state attribute of the loading prompt message is updated according to the acquired second attribute value, so that the state attribute of the loading prompt message is the second attribute value, the second attribute value is represented as a hidden state, rendering is carried out according to the state attribute after the loading prompt message is updated, and the loading prompt message can be cancelled and displayed in a page to represent that the data is loaded completely.
In some embodiments, after step 205, the method further comprises the following steps 209-210:
209. and responding to the data returned by the server acquired by the loading interface, 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 as to enable the components in the page to be triggered to be updated subsequently. For example, if the value (value) stored in the data model is 1 and the returned data indicates that the value is 2, the value in the data model is 2 after the data in the data model is updated.
In some embodiments, the data model further comprises a data update interface, step 209 comprising: and responding to the data returned by the server acquired by the loading interface, 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.
The data updating interface is used for updating data in the data model, calling the data updating interface after the data returned by the server is acquired through the loading interface, and updating the data in the data model according to the data returned by the server through the data updating interface so as to enable the corresponding component to be re-rendered subsequently.
In a possible implementation manner of the foregoing embodiment, the data model further includes a data storage interface, where the data storage interface is used 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. 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 a data update function (Reducer), and data processing interfaces (Effects), and after the Effects receive a data update request, the Reducer is called, and the data stored in the State is updated 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 identifying a corresponding subscription component in response to a change in data in the data model.
Wherein the data update message instructs the subscription component to recall the data model. The data model also includes a subscription component identification indicating 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 the data model includes the component identifications of component 1, component 2, and component 3.
And the subscription component calls the data model, and sends a data updating message to the subscription component when the data of the data model is changed, so that the subscription component calls the data model again after receiving the data updating message, and the subscription component is shown again by the changed data model.
In a possible implementation manner of the foregoing embodiment, the data model further includes a scheduler, where the scheduler stores a subscription component identifier; then step 210 includes: and responding to the change of the data in the data model, and sending a data updating message to the subscription component corresponding to the subscription component identification in the data model 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 changes, the 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 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.
The data container is a container for loading data of the component, and 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, that is, the data container is a global data container; or, the application includes a plurality of pages, each page corresponds to a data container, and the data models corresponding to the plurality of components in each page are stored in the corresponding data containers, so that the data containers are local data containers.
When the target application is started, the data of the components in the page are converted, and the converted data model is loaded into the data container, so that the page can be displayed through the data model in the data container subsequently, and in the page display process, when the components in the page are operated, corresponding instructions can be executed through the data models corresponding to the components, so that the 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 applications. For example, when the target application is a browsing application, the page is a page in the browsing application.
In a possible implementation manner of the foregoing embodiment, the process of generating the data model in the data container includes the following steps 211 and 214:
211. the computer device stores the component files named by the component identifications of the components under the specified directory.
In the embodiment of the disclosure, a page of an 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 file of the component with the configuration file of the data container, a data model can be generated for the associated component subsequently when the data container runs, so that the subsequent component can call the data model in the data container, and the display of the page is realized.
The component identifier of the component is a unique identifier for indicating the component, and in the embodiment of the present disclosure, the component identifiers of different components are different. A component file is a form of storage of data that includes the data for a component. In some embodiments, the component file is stored in the form of a script.
The specified directory is used to store component files of the component, and in some embodiments, the specified directory is a directory corresponding to a page to which the component belongs. That is, in the specified directory, not only the component file of the component but also the component files of other components in the page to which the component belongs can be stored. In some embodiments, the specified directory is a directory corresponding to a plurality of pages, and the plurality of pages include a page to which the component belongs. Then, 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 components in other pages may be stored.
The component file is named by the component identifier of the component and is stored in the specified directory, so that the component file can be subsequently associated with the data container, and the data container can generate a data model for the component based on the component file.
212. The computer device adds the component identification of the component in the configuration file of the data container.
Because the component file is named by the component identifier of the component under the specified directory, the component identifier of the component is added in the configuration file of the data container, so that the configuration file of the data container is associated with the component file named by the component identifier, and the component file can be run through the configuration file when the data container is run subsequently, so as to generate a data model of the newly added component.
In some embodiments, the data container is a global data container for the application, or alternatively, is a local data container for the application. For example, for an application, the data models corresponding to all components of the application are stored in a data container, that is, the data container is a global data container; or, the application includes a plurality of pages, each page corresponds to a data container, and the data models corresponding to the plurality of components in each page are stored in the corresponding data containers, so that the data containers are local data containers.
In some embodiments, the configuration file of the data container also includes component identifications of other components.
Wherein, other component files of the component are named by the component identification of the other component, and the other component files are also stored in the specified directory, and the other component files comprise data of the other component. 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 then through the 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, one data container corresponds to one page, the specified directory is a directory corresponding to the page, component files of components in the page and configuration files of the data container are stored in the specified directory, and the configuration files include component identifiers corresponding to a plurality of component files in the specified 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 component associated with the configuration file to obtain a data model of the component.
In some embodiments, the components with 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 associated component is determined through the configuration file, the data of the associated component is converted, the data model of the component is generated, the container aggregation effect of the data container is achieved, 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 data sharing among the data models of the multiple components is achieved.
In some embodiments, the data model includes a data updating interface, a data processing interface, and a data storage interface, where the data in the data model is stored in the data storage interface, the data updating 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 invocation interface is generated while the data processing interface is running. Through the model calling interface, other data models can be called.
In some embodiments, the model calling interface includes an interface for calling a data updating interface of another data model, and any data model can call the data updating interface of another data model by calling the interface of the data updating interface of another data model, and update data in the data storage interface of another data model by using the data updating interface of another data model.
In some embodiments, this step 213 includes: and when responding to the application starting, operating the data container, and converting the data of the component associated with the configuration file to obtain the data model of the component.
In the embodiment of the present disclosure, the component is a component in the page of the application, and when the application is started, the data model of the component is obtained by operating the data container, so that the page of the application is subsequently displayed by adding the data model of the component.
In some embodiments, this step 213 includes: and when the data container is operated, converting the data of the components associated with the configuration file through the analyzer to obtain the data model of the components. The parser is used for converting the data of the component into a data model. In some embodiments, the parser is provided by the React (a script library that builds user interfaces) framework, which is a development architecture.
In some embodiments, the data container is a data container corresponding to the target application, and before step 203, the method further includes: when the target application is started, the data container of the target application is run. When the target application is started, the data container of the target application is operated, so that the 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 component associated with the configuration file, responding to the passing of the boundary check, and converting the data of the component associated with the configuration file to obtain a data model of the component. Wherein the bounds check is used to check the data format of the component. And performing boundary check on the data of the component to ensure the accuracy of the data of the component and ensure the accuracy of the generated data model.
In one possible implementation of the above embodiment, the data of the component corresponds to a reference format, the boundary check of the data of the component is determined to pass in response to the data of the component satisfying the reference format, and the boundary check of the data of the component is determined to fail in response to the data of the component not satisfying the reference format.
214. The computer device stores the data model in the data container in correspondence with the component identification of the corresponding component.
The data model is stored in the data container corresponding to the component identification of the corresponding component, so that the corresponding data model can be inquired through the component identification in the following.
In some embodiments, a mount container is included in the data container, and the data model is stored in the mount container. For example, after a plurality of data models are generated, a mount container is generated for each data model, and the mount 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 display of the page 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 an React (script library for constructing a user interface) framework, and the user interface can be constructed based on the React framework. For example, the React development framework is a ReactHooks (a new component construction approach) framework. In the development system of the React framework, the page of the application is composed of components, and data among the components are transmitted in a unidirectional mode. 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 to an application page, the component can be updated by associating the component file of the newly added component with the configuration file of the data container, all data in the data container does not need to be reconfigured, the flexibility of application 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 asynchronously requesting to automatically update the page view is configured for the React frame, the loading prompt information is displayed on the page in the data loading process, and the information loading prompt information is cancelled on the page after the data loading is completed, so that the user experience is enhanced by displaying the form of the loading prompt information in the data loading process of the page.
According to the method 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 when sending a data loading request to the server, automatically updating the state attribute of the loading prompt information corresponding to the component through interaction between the data model and the component, so that the loading prompt information is displayed in the page, and after data returned by the server is obtained, automatically updating the state attribute of the loading prompt information corresponding to the component through interaction between the data model and the component, so that the loading prompt information is cancelled and displayed in the page, thereby realizing automatic updating of the page.
And when the loading interface runs, the state attribute of the loading interface is automatically updated, and the state attribute of the loading indication information is automatically updated by sending a first attribute updating message to the component, so that the component can automatically update the state attribute of the loading indication information without arranging a corresponding code for modifying the state attribute, and the automatic updating of the state attribute of the loading indication information can be realized.
And the first attribute updating message is sent to the component through a scheduler in the data model, so that the interaction between the data model and the component is realized, the subsequent component can update the loading prompt message through the first attribute updating message, and the automatic display of the loading prompt message is realized.
And after the loading interface acquires the data returned by the server, the state attribute of the loading interface is automatically updated when the loading interface runs, 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 cancelled and displayed in the page.
And 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 performs re-rendering according to the updated data model, and the automatic updating of the page is realized.
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, the data updating message is sent to the subscription component, so that the data model called by the subscription component can be updated in time.
And the data of the component is converted, the data of the component is stored in the data container in the form of the data model, and the data model is used as a basic unit, so that the component can be conveniently expanded, different data models can be mutually called, and the application flexibility is improved.
Based on the loading prompt information display method provided by the embodiment, a schematic diagram of an actual frame is provided, and as shown in fig. 3, the display of a page can be realized through the actual frame.
For a target application comprising a plurality of pages, each page comprising a plurality of components, configuring a data container for each page, creating a specified directory for each page. For any page, naming the component files of the components in the page by the identifiers of the components, storing the component files in a designated directory corresponding to the page, storing the configuration files of a data container in the designated directory, and adding the component identifiers corresponding to a plurality of component files in the designated directory in the configuration files to realize the association between the components and the data container.
When the target application is started, the data container is operated, the component file is subjected to boundary check to ensure the accuracy of the component file, after the boundary check of the component file passes, the component file related to the configuration file of the data container is converted into a data model through a parser and the container aggregation action of the data container, a mounting container is established for each data model in the data container, and the data model is stored in the mounting container. And storing the subscription component identification of the data model in the scheduler of each data model.
The data model in the data container is mounted on the component in the page display through the container in which the data container is mounted, so that the component can send the model calling message to the data container through the mounting container, the data container carries out model indexing on the component identification carried in the model calling message to determine the data model corresponding to the component identification, and 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, the data storage interface, the data updating interface and the data processing interface which are included by 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 load prompt information display apparatus according to an example embodiment. Referring to fig. 5, the loading alert information display apparatus includes:
the calling unit 501 is configured to execute a triggering operation on a component in a page, and call a loading interface in a data model corresponding to the component;
a sending unit 502, configured to execute, when the loading interface runs, sending a first attribute update message to the component through the data model, where the first attribute update message is used to update a state of loading prompt information corresponding to the component, and the first attribute update message carries a first attribute value used to represent a display state;
and the display unit 503 is configured to update the state 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.
The device provided by the embodiment of the disclosure configures the state attribute for the loading interface in the data model, can automatically update the state attribute of the loading interface when the loading interface runs, and automatically adjusts the state attribute of the loading prompt information corresponding to the component based on the updated state attribute, so that the loading prompt information is displayed in the page.
In some embodiments, as shown in fig. 6, the sending unit 502 includes:
the first updating subunit 5021 is configured to update the state attribute of the loading interface from a second attribute value to a first attribute value when the loading interface runs, where the state attribute is used to indicate the state of the loading prompt information corresponding to the component, and the second attribute value represents a hidden state;
a sending subunit 5022 is configured to perform sending a first attribute update message to the component via the data model.
In some embodiments, the data model further comprises a scheduler; a sending subunit 5022, configured to execute, when the load interface runs, sending a second attribute update message to the scheduler, 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 dispatcher.
In some embodiments, the sending unit 502 is further configured to execute sending, through the loading interface, a data loading request to a server, 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 execute, in response to the load interface acquiring data returned by the server, sending, by using a data model, a third attribute update message to the component when the load interface is running, where the third attribute update message is used to update a state of load prompt information corresponding to the component, and the third attribute update message carries a second attribute value used to represent a hidden state;
the display unit 503 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 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 execute, when the load interface runs, updating the state attribute of the load interface from the first attribute value to the second attribute value;
a transmitting subunit 5022 configured to perform transmitting 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 prompt information display device further includes:
an updating unit 504, configured to execute, in response to the load interface acquiring the data returned by the server, updating the data in the data model according to the returned data;
the sending unit 502 is further configured to execute sending, in response to a change of data in the data model, a data update message to the subscription component in the data model, where the subscription component identifies a corresponding subscription component, and the data update message instructs the subscription component to recall the data model.
In some embodiments, the data model further comprises a scheduler having a subscription component identification stored therein;
as shown in fig. 6, the transmitting unit 502 includes:
a sending subunit 5022 configured to perform sending a data update message to a subscribing component in the data model to identify a corresponding subscribing 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 includes a data update interface, as shown in fig. 6, the update unit 504 includes:
a calling sub-unit 5041, configured to execute, in response to the load interface acquiring the data returned by the server, calling a data update interface through the load interface;
a second updating sub-unit 5042 configured to perform updating of data in the data model according to the returned data through the data updating interface.
In some embodiments, as shown in fig. 6, the loading prompt information display device further includes:
the conversion unit 505 is configured to perform conversion on 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 prompt information display device 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 load interface is generated at runtime of the data processing interface.
In an exemplary embodiment, there is also provided an electronic device, characterized in that the electronic device 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 execute the steps executed by the terminal or the server in the loading prompt 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 example 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 video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. Terminal 700 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and so on.
The terminal 700 includes: a processor 701 and a memory 702.
The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 701 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); 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) which is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 701 may further 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. 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 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 buses or signal lines. Various peripheral devices may be connected to peripheral interface 703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704, a display screen 705, a camera assembly 706, an audio circuit 707, a positioning component 708, and a power source 709.
The peripheral interface 703 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 701 and the memory 702. In some embodiments, processor 701, memory 702, and peripheral interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 704 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 704 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 704 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 704 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 704 may also include NFC (Near Field Communication) related circuits, which are not limited by this 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 screen 705 is a touch display screen, the display screen 705 also has the ability to capture touch signals on or over the surface of the display screen 705. The touch signal may be input to the processor 701 as a control signal for processing. At this point, the display 705 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 705 may be one, disposed on a front panel of the terminal 700; in other embodiments, the display 705 can 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 on 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 the like.
The camera assembly 706 is used to capture images or video. Optionally, 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 number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 707 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, 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 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 700. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 701 or the radio frequency circuit 704 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 707 may also include a headphone jack.
The positioning component 708 is used to locate the current geographic Location of the terminal 700 for navigation or LBS (Location Based Service). The Positioning component 708 can be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 709 is provided to supply power to various components of terminal 700. The power source 709 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power source 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, terminal 700 also includes one or more sensors 710. The one or more sensors 710 include, but are not limited to: acceleration sensor 711, gyro sensor 712, pressure sensor 713, fingerprint sensor 714, optical sensor 715, and proximity sensor 716.
The acceleration sensor 711 can detect the magnitude of acceleration in three coordinate axes of a coordinate system established with the terminal 700. For example, the acceleration sensor 711 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 701 may control the display screen 705 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 may also be used for 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 cooperate with the acceleration sensor 711 to acquire a 3D motion of the terminal 700 by the user. From the data collected by the gyro sensor 712, the processor 701 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 713 may be disposed on a side frame of terminal 700 and/or underneath display 705. When the pressure sensor 713 is disposed on a side frame of the terminal 700, a user's grip signal on the terminal 700 may be detected, and the processor 701 performs right-left hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 713. When the pressure sensor 713 is disposed at a 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 control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 714 is used for collecting a fingerprint of a user, and the processor 701 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or the fingerprint sensor 714 identifies the identity of the user according to the collected fingerprint. When the user identity is identified as a trusted identity, the processor 701 authorizes the user to perform relevant sensitive operations, including unlocking a screen, viewing encrypted information, downloading software, paying, changing settings, and the like. The fingerprint sensor 714 may be disposed on the front, back, or side of the terminal 700. When a physical button or a vendor Logo is provided on the terminal 700, the fingerprint sensor 714 may be integrated with the physical button or the 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 ambient light intensity is high, the display brightness of the display screen 705 is increased; when the ambient light intensity is low, the display brightness of the display screen 705 is adjusted down. In another embodiment, processor 701 may also dynamically adjust the shooting parameters of camera assembly 706 based on the ambient light intensity collected by optical sensor 715.
A proximity sensor 716, also referred to as a distance sensor, is disposed on a front panel of the terminal 700. The proximity sensor 716 is used to collect the distance between the user and the front surface of the terminal 700. In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 gradually decreases, the processor 701 controls the display 705 to switch from the bright screen state to the dark screen state; when the proximity sensor 716 detects that the distance between the user and the front surface of the terminal 700 is gradually increased, the processor 701 controls the display 705 to switch from the breath-screen state to the bright-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not intended to be limiting of terminal 700 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In some embodiments, the electronic device is provided as a server. Fig. 8 is a schematic structural diagram of a server according to an exemplary embodiment, where the server 800 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 801 and one or more memories 802, where the memory 802 stores at least one program code, and the at least one program code is loaded and executed by the processors 801 to implement the methods provided by the method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input/output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, which, when a program code in the storage medium is executed by a processor of an electronic device, enables the electronic device to perform the steps performed by a terminal or a server in the above-described load hint information display method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is further provided, and when instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the steps executed by the terminal or the server in the above loading prompt 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 variations, uses, or adaptations of the disclosure following, in general, the 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 will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A loading prompt information display method is characterized by comprising the following steps:
responding to the triggering operation of the components in the page, and calling a loading interface in a data model corresponding to the components;
when the loading interface runs, sending a first attribute updating message to the component through the data model, 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 a display state;
and updating the state attribute of the loading prompt message corresponding to the component into the first attribute value through the component, and displaying the loading prompt message in the page.
2. The method for displaying loading prompt information according to claim 1, wherein the sending a first attribute update message to the component through the data model when the 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;
sending, by the data model, the first attribute update message to the component.
3. The load hint information display method of claim 2, wherein the data model further comprises a scheduler; the sending, by the data model, the first attribute update message to the component includes:
when the loading interface runs, sending a second attribute updating message to the dispatcher, wherein the second attribute updating message carries the first attribute value and the component identifier of the component;
sending, by the scheduler, the first attribute update message to the component.
4. The method according to claim 1, wherein after the step of calling the load interface in the data model corresponding to the component in response to the triggering operation on the component in the page, the 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 according to claim 4, wherein the updating, by the component, the state attribute of the load hint information corresponding to the component to the first attribute value, and after displaying the load hint information in the page, the method further comprises:
responding to 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 loading prompt information corresponding to the component, and the third attribute updating message carries a second attribute value used for representing a hidden state;
and updating the state attribute of the loading prompt message corresponding to the component to the second attribute value through the component, and canceling the display of the loading prompt message in the page.
6. The method according to claim 5, wherein the sending a third attribute update message to the component through the data model while the load interface is running comprises:
updating the state attribute of the loading interface from the first attribute value to the second attribute value when the loading interface runs;
sending, by the data model, the third attribute update message to the component.
7. The load hint information display method of claim 4, wherein the data model further comprises a subscription component identification, the subscription component identification indicating a subscription component that invokes the data model; the loading prompt information display method further comprises the following steps:
responding to the data returned by the server acquired by the loading interface, and updating the data in the data model according to the returned data;
and responding to the change of the data in the data model, and sending a data updating message to a subscription component corresponding to the subscription component identification in the data model, wherein the data updating message instructs the subscription component to recall the data model.
8. A loading presentation information display apparatus, comprising:
the calling unit is configured to execute a triggering operation responding to a component in a page and call a loading interface in a data model corresponding to the component;
a sending unit, configured to execute, when the loading interface runs, sending a first attribute update message to the component through the data model, where the first attribute update message is used to update a state of loading prompt information corresponding to the component, and the first attribute update message carries a first attribute value used to represent a display state;
and the display unit is configured to update the state 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.
9. An electronic device, characterized in that the electronic device comprises:
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 prompt information display method of any one of claims 1 to 7.
10. 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 a load hint information display method as recited in any one of claims 1 through 7.
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 true CN112596810A (en) 2021-04-02
CN112596810B 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
CN112596810B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN110308956B (en) Application interface display method and device and mobile terminal
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN113127130B (en) Page jump method, device and storage medium
CN108717365B (en) Method and device for executing function in application program
CN111858382A (en) Application program testing method, device, server, system 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
CN112770177B (en) Multimedia file generation method, multimedia file release method and device
CN107943484B (en) Method and device for executing business function
CN112118353A (en) Information display method, device, terminal and computer readable storage medium
CN112597417B (en) Page updating method and device, electronic equipment and storage medium
CN112612540B (en) Data model configuration method, device, electronic equipment and storage medium
CN111580892A (en) Method, device, terminal and storage medium for calling service component
CN109618018B (en) User head portrait display method, device, terminal, server and storage medium
CN113076452A (en) Application classification method, device, equipment and computer readable storage medium
CN113268234A (en) Page generation method, device, terminal and storage medium
CN114140105A (en) Resource transfer method, device, equipment and computer readable storage medium
CN112596810B (en) Loading prompt information display method and device, electronic equipment and storage medium
CN112783533A (en) Version information updating method, version information updating device, terminal and storage medium
CN113064537B (en) Media resource playing method, device, equipment, medium and product
CN114071119B (en) Resource testing method and device, electronic equipment and storage medium
CN113342645B (en) Method, device, equipment and storage medium for testing business function
CN111464457B (en) Method, device and system for managing flow calculation model

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