CN114691946A - Data query method and electronic equipment - Google Patents

Data query method and electronic equipment Download PDF

Info

Publication number
CN114691946A
CN114691946A CN202011645223.5A CN202011645223A CN114691946A CN 114691946 A CN114691946 A CN 114691946A CN 202011645223 A CN202011645223 A CN 202011645223A CN 114691946 A CN114691946 A CN 114691946A
Authority
CN
China
Prior art keywords
data query
data
query request
electronic device
query requests
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.)
Pending
Application number
CN202011645223.5A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011645223.5A priority Critical patent/CN114691946A/en
Publication of CN114691946A publication Critical patent/CN114691946A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90348Query processing by searching ordered data, e.g. alpha-numerically ordered data

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a method for querying data and electronic equipment, wherein the method comprises the following steps: the electronic device may generate a plurality of data query requests, filter invalid data query requests therein, and adjust an order of remaining data query requests, and then process the data query requests in the adjusted order. Therefore, the resource waste in the data query process can be reduced, the data query efficiency is improved, the electronic equipment is prevented from processing the data query requests only according to the generation sequence, and the experience of the user is improved.

Description

Data query method and electronic equipment
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to a method for querying data and an electronic device.
Background
With the rapid development of internet technology, more and more services can be processed online through corresponding applications, which also causes the applications to need frequent data queries. When the number of data query requests is increased, the efficiency of data query is gradually reduced, which prolongs the time for the user to wait for data loading.
Disclosure of Invention
The application provides a data query method and electronic equipment, the data query method can filter invalid data query requests, readjust the sequence of the rest data query requests, and improve the efficiency of data query.
In a first aspect, an embodiment of the present application provides a data query method, where the method includes: the electronic equipment generates a plurality of data query requests; the electronic equipment can delete part of data query requests in the plurality of data query requests to obtain a first data query request; the electronic equipment adjusts the sequence of each data query request in the first data query request; and the electronic equipment sequentially acquires the data requested by each data query request in the first data query request according to the adjusted sequence.
By implementing the method of the first aspect, the electronic device filters a part of the data query requests, so that the redundancy of the data query requests and the waste of resources in the data query process can be reduced, and the data query speed is increased; the electronic equipment adjusts the sequence of each data query request in the first data query request, so that the electronic equipment can be prevented from processing the data query requests only according to the generation sequence, and the experience of a user is improved.
With reference to the first aspect, in an embodiment, before the electronic device generates the plurality of data query requests of the first application, the method further includes: the electronic equipment receives a first operation and displays a first user interface; within a first time after receiving the first operation, the electronic equipment receives a second operation and displays a second user interface; the plurality of data query requests can comprise a second data query request, and the data requested by the second data query request is the data required by the first user interface;
that is to say, the electronic device may regard the data query request with the shorter page dwell time as an invalid data query request, so that the electronic device may regard the user interface that is quickly switched by the user as an invalid interface, cancel loading of data on the invalid interface, and increase the loading speed of data that the user wants to query.
With reference to the first aspect, in one implementation, the electronic device may delete any one of the same data query requests in the plurality of data query requests.
With reference to the first aspect, in an implementation manner, the electronic device may only retain one of the identical data query requests, and delete the other identical data query requests.
Therefore, the same data query requests generated by repeated operation of the user can be filtered, and the efficiency of data query is improved.
With reference to the first aspect, in one implementation, the electronic device receives a third operation, and may display a third user interface; the electronic equipment receives the fourth operation and can display a fourth user interface; the electronic equipment receives the fifth operation and can display a third user interface; the plurality of data query requests may include a third data query request, where data requested by the third data query request is data required by a fourth user interface; the third data query request is an invalid data query request, and the electronic device may delete the third data query request.
Therefore, the method can determine whether the data query request is an invalid data query request by checking the user interfaces appearing before and after the data query request is generated, and avoid wasting the time for querying data due to misoperation of a user.
With reference to the first aspect, in one implementation, the electronic device may delete a data query request, which is generated for a time greater than a first time threshold, from the plurality of data query requests.
Therefore, the electronic equipment can delete the data query request generated at an earlier time, reduce the redundancy of the request queue and improve the efficiency of data query.
With reference to the first aspect, in an implementation, the electronic device may adjust an order of each data query request in the first data query request according to one or more of the following: the generation time of the first data query request; the larger the generation time is, the later the corresponding data query request is; a usage of the data requested by the first data query request; when the requested data is higher in the degree perceived by the user, the corresponding data query request is more advanced; or generating a screen state of the electronic equipment when the first data query request is generated; the screen state of the electronic device may include: lightening and unlocking the screen, lightening and locking the screen, and extinguishing the screen; the data query requests corresponding to the screen-up and unlocking are in front of the sequence of the data query requests corresponding to the screen-up and locking, and the data query requests corresponding to the screen-up and locking are in front of the sequence of the data query requests corresponding to the screen-down.
That is, the electronic device may determine the ranking order of the data query requests according to the following three features: generation time, data usage, screen status.
When the generation time is longer, the corresponding data query request is more backward, that is, the data query request generated later is easier to be processed preferentially. In this way, the user can more quickly view the data of the current query.
The usage of the data can be divided into: page display, voice broadcast, background use and process processing. According to the categories, the data query requests are gradually ordered backwards. Therefore, the electronic equipment can process the data which can be sensed by the user preferentially, and the time for waiting for the data loading by the user is shortened.
When the sequence of the data query requests is determined according to the screen state, the electronic equipment can dynamically adjust the efficiency of the data query requests according to the screen state, and the speed of data query when the screen is on is improved.
With reference to the first aspect, in one implementation, the electronic device may determine an order of data query requests according to the state of the application. Specifically, the data query requests generated when the application program is in the foreground running state are in a front order of the data query requests generated when the application program is in the background running state.
With reference to the first aspect, in an implementation manner, the electronic device may further determine an order of the data query requests according to states of the application and the screen. Specifically, the sequence of the data query requests can be determined according to the operation of a bright screen and an unlocking foreground, the operation of the bright screen and an unlocking background, the operation of the bright screen and a locking foreground, the operation of the bright screen and a locking background, the operation of a screen-off foreground and the operation of a screen-off background.
With reference to the first aspect, in an implementation manner, before the electronic device adjusts the order of the data query requests in the first data query request, the electronic device may determine a priority of each data query request in the first data query request; the electronic equipment adjusts the sequence of each data query request in the first data query request according to the priority; wherein, the higher the priority, the earlier the corresponding data query request.
Therefore, the data query requests can be set with priority, and the sequence of the data query requests is adjusted according to the priority.
With reference to the first aspect, in one implementation, the electronic device determines the priority of the fourth data query request according to one or more of the following: generating time, data use and screen state; the fourth data query request is any one of the first data query requests; the larger the generation time of the fourth data query request is, the lower the priority of the fourth data query request is; the higher the degree of the data requested by the fourth data query request perceived by the user is, the higher the priority of the fourth data query request is; when the screen state of the electronic equipment is respectively bright screen and unlocked screen, bright screen and locked screen and off screen when the fourth data query request is generated, the priority of the fourth data query request is gradually reduced; the generation time of the fourth data query request, the purpose of the requested data, and the screen state of the electronic device at the time of generation are the same or different in degree of influence on the priority of the fourth data query request.
Specifically, the priority of the data query request may be determined according to the following formula:
Priority=C1F1+C2F2+C3F3+…+CnFn
wherein Priority represents the Priority of the data query request.
FiAnd the score corresponding to the ith characteristic in the data query request is represented, wherein the characteristic can be generation time, data application, screen state and the like. Wherein i is 1,2,3 …, n. n is the number of predetermined features.
CiIndicating the weight that the ith feature takes in the priority of the data query request. C is not less than 0iLess than or equal to 1 and
Figure BDA0002880843360000031
Ci=1。
with reference to the first aspect, in an implementation manner, after the electronic device sequentially obtains, according to the adjusted sequence, data requested by each data query request in the first data query request, the electronic device processes the data, where the processing may include one or more of the following: displaying the data, voice broadcasting the data, converting the data into a graphic, calculating the data, or storing the data.
With reference to the first aspect, in one implementation, the plurality of data query requests includes: the data query request generated by the electronic equipment in response to the received user operation and/or the data query request periodically generated by the electronic equipment.
With reference to the first aspect, in an implementation manner, the electronic device periodically deletes a part of the data query requests in the plurality of data query requests to obtain first data query requests, and adjusts an order of each data query request in the first data query requests; or after generating the latest data query request in the plurality of data query requests, the electronic device deletes part of the data query requests in the plurality of data query requests to obtain a first data query request, and adjusts the sequence of each data query request in the first data query request; or when the number of the plurality of data query requests reaches a first value, deleting part of the data query requests in the plurality of data query requests to obtain the first data query request, and adjusting the sequence of each data query request in the first data query request.
That is, the method may periodically filter invalid data query requests and adjust the order of the remaining data query requests, or trigger the filtering and order adjusting operation when generating a new data query request is to trigger the filtering and order adjusting operation, or trigger the filtering and order adjusting operation when the number of data query requests reaches a certain value.
With reference to the first aspect, in one implementation, the plurality of data query requests may include: a data query request generated by a motion application program; the data requested by the data query request generated by the motion class application program comprises the following data: exercise data, health data; wherein the motion data comprises one or more of: the exercise steps, the exercise distance, the exercise time, the heat, the exercise track, the exercise type and the exercise heart rate; the health data includes one or more of: body weight, heart rate, sleep duration, body fat, blood pressure, blood glucose, and blood oxygen saturation.
With reference to the first aspect, in one implementation, the plurality of data query requests may include: the data query request is generated by the intelligent equipment management application program; the data requested by the data query request generated by the intelligent device management application program comprises the following data: the intelligent device management application program manages the state of the device and the running data of the device.
With reference to the first aspect, in one implementation, the plurality of data query requests may include: a data query request generated by a vehicle management application program; the data requested by the data query request generated by the vehicle management application program comprises the following data: information of the vehicle and travel data of the vehicle managed by the vehicle management application; wherein the information of the vehicle comprises one or more of: license plate number, vehicle type, person responsible, vehicle type, and unit of use; the driving data of the vehicle includes one or more of: travel time, travel track, travel direction, travel speed, remaining oil amount, location.
With reference to the first aspect, in one embodiment, before the electronic device generates the plurality of data query requests, the first application may be run; wherein the plurality of data query requests include: a data query request of the first application.
With reference to the first aspect, in one implementation, the first application may include a plurality of applications, and the data query request may be a data query request of the plurality of applications.
In a second aspect, an embodiment of the present application provides an electronic device, which may include: a display screen, a memory, one or more processors; the display screen, memory coupled with the one or more processors, the memory to store computer program code, the computer program code including computer instructions, the one or more processors to invoke the computer instructions to cause the electronic device to perform the following: generating a plurality of data query requests; deleting part of the data query requests in the plurality of data query requests to obtain a first data query request; adjusting the sequence of each data query request in the first data query request; and sequentially acquiring the data requested by each data query request in the first data query request according to the adjusted sequence.
Therefore, the electronic equipment filters a part of the data query requests, so that the redundancy of the data query requests and the waste of resources in the data query process can be reduced, and the data query speed is increased; the electronic equipment adjusts the sequence of each data query request in the first data query request, so that the electronic equipment can be prevented from processing the data query requests only according to the generation sequence, and the experience of a user is improved.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: before generating a plurality of data query requests of a first application program, receiving a first operation and displaying a first user interface; receiving a second operation within a first time after receiving the first operation, and displaying a second user interface; the data query requests comprise second data query requests, and the data requested by the second data query requests are data required by the first user interface; the electronic device recognizes the second data query request as an invalid data query request and deletes the second data query request.
That is to say, the electronic device regards the data query request with the shorter page dwell time as an invalid data query request, so that the electronic device can regard the user interface switched by the user quickly as an invalid interface, cancel loading of data on the invalid interface, and increase the loading speed of data that the user wants to query.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: any one of the same data query requests among the plurality of data query requests is deleted.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: and keeping one of the same data query requests, and deleting other same data query requests.
Therefore, the electronic equipment can filter the same data query requests generated by repeated operation of the user, and the efficiency of data query is improved.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: receiving a third operation before generating a plurality of data query requests, and displaying a third user interface; receiving a fourth operation, and displaying a fourth user interface; receiving a fifth operation, and displaying a third user interface; the data requested by the third data query request is data required by a fourth user interface; the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform the following operations: the third data query request is deleted.
Therefore, the electronic equipment can determine whether the data query request is an invalid data query request by checking the user interfaces appearing before and after the data query request is generated, and the waste of data query time caused by misoperation of a user is avoided.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: deleting the data query requests of the plurality of data query requests, the generation time of which is greater than the first time threshold.
Therefore, the electronic equipment can delete the data query request generated at an earlier time, reduce the redundancy of the request queue and improve the efficiency of data query.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: adjusting an order of respective data query requests in the first data query request according to one or more of: the generation time of the first data query request; the larger the generation time is, the later the corresponding data query request is; a purpose of the data requested by the first data query; when the requested data is higher in the degree perceived by the user, the corresponding data query request is more advanced; or generating the screen state of the electronic equipment when the first data query request is generated; the screen state of the electronic device may include: the screen is lightened and unlocked, and the screen is lightened and locked and extinguished; the sequence of the data query requests corresponding to the screen lightening and unlocking is earlier than the sequence of the data query requests corresponding to the screen lightening and locking, and the sequence of the data query requests corresponding to the screen lightening and locking is earlier than the sequence of the data query requests corresponding to the screen extinguishing.
That is, the electronic device may determine the ranking order of the data query requests according to the following three features: generation time, data usage, screen status.
When the generation time is longer and the corresponding data query request is later, the later generated data query request is easier to be processed preferentially, and the user can view the currently queried data more quickly.
The usage of the data can be divided into: page display, voice broadcast, background use and process processing. According to the categories, the data query requests are gradually ordered backwards. Therefore, the electronic equipment can process the data which can be sensed by the user preferentially, and the time for waiting for the data loading by the user is shortened.
When the sequence of the data query requests is determined according to the screen state, the electronic equipment can dynamically adjust the efficiency of the data query requests according to the screen state, and the speed of data query when the screen is on is improved.
In one embodiment, in combination with the second aspect, the electronic device may determine the order of the data query requests according to the application state. Specifically, the data query requests generated when the application program is in the foreground running state are in a front order of the data query requests generated when the application program is in the background running state.
With reference to the second aspect, in one embodiment, the electronic device may further determine an order of the data query requests according to the states of the application and the screen. Specifically, the sequence of the data query requests can be determined according to the functions of screen lightening and unlocking foreground operation, screen lightening and unlocking background operation, screen lightening and locking foreground operation, screen lightening and locking background operation, screen extinguishing foreground operation and screen extinguishing background operation.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: before adjusting the sequence of each data query request in the first data query request, determining the priority of each data query request in the first data query request; the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform the following operations: adjusting the sequence of each data query request in the first data query request according to the priority; wherein, the higher the priority, the earlier the corresponding data query request.
In this way, the electronic device can set a priority for the data query requests, and adjust the order of the data query requests according to the priority.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: determining a priority of the fourth data query request based on one or more of: generating time, data use and screen state; the fourth data query request is any one of the first data query requests; the larger the generation time of the fourth data query request is, the lower the priority of the fourth data query request is; the higher the degree of the data requested by the fourth data query request perceived by the user is, the higher the priority of the fourth data query request is; when the screen state of the electronic equipment is respectively bright screen and unlocked screen, bright screen and locked screen and off screen when the fourth data query request is generated, the priority of the fourth data query request is gradually reduced; the generation time of the fourth data query request, the purpose of the requested data, and the screen state of the electronic device at the time of generation are the same or different in degree of influence on the priority of the fourth data query request.
Specifically, the electronic device may determine the priority of the data query request according to the following formula:
Priority=C1F1+C2F2+C3F3+…+CnFn
wherein Priority represents the Priority of the data query request.
FiAnd the score corresponding to the ith characteristic in the data query request is represented, wherein the characteristic can be generation time, data application, screen state and the like. Wherein i is 1,2,3 …, n. n is the number of predetermined features.
CiIndicating the weight that the ith feature takes in the priority of the data query request. C is not less than 0iLess than or equal to 1 and
Figure BDA0002880843360000061
Ci=1。
in combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: according to the adjusted sequence, after data requested by each data query request in the first data query request is acquired in sequence, the data is processed, and the processing comprises one or more of the following items: displaying the data, voice broadcasting the data, converting the data into a graphic, calculating the data, or storing the data.
With reference to the second aspect, in one embodiment, the plurality of data query requests may include: data query requests generated in response to received user operations, and/or data query requests generated periodically.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: periodically deleting part of the data query requests in the plurality of data query requests to obtain first data query requests, and adjusting the sequence of each data query request in the first data query requests; or after generating the latest data query request in the plurality of data query requests, deleting part of the data query requests in the plurality of data query requests to obtain a first data query request, and adjusting the sequence of each data query request in the first data query request; or when the number of the plurality of data query requests reaches a first value, deleting part of the data query requests in the plurality of data query requests to obtain the first data query request, and adjusting the sequence of each data query request in the first data query request.
That is, the electronic device may periodically filter invalid data query requests and adjust the order of the remaining data query requests, or trigger the filtering and order adjusting operation when generating a new data query request is an operation of triggering the filtering and order adjusting operation, or trigger the filtering and order adjusting operation when the number of data query requests reaches a certain value.
With reference to the second aspect, in one embodiment, the plurality of data query requests includes: a data query request generated by a motion application program; the data requested by the data query request generated by the motion class application program comprises the following data: exercise data, health data; wherein the motion data comprises one or more of: the exercise steps, the exercise distance, the exercise time, the heat, the exercise track, the exercise type and the exercise heart rate; the health data includes one or more of: body weight, heart rate, sleep duration, body fat, blood pressure, blood glucose, and blood oxygen saturation.
With reference to the second aspect, in one embodiment, the plurality of data query requests includes: the data query request is generated by the intelligent equipment management application program; the data requested by the data query request generated by the intelligent device management application program comprises the following data: the intelligent device management application program manages the state of the device and the running data of the device.
With reference to the second aspect, in one embodiment, the plurality of data query requests includes: a data query request generated by a vehicle management application program; the data requested by the data query request generated by the vehicle management application program comprises the following data: information of a vehicle managed by the vehicle management application, and travel data of the vehicle; wherein the information of the vehicle includes one or more of: license plate number, vehicle type, person responsible, vehicle type and use unit; the driving data of the vehicle includes one or more of: travel time, travel track, travel direction, travel speed, remaining oil amount, location.
In combination with the second aspect, in one embodiment, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform the following operations: before generating a plurality of data query requests, operating a first application program; wherein the plurality of data query requests may include: a data query request of the first application.
With reference to the second aspect, in one embodiment, the first application may include a plurality of applications, and the request for data query may be a data query request of the plurality of applications.
In a third aspect, the present application provides a computer-readable storage medium including instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in the first aspect or any one of the implementation manners of the first aspect.
In a fourth aspect, the present application provides a computer program product, which when run on a computer, causes the computer to perform the method as described in the first aspect or any one of the implementation manners of the first aspect.
By implementing the technical scheme provided by the embodiment of the application, the electronic equipment filters a part of data query requests, so that the redundancy of the data query requests and the waste of resources in the data query process can be reduced, and the data query speed is increased; the electronic equipment adjusts the sequence of each data query request in the first data query request, so that the electronic equipment can be prevented from processing the data query requests only according to the generation sequence, and the experience of a user is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below.
FIG. 1 is a schematic diagram of a cross-process communication;
FIG. 2 is a diagram illustrating a data query process in the prior art;
fig. 3 is a hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a software structure diagram of an electronic device according to an embodiment of the present application;
5A-5K are a set of user interfaces implemented on an electronic device provided by an embodiment of the application;
FIG. 6 is an overall flow of a data query method provided in an embodiment of the present application;
FIG. 7 is a diagram illustrating an electronic device processing a data query request according to an embodiment of the present application;
fig. 8 is a front-back comparison diagram of optimizing data query by the data query method provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail and clearly with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" in the text is only an association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B may mean: three cases of a alone, a and B both, and B alone exist, and in addition, "a plurality" means two or more than two in the description of the embodiments of the present application.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of the application, unless stated otherwise, "plurality" means two or more.
The term "User Interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application program or an operating system and a user, and implements conversion between an internal form of information and a form acceptable to the user. The user interface is source code written by java, extensible markup language (XML) and other specific computer languages, and the interface source code is analyzed and rendered on the electronic equipment and finally presented as content which can be identified by a user. A commonly used presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be a visual interface element such as text, an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc. displayed in the display of the electronic device.
The data query method provided by the embodiment of the application can be applied to an application program which can perform cross-process communication and has a request queue mechanism. The application may be installed and run in the electronic device. Inter-process communication (IPC), which is Inter-process communication, refers to a process of data exchange between a foreground process and a background process.
Wherein, the interaction of electronic equipment and external world can be realized to the proscenium process. The interaction of the electronic device with the outside world may include, but is not limited to: the electronic device displays visual interface elements, plays audio, vibrates a motor, receives and responds to user actions, and the like. The background process provides data query service for the foreground process. The data query service may include, but is not limited to: querying data involved when the electronic device displays a visible interface element, and data involved when the electronic device plays audio.
FIG. 1 illustrates a schematic diagram of cross-process communication. As shown in fig. 1, the application includes a foreground process and a background process during the running process.
Referring to fig. 2, fig. 2 illustrates an example of a specific background process processing a data query request.
As shown in fig. 2, taking "exercise health" application as an example, a foreground process of the electronic device may successively initiate the following data query requests:
q1, inquiring the movement distance, movement heat, movement time and heart rate;
q2, inquiring sleeping time and weight;
and Q3, inquiring the movement pace and the movement track.
After the background process receives the 3 data query requests, the 3 data query requests are arranged in the request queue according to the initiating sequence. Then, the background process processes the data query requests in sequence according to the initiation sequence of the requests, namely processing the Q1, then processing the Q2 and finally processing the Q3. After the background process queries the corresponding data, the queried data can be sequentially returned to the foreground process.
That is, during the running process of the application program, the foreground process may successively initiate a plurality of data query requests. Due to the limited data size during cross-process communication, in general, a foreground process can generate the data query requests in sequence and send the data query requests to a background process in sequence. After receiving a plurality of data query requests, the background process processes the data query requests in sequence according to the received sequence, that is, according to the actual generation sequence of the data query requests. That is, the background process will process the first generated data query request.
The mechanism for processing the data query request by the foreground and background processes shown in fig. 2 may result in a long time for the subsequently generated data query request to be responded. When the number of the data query requests increases, the time for the background process to process the data query requests increases, and the time for the user to wait for the data loading is prolonged. If the user quickly switches to another user interface, such as a motion record interface, and the foreground process sends a data query request about motion records to the background process, however, because a plurality of data query requests still exist in the request queue to be processed, the data query request about motion records currently cannot be processed in time, and the electronic device cannot display the motion records of the user in real time. That is, the electronic device can only process the data query requests in sequence according to the sequence in which the requests are initiated.
Not limited to the cross-process communication described above, in some embodiments, the application program may also enable the electronic device to interact with the outside world and provide data query services using a single process. Specifically, when an application program queries data by using a single process, the process may generate a plurality of data query requests internally, the plurality of data query requests are arranged in a request queue according to a generated sequence, and the process processes the data query requests according to the generated sequence to obtain data requested by the data query requests.
In order to solve the above-mentioned drawbacks, embodiments of the present application provide a data query method, in which, if an electronic device sequentially generates a plurality of data query requests during running an application, the electronic device may filter invalid data query requests therein, and may adjust an order of remaining data query requests according to a priority rule, and then sequentially process the data query requests according to the adjusted order. Therefore, the data query speed can be improved, and the experience of the user is improved.
The application program run by the electronic device may include a single application program or may include a plurality of application programs. When the electronic device is running a single application, multiple data query requests may be generated from the application. When the electronic device is running multiple applications, the multiple data query requests generated may come from the multiple applications.
When the electronic equipment runs any application program, the application program can carry out cross-process communication between a foreground process and a background process. The mechanism of cross-process communication, foreground process and background process can refer to the related description above. The foreground process can realize the interaction between the electronic equipment and the outside, and the background process provides data query service for the foreground process.
In other embodiments, the data query method provided by the embodiment of the present application is also applicable to any application program that utilizes a single process to realize interaction between the electronic device and the outside world, and in the process of providing a data query service. Specifically, the single process may internally filter invalid data query requests, adjust the order of the data query requests according to the priority rule, and then obtain the data requested by the data query requests according to the adjusted order.
The embodiments of the present application are not limited to the related application programs, which may include but are not limited to: sports-like applications, smart device management-like applications, vehicle management-like applications, social-like applications, learning-like applications, shopping-like applications, and the like.
The sports application is sports auxiliary software suitable for electronic devices such as smart phones and tablet computers. The application is used to manage exercise health data for a user. The exercise health data may include the following two data types: 1, the exercise data comprises data related to user exercise such as exercise step number, exercise distance, exercise time, heat, exercise track, exercise type, exercise heart rate and the like; and 2, health data, including weight, heart rate, sleeping time, body fat, blood pressure, blood sugar, blood oxygen saturation and other data related to the physical health of the user.
In some embodiments, the athletic health data may be data collected by the electronic device. In this case, the exercise health data may be stored in a memory of the electronic device.
In other embodiments, the athletic health data may be data collected by other electronic devices, such as wearable devices (e.g., wristbands, smartwatches, AR glasses, etc.). In this case, the electronic device may establish a connection with another electronic device through bluetooth, a wireless communication technology, or another wireless communication method, and acquire the exercise health data acquired by the other electronic device.
In other embodiments, the athletic health data may also be stored on a server (e.g., virtual server, cloud server). In this case, the electronic device may obtain the athletic health data from the server. For example, the electronic device or wearable device may upload the collected athletic health data to a server to store or backup the data so that when the user wants to view the data, the data saved in the server may be accessed by logging into an account.
Examples of sports class applications may include, but are not limited to: huacheng "sports wellness" application.
In the following embodiments of the present application, the electronic device may generate a plurality of data query requests during the process of running the application program. The data query requests may be generated autonomously by the electronic device or triggered by the user, which is not limited herein.
In the following embodiments of the present application, the invalid data query request may include, but is not limited to: the data query requests with the smaller page dwell time, the data query requests with the same page dwell time, the data query requests generated by misoperation and the data query requests with the larger page dwell time.
In the following embodiments of the present application, the electronic device may set a priority to each data query request according to a priority rule, and may rank the data query requests according to the priority. The higher the priority, the more forward the data query requests are ranked.
In particular, the priority rules may include the following:
1. the priority is determined according to the generation time of the data query request. The smaller the generation time of the data query request, the higher the priority of the data query request.
In this way, the later generated data query request is easier to be processed preferentially, and the data queried by the user at present is easier to be loaded preferentially, so that the waiting time of the user is shortened.
2. The priority is determined according to the data usage requested by the data query request. When the degree of the data requested by the data query request perceived by the user is higher, the priority of the data query request is higher, wherein the purpose of the data requested by the data query request can be divided into page display, voice broadcast, background use and process processing according to the degree of the perception of the user from high to low.
For example, data for presentation on the user interface may be loaded out faster than data for background processing. In this way, the user can more quickly view the data on the user interface.
3. The priority is set according to the screen state of the electronic equipment when the data query request is generated, and the priority of the data query request generated in the screen-on state can be higher than that of the data query request generated in the screen-off state. Thus, when the electronic equipment is in a bright screen state, the data can be inquired more quickly by the user.
It is understood that the priority rule in the embodiment of the present application includes, but is not limited to, the above-mentioned items.
In summary, the data query method provided by the embodiment of the application can improve the speed of data query by setting the priority, ensure that the data query request corresponding to the data that the user wants to query as soon as possible can be processed preferentially, reduce the waiting time of the user, meet the user demand, and improve the user experience.
The electronic device provided by the embodiment of the application is described below.
Fig. 3 exemplarily shows a structure of the electronic apparatus.
The electronic device may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or a special camera (e.g., a single lens reflex camera, a card camera), and the like, and the specific type of the electronic device is not limited in this application.
As shown in fig. 3, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
In this embodiment, the processor 110 is configured to sequentially generate a plurality of data query requests during the running of the application, filter invalid data query requests therein, and adjust the order of the remaining data query requests according to the priority rule, and then sequentially process the data query requests according to the readjusted order. The timing of the processor 110 generating the data query request, the judgment criterion of the invalid data query request, and the priority rule may refer to the detailed description of the subsequent method embodiment, which is not repeated here.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, the electronic device 100 may establish a connection with other electronic devices, such as a bracelet, a smart watch, VR glasses, smart home, and the like, through the wireless communication module 160 to obtain exercise health data collected by the other electronic devices.
In some embodiments, the electronic device 100 may establish a connection with a server through the mobile communication module 150 or the wireless communication module 160, and acquire data required by the electronic device 100 from the server, such as exercise health data, learning data, a state of the device, operation data of the device, information of the vehicle, driving data of the vehicle, and the like.
In some embodiments, the electronic device 100 may directly obtain relevant data, such as exercise health data, learning data, device status, device operation data, vehicle information, vehicle driving data, and the like, from other devices through the mobile communication module 150 or the wireless communication module 160.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS). In some embodiments, the electronic device 100 may acquire the motion trail of the user using the GPS.
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
In some embodiments, display screen 194 may be used to display a user interface involved in the running of an application by electronic device 100. See in particular the user interface provided in the subsequent embodiments.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
The random access memory may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), such as fifth generation DDR SDRAM generally referred to as DDR5 SDRAM, and the like;
the nonvolatile memory may include a magnetic disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, may include single-level cells (SLC), multi-level cells (MLC), three-level cells (TLC), four-level cells (QLC), etc. according to the level order of the memory cells, and may include universal FLASH memory (UFS), embedded multimedia memory cards (eMMC), etc. according to the storage specification.
The random access memory may be read and written directly by the processor 110, may be used to store executable programs (e.g., machine instructions) of an operating system or other programs in operation, and may also be used to store data of users and applications, etc.
The nonvolatile memory may also store executable programs, data of users and application programs, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
In some embodiments, internal memory 121 may be used to store data collected while electronic device 100 is running an application, as well as priority rules. The priority rule may be used by the electronic device 100 to set a priority for the data query request, which may be referred to in the following embodiments and will not be described herein.
The external memory interface 120 may be used to connect an external nonvolatile memory, so as to expand the storage capability of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are saved in an external nonvolatile memory.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call. In some embodiments, electronic device 100 may utilize speaker 170A to report the distance of the user's movement, prompt the user for heart rate fluctuation amplitude magnitude, and so forth.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals.
The headphone interface 170D is used to connect a wired headphone.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for identifying the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and the like. In some embodiments, the acceleration sensor 180E may be used to obtain the number of steps of the user's movement.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function. In some embodiments, the bone conduction sensor 180M may be used to acquire heart rate data for the user.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
Fig. 4 is a software configuration diagram of the electronic device 100 according to the embodiment of the present application.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention uses an Android system with a hierarchical architecture as an example to exemplarily explain a software structure of the electronic device 100.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
The application layer may include a series of application packages.
As shown in fig. 4, the application package may include sports applications, smart device management applications, vehicle management applications, social applications, learning applications, shopping applications, cameras, gallery, calendar, phone calls, music, WLAN, short messages, maps, bluetooth, video applications, and the like.
Sports applications, i.e., sports application programs, are sports assistance software suitable for electronic devices such as smart phones and tablet computers. Reference is made to the foregoing for a detailed description.
During the operation of the sports application, a plurality of data query requests may be sequentially generated, the electronic device 100 may filter invalid data query requests therein, and the remaining data query requests may be sequentially adjusted according to a priority rule.
The intelligent device management application, namely the intelligent device management application program, is device intelligent management software suitable for electronic devices such as mobile phones and tablet computers. The software can provide functions of visual management, remote monitoring, equipment state inquiry and the like for a plurality of intelligent equipment, and provides convenient intelligent equipment management service for users.
During the operation of the intelligent device management application, a plurality of data query requests may be sequentially generated, the electronic device 100 may filter invalid data query requests therein, and may adjust the order of the remaining data query requests according to the priority rule.
Vehicle management applications, i.e., vehicle management applications, are vehicle management software suitable for electronic devices such as smart phones and tablet computers. The software can realize real-time viewing, monitoring and scheduling of the vehicle and statistics of data, and help users manage and monitor the vehicle.
During the operation of the vehicle management application, the vehicle management application may sequentially generate a plurality of data query requests, the electronic device 100 may filter invalid data query requests therein, and may adjust the order of the remaining data query requests according to a priority rule.
Social applications, i.e., social application programs, are chat and friend-making software suitable for electronic devices such as smart phones and tablet computers. The software can provide functions of online chatting, video calling, file sharing and the like, and provides convenience for social contact of users.
During the operation of the social application program, a plurality of data query requests may be sequentially generated, the electronic device 100 may filter invalid data query requests therein, and the order of the remaining data query requests may be adjusted according to a priority rule.
The learning application is a learning application program, and is learning auxiliary software suitable for electronic devices such as smart phones and tablet computers. The software can provide functions of online one-to-one tutoring, network courses, question bank refreshing and the like, and provides high-quality online teaching service for users.
During the operation of the learning application, a plurality of data query requests may be sequentially generated, the electronic device 100 may filter invalid data query requests therein, and may adjust the order of the remaining data query requests according to the priority rule.
Shopping applications, namely shopping application programs, are online shopping software suitable for electronic devices such as smart phones and tablet computers. The software can provide functions of group purchase, auction, distribution and the like, and provides an online shopping retail platform for users.
During the operation of the shopping application, a plurality of data query requests may be sequentially generated, the electronic device 100 may filter invalid data query requests therein, and the remaining data query requests may be sequentially adjusted according to a priority rule.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 4, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scrollbar text in a status bar at the top of the system, such as a notification of a running application in the background, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
A set of user interfaces implemented on electronic device 100 is described below in connection with fig. 5A-5K.
In the user interfaces shown in fig. 5A-5K, the electronic device 100 is described as running an exercise application, such as the Huaqi "exercise health" application.
FIG. 5A illustrates an exemplary user interface 210 for an application menu on electronic device 100.
As shown in fig. 5A, the user interface 210 may include: a status bar 211, a tray with frequently used application tables 215, a calendar indicator 212, a weather indicator 213, a navigation bar 216, and other application icons 214. Wherein:
the status bar 211 may include one or more signal strength indicators for mobile communication signals, one or more signal strength indicators for wireless fidelity (WiFi) signals, a battery status indicator, and a time indicator. Calendar indicator 212 may be used to indicate the current time. Weather indicator 213 may be used to indicate the weather type.
The tray 215 with the common application icons may show: a dial icon 215A, an information icon 215B, a contacts icon 215C, and a camera icon 215D. Where the camera icon 215D may be used to open a camera application.
Navigation bar 216 may include: a return button 216C, a Home screen button 216B, a call task history button 216C, and other system navigation keys.
Other application icons 214 may include a mail icon 214A, a gallery icon 214B, a music icon 214C, and an athletic health icon 214D. Wherein the exercise health icon 214D may be used to launch an "exercise health" application. The other application icons 214 may also include more application icons, which are not limited in this embodiment.
The user interface 210 may also include a page indicator 217. Other application icons may be distributed across multiple pages and page indicator 217 may be used to indicate which page the user is currently browsing for applications in. The user may slide the area of the other application icons from side to browse the application icons in the other pages. Upon detecting that the user clicked on these application icons, electronic device 100 may display the user interface of the application.
In some embodiments, the user interface 210 illustratively shown in FIG. 5A may be a Home screen (Home Screen).
Referring to fig. 5A, electronic device 100 may detect a user operation (e.g., a click operation on athletic health icon 214D) on athletic health icon 214D, launch an "athletic health" application corresponding to icon 214D in response to the operation, and display user interface 310, which is exemplarily shown in fig. 5B.
As shown in fig. 5B, the user interface 310 may include: a first motion parameter bar 311, a second motion parameter bar 312, and a menu bar 313. Wherein:
the first exercise parameter column 311 may be used to show the present exercise data, such as exercise distance, exercise heat, exercise step number, etc.
The second athletic parameter bar 312 may be used to present recent athletic health data, such as athletic notes, heart rate, weight, etc.
The menu bar 313 includes a health icon 313A, a sports icon 313B, a device icon 313C, and a my icon 313D.
Among other things, the health icon 313A may be used to switch to a "health" user interface, which is the initial interface of the athletic health application, namely user interface 310.
The sports icon 313B may be used to switch to a "sports" user interface that may exhibit three sports modes (running outdoors, walking, cycling), which the user may select for sports.
Device icon 313C may be used to switch to a "device" user interface that may present other electronic devices, such as a bracelet, to which electronic device 100 has connected. The user can delete or connect the electronic equipment.
When the electronic device 100 displays the user interface 310, the present day athletic data in the first athletic parameter bar 311 and the recent athletic health data in the second athletic parameter bar 312 may be presented on the user interface 310.
The present motion data may be data collected by the electronic device 100, or may be data collected by other electronic devices, such as a user wearable device. The recent exercise health data may be data stored in the electronic device 100 or data stored on a server. For the source of the exercise health data, reference may be made to the foregoing description, and the description thereof is omitted here.
Furthermore, the electronic device 100 may detect a touch operation performed by the user to slide the user interface 310 up and down, and in response to the touch operation, the electronic device 100 may update or slide the content displayed on the user interface 310 to show more exercise health data.
As shown in fig. 5B, electronic device 100 may also detect a user operation by the user on motion icon 313B, in response to which electronic device 100 displays user interface 410 exemplarily shown in fig. 5C.
As shown in fig. 5C, motion options 411 are included in user interface 410. The sport options 411 include an outdoor run option 411A, a walk option 411B, and a ride option 411C. The user can select one of the motion options, and further select the corresponding motion mode to start the motion.
As shown in fig. 5C, the underlining below the outdoor run option 411A indicates that the outdoor run option 411A is selected, which when selected, may include in the user interface 410: moving object setup option 412, start moving control 413.
The athletic goal setting options 412 may be used, among other things, for the user to set goals for the exercise, such as distance, calories, time. Start motion control 413 may be used to turn on the outdoor running mode. Electronic device 100 may detect a user operation (e.g., a clicking operation) on start motion control 413 by the user, in response to which electronic device 100 initiates the outdoor running mode.
After entering the outdoor running mode, the electronic device 100 may acquire exercise health data of the user, such as exercise distance, exercise step number, exercise track, heart rate, and the like, by using the barometric sensor 180C, the acceleration sensor 180E, the bone conduction sensor 180M, and the like.
In other embodiments, in response to a user operation on start motion control 413 by the user, electronic device 100 may instruct the connected other electronic device, e.g., wearable device, to initiate an outdoor running mode, to begin collecting athletic health data for the user, such as number of athletic steps, calories burned, heart rate, and the like.
In addition, after entering the outdoor running mode, the electronic device 100 may also in some cases report the motion situation for the user by voice. For example, the electronic device 100 may broadcast the movement distance when the movement distance reaches an integer. When the user's heart rate is too high, electronic device 100 may broadcast the heart rate, prompting the user that the heart rate is too high. When the moving object is completed, the electronic device 100 reports the reached moving object.
As shown in fig. 5C, the electronic device may detect a user operation acting on the start motion control 411, in response to which the electronic device 100 may display a user interface 510 as exemplarily shown in fig. 5D.
As shown in fig. 5D, the user interface 510 includes a map display area 511, a data presentation area 512, a pause motion control 513, and the like.
The map display area 511 may update the map of the location of the user in real time, and may also indicate the current location of the user in the map.
The data presentation area 512 may display and update the exercise health data of the user, such as exercise time, pace, calories, etc., in real time.
Pause motion control 513 may be used to listen for user actions that trigger a pause motion. Electronic device 100 may detect a user operation acting on pause motion control 513, in response to which electronic device 100 may pause recording the user's athletic health data.
As shown in fig. 5E, when electronic apparatus 100 does not detect a user operation applied to user interface 510 by the user for a period of time, or electronic apparatus 100 detects a user operation applied to a power switch key (not shown), in response to which electronic apparatus 100 may enter a screen-off state. The off-screen state means that the electronic device 100 stops supplying power to the display screen. However, even if the electronic device 100 is in the off-screen state, the "sports health" application is still running. At this time, the electronic device 100 may turn on the voice broadcasting function, and when the movement distance reaches an integer, the movement distance is voice-broadcasted.
Thereafter, the electronic device 100 may detect a user operation on a power switch key (not shown) or a screen by the user, and the electronic device 100 may display the user interface 610 in the unlocked state, i.e., the locked state, as shown in fig. 5F.
As shown in fig. 5F, the user interface 610 includes a locator icon 611, a slide unlock region 612. The navigation icon 611 is used to indicate that the electronic device 100 is acquiring the location information of the user in real time, and the slide unlocking area 612 is used to unlock the screen locking state of the electronic device 100. The electronic device 100 may detect a sliding operation performed by the user on the sliding unlock region 612, and in response to the sliding operation, the electronic device 100 may verify the identity of the user and display the user interface 510 as shown in fig. 5G after the verification is passed, that is, display the user interface 510 before the screen is turned off.
As shown in fig. 5G, electronic device 100 may detect a user operation on pause motion control 513 by the user, in response to which pause motion control 513 is updated to end motion control 521 and continue motion control 522 as shown in fig. 5H.
Where end motion control 521 may be used to listen for user actions that trigger an end motion. Electronic device 100 may detect a user operation on end motion control 521, in response to which electronic device 100 ends the recording of the exercise health data. The continue motion control 522 may be used to listen for user actions that trigger a continue motion. Electronic device 100 may detect a user operation on continuation motion control 522, in response to which electronic device 100 continues to record the user's athletic health data.
As shown in FIG. 5H, electronic device 100 may detect a long press operation by the user on end motion control 521, in response to which electronic device 100 ends the recording of the motion and displays user interface 710 shown in FIG. 5I.
The user interface 710 includes: a sports parameter column 711 and a sports presentation area 712. The motion parameter field 711 includes a trajectory option 711A, a pace option 711B, a chart option 711C, and a detail option 711D.
The trajectory option 711A may be used to listen for user actions that trigger viewing of the motion trajectory. The electronic device may detect a user action on the trajectory option 711A, in response to which the motion presentation area 711 displays data related to the user's motion trajectory, such as motion time, average pace, heat.
Pace option 711B may be used to listen for user actions that trigger viewing of a sports pace. The electronic device may detect a user action on trajectory option 711B, in response to which motion show area 712 displays data related to the user's athletic pace, such as an average pace, a fastest pace.
Chart option 711C may be used to listen for user actions that trigger viewing of heart rate. The electronic device may detect a user operation on chart option 711C, in response to which the athletic presentation area 712 displays data related to the user's heart rate, such as an average heart rate, a maximum heart rate, a heart rate graph, and so forth.
Details option 711D may be used to listen for user actions that trigger viewing of the sports details. The electronic device may detect a user operation on the details option 711D, in response to which the motion presentation area 711 displays data related to the user's motion details, such as average pace frequency, average stride, average speed, and so forth.
The electronic device 100 may detect a quick touch operation performed by the user on the trajectory option 711A, the pace option 711B, and the chart option 711C in sequence, so that the motion display area 712 may sequentially display corresponding data. See fig. 5I, 5J, 5K specifically.
As shown in fig. 5I, underlining under the track option 711A indicates that the track option 711A is selected, and when the icon is selected, the motion display area 711 displays the motion track, the motion time, the average pace, the heat and other contents related to the motion track. A user operation of the pacing option 711B by the user may be received shortly after the electronic device 100 displays the user interface 710, and in response to the operation, the content in the motion presentation area 712 is updated to the content in the motion presentation area 712 shown in fig. 5J.
As shown in fig. 5J, underlining under the pace matching option 711B indicates that the pace matching option 711B is selected, and when the icon is selected, the sports presentation area 711 displays contents related to sports matching, such as average pace matching, fastest pace matching and the like. A short time after the electronic device 100 displays the user interface 710, a user operation of the chart option 711C by the user may be received, and in response to the operation, the content in the motion presentation area 712 is updated to the content in the motion presentation area 712 shown in fig. 5K.
As shown in fig. 5K, the user interface 710 displays a graph of heart rate during exercise, as well as data related to heart rate, such as average heart rate, maximum heart rate, etc.
It is understood that fig. 5A-5K are merely exemplary of user interfaces on the electronic device 100 and should not be construed as limiting embodiments of the present application.
In the process shown in fig. 5A-5K, the "sports health" application executed by electronic device 100 generates a plurality of data query requests. After the data query requests are successfully processed, the foreground process of the application program can acquire corresponding data and use the data to interact with the outside world. For example, the electronic device 100 displays the exercise time, pace, calorie, etc. data in the user interface 510 shown in fig. 5G, and displays the heart rate graph, etc. data in the user interface 710 shown in fig. 5K. When these data query requests are not processed, the foreground process of the application program will not acquire the corresponding data. For example, the electronic device 100 does not display the movement time, average pace, caloric count, fastest pace, etc. data in the user interface 710 shown in fig. 5I and 5J.
In the processes shown in fig. 5A to fig. 5K, the electronic device 100 may execute the data query method provided in the embodiment of the present application, and an implementation flow of the data query method will be described in detail below with reference to the examples in fig. 5A to fig. 5K.
The overall flow of the data query method in the embodiment of the present application is described below with reference to fig. 6.
As shown in fig. 6, the method includes:
s101, the electronic device 100 generates a plurality of data query requests.
In some embodiments, the plurality of data query requests generated by the electronic device 100 may come from a plurality of applications being run by the electronic device 100, such as: sports-type applications, smart device management-type applications, vehicle management-type applications, social-type applications, learning-type applications, shopping-type applications, and the like.
In other embodiments, the plurality of data query requests generated by electronic device 100 may come from an application program being run by electronic device 100, such as: a first application program.
In the following embodiments of the present application, the generated plurality of applications may be from a first application. In particular, the first application may be an "athletic health" application.
The data query request refers to an instruction initiated inside the electronic device 100 for querying data when the data needs to be acquired during the process of running the first application program by the electronic device 100.
Specifically, the data query request may be an instruction for requesting to query data, which is sent by a foreground process of the application to a background process, where the data is data required by interaction between the foreground process and the outside world. Data needed when foreground processes interact with the outside world may include, but is not limited to: 1, data directly presented on a user interface provided by an application, such as a motion trajectory, heat consumed, number of steps, etc., presented by a sports-class application. Intermediate data, such as heart rate data used by the sports-type application to show the heart rate graph, is shown.
In this embodiment of the application, when the electronic device 100 runs the first application, the data query request may be generated under the following several conditions:
the electronic device 100 generates a data query request in response to a received user operation. The user operation may include, for example, a user operation for switching the user interface in the first application, a user operation acting on a particular control in the user interface, and so forth.
The above examples in fig. 5A to 5B and 5H to 5K are taken as examples to explain:
referring to fig. 5A-5B, as shown in fig. 5A, when electronic device 100 detects a user operation on the "sports fitness" application by a user, a data query request Q1 is generated, displaying user interface 310 as shown in fig. 5B. The data query request Q1 is used to request to obtain data that can be presented in the user interface 310, including present exercise data and recent exercise health data that can be presented in the first exercise parameter column 311 and the second exercise parameter column 312 shown in fig. 5B, such as data of exercise step number, exercise time, exercise distance, heart rate, and the like. Data that can be presented by the electronic device 100 after sliding the user interface 311 up and down, such as sleep time, weight, etc., may also be included.
Referring to FIGS. 5H-5I, when electronic device 100 detects a user action on end motion control 521, as shown in FIG. 5H, a data query request Q5 is generated, displaying user interface 710, as shown in FIG. 5I. The data query request Q5 is used to request to obtain data that can be displayed in the motion display area 712 shown in fig. 5I, such as motion trajectory, motion time, average pace, heat and so on.
Referring to fig. 5I-5J, when the electronic device 100 detects a user action on the pacing option 711B, as shown in fig. 5I, a data query request Q6 is generated, displaying the user interface 710 as shown in fig. 5J. The data query request Q6 is used to request to obtain data that can be displayed in the sports display area 712 shown in fig. 5J, such as average pace, fastest pace, etc.
Referring to FIGS. 5J-5K, when electronic device 100 detects a user action on chart option 711C, as shown in FIG. 5J, a data query request Q7 is generated, displaying user interface 710 as shown in FIG. 5K. The data query request Q7 is used to request to obtain data, such as heart rate, which can be displayed in the exercise display area 712 shown in fig. 5K.
The data query requests generated by the electronic device in response to the received user operation may be the data query requests Q1, Q5, Q6, Q7 described above.
2, after the electronic device 100 starts a certain function of the first application, the first application periodically generates a data query request, and the data requested by the data query request is used for implementing the function.
Referring to fig. 5D, after the electronic device 100 enters the outdoor sport mode, the electronic device 100 may periodically generate a data query request Q2. The data query request Q2 may be used to request to obtain data presented in the data presentation area 512 shown in fig. 5D, such as exercise time, pace, heat, etc.
Referring to fig. 5E, the electronic device 100 is in a screen-off state. While the electronic device 100 is still operating in the outdoor sport mode, the electronic device 100 may periodically generate a data query request Q3 for a voice broadcast function. The data query request Q2 can be used to request to obtain data such as movement distance.
Referring to fig. 5F, the electronic device 100 is in a bright screen and locked state. While the electronic device 100 is still operating in the outdoor sport mode, the electronic device 100 may periodically generate a data query request Q4. The data query request Q4 may be used to request to obtain some data for background use, which is not shown on the interface, for evaluating the exercise condition of the user, such as exercise step number, heart rate, etc.
The data query requests periodically generated by the electronic device 100 may include the data query requests Q2, Q3, and Q4.
The plurality of data query requests generated by the electronic device 100 may include the data query requests Q1, Q2, Q3, Q4, Q5, Q6, Q7 described above.
In some embodiments, only one data query request may be generated correspondingly by one user interface, or one data query request may be generated correspondingly by a same user interface, a portion of the user interface displayed in the screen of the electronic device 100, and another data query request may be generated correspondingly by a portion of the user interface that can be displayed only by sliding up and down through the user action on the user interface, where the two data query requests may be generated simultaneously.
It is understood that the above-mentioned data query requests are only exemplary descriptions, and that more or fewer data query requests may be included in other embodiments of the present application.
Taking the time sequence shown in fig. 5A to 5K as an example, the electronic device 100 may generate the following data query requests in sequence: q1, Q2, Q3, Q4, Q5, Q6, Q7. FIG. 7 illustrates an example of a foreground process generating data query requests Q1-Q7.
S102, the electronic device 100 adds a plurality of data query requests into a request queue according to the generated sequence.
The request queue refers to a queue in a thread pool existing in a background process. After the data query request enters the background process, the data query request is arranged in the request queue according to the generated sequence.
FIG. 7 illustrates an example of a request queue. As shown in FIG. 7, the data query requests Q1-Q7 generated by the foreground process may be arranged in the request queue according to the generated precedence order.
In the embodiment of the present application, the electronic device 100 may perform the subsequent steps when a new data query request enters the request queue, or the electronic device 100 may perform the subsequent steps periodically, where the period may be preset, for example, 5 seconds, 10 seconds, or the like, or the electronic device 100 may perform the subsequent steps when the number of data query requests reaches the first value.
S103, the electronic device 100 filters the invalid data query request.
The electronic device 100 filtering the invalid data query request may refer to the electronic device 100 deleting the invalid data query request. After the electronic device 100 deletes a portion of the data query request, a first data query request is obtained.
Invalid data query requests may include, but are not limited to:
1. a data query request with shorter page residence time;
specifically, the electronic device 100 may record the time that the page dwells, i.e., the interval between user operations acting on the user interface. The electronic device 100 may regard a data query request with a page dwell time of less than 50 milliseconds as an invalid data query request.
For example, within a short time after a user clicks a certain control on the user interface to query data, after clicking another control on the user interface, the electronic device 100 switches to another user interface, where the short time is less than 50 milliseconds, and after the user clicks the user interface last time, the generated data query request is triggered to be an invalid data query request.
In this way, the electronic device 100 may regard the user interface that is switched quickly by the user as an invalid interface, and cancel loading the data on the invalid interface to increase the loading speed of the data that the user wants to query.
Referring to fig. 5H-5I, assume that the interval between the user clicking the end motion control 521 and clicking the pace option 711B is less than 50 milliseconds, then the data query request Q5 is an invalid data query request. The motion presentation area 712 does not display data related to the motion trajectory.
Referring to fig. 5J-5K, assume that the interval from the user clicking the pace option 711B to the chart option 711C is less than 50 milliseconds, and the data query Q6 is an invalid data query. The sports presentation area 712 does not display data related to sports pacing.
The first operation mentioned in this embodiment of the present application may be an operation of the ending motion control 521 in the embodiment shown in fig. 5H, the first user interface may be the user interface 710 in the embodiment shown in fig. 5I, the second operation may be an operation of the pace matching option 711B in the embodiment shown in fig. 5I, the second user interface may be the user interface 710 in the embodiment shown in fig. 5J, and the second data query request may be the data query request Q5.
Alternatively, the first operation mentioned in this embodiment of the present application may be an operation for the pace matching option 711B in the embodiment shown in fig. 5I, the first user interface may be the user interface 710 in the embodiment shown in fig. 5J, the second operation may be an operation for the icon option 711C in the embodiment shown in fig. 5J, the second user interface may be the user interface 710 in the embodiment shown in fig. 5K, and the second data query request may be the data query request Q6.
The first time mentioned in the embodiment of the present application may be any one time less than 50 milliseconds.
FIG. 7 illustrates a process by which the electronic device 100 filters invalid data query requests. As shown in FIG. 7, a background process of the electronic device 100 deletes the data query requests Q5, Q6 from the request queue. The data query requests Q1, Q2, Q3, Q4 and Q7 are left in the request queue.
The partial data query requests mentioned in the embodiment of the present application may include the data query requests Q5, Q6 mentioned above, and the first data query request mentioned in the embodiment of the present application may include data query requests Q1, Q2, Q3, Q4, Q7. The number of the first data query requests may be one or more, and is not limited herein.
2. The same data query request;
specifically, the electronic device 100 may delete any one of the same data query requests, where the deleted data query request is an invalid data query request.
For example, a user repeatedly clicks the same control on the user interface to request for querying a certain data, and due to repeated operations of the user, a plurality of identical data query requests are generated inside the electronic device 100, and any one of the plurality of identical data query requests is an invalid data query request.
In some embodiments, the electronic device 100 may only retain one of the identical data query requests, and consider the other identical data query requests as invalid data query requests.
Therefore, the same data query requests generated by repeated operation of the user can be filtered, and the efficiency of data query is improved.
3. Data query requests generated by misoperation;
specifically, the electronic device receives the third operation, displays a third user interface, receives the fourth operation, displays a fourth user interface, and receives the fifth operation, and displays the third user interface. And the data requested by the third data query request is the data required by the fourth user interface, and the third data query request is the data query request generated by misoperation.
For example, after the user opens the main interface of the first application, another user interface of the first application is clicked due to misoperation, and a certain data query request is generated, and then the user clicks the "return" control to return to the main interface of the first application. Then, the data query request generated by the misoperation of the user is an invalid data query request.
In this way, the electronic device 100 can determine whether the data query request is an invalid data query request by checking the user interfaces appearing before and after the data query request is generated, thereby avoiding wasting the time for querying data due to misoperation of the user.
4. And generating a data query request with a large time.
Specifically, the electronic device 100 may regard a data query request with a generation time greater than a first time threshold as an invalid data query request, where the generation time may be a time from generation to filtering of the data query request, and the larger the generation time, the longer the data query request exists.
In this way, the electronic device 100 may delete the data query request generated at an earlier time, reduce redundancy of the request queue, and improve efficiency of data query.
S104, the electronic device 100 determines the priority of the data query request in the request queue.
The electronic device 100 determines the priority of the data query request according to the priority rule.
The priority rules may include, but are not limited to, one or more of the following:
1. the priority is determined according to the generation time of the data query request. The larger the generation time of the data query request, the lower the priority of the data query request.
In the embodiment of the present application, the data query request may be divided into a plurality of batches, and different batches correspond to different priorities. For example, the data query requests are divided into five batches according to the sequence of the generation time from large to small, and the priority of the five batches is gradually increased.
In this case, due to the continuous operation of the user, the later-appearing page may be the page that the user wants to refer to, and when the later-appearing data query request has higher priority, the data query request initiated on the later-appearing page is easier to be preferentially processed, so that the data query request is prevented from being processed only according to the appearance sequence.
2. The priority is determined according to the usage of the data requested by the data query request. The higher the degree to which the data requested by the data query request is perceived by the user, the higher the priority of the data query request.
The types of the data query request can be divided into page display, voice broadcast, background use, process processing and the like according to the data use.
The page display means that data obtained by query is requested to be displayed on a page, the data is directly displayed on the page, and a user can directly see the data through a screen of the electronic equipment.
The voice broadcast means that the data obtained by inquiring is requested to be used for voice broadcast, and the user can obtain the data through the voice prompt of the electronic equipment.
Background usage refers to requesting the queried data for background usage, which is not presented on the page.
The process processing means that the data obtained by inquiring is requested to be used for further processing, and the electronic equipment displays the data obtained by further processing.
It is understood that, in the request feature of data application, the type of the data query request is not limited to the above-mentioned page display, voice broadcast, background use, and process processing, and is not limited herein.
3. The priority is set according to the screen state of the electronic device 100 at the time of the data query request generation. The speed of inquiring data in the bright screen state is higher than that in the off screen state.
Specifically, the screen states of the electronic device 100 include: and lightening and unlocking the screen, lightening and locking the screen, and extinguishing the screen. The priority of the data query request corresponding to the screen-on and unlocking is higher than that of the data query request corresponding to the screen-on and locking, and the priority of the data query request corresponding to the screen-on and locking is higher than that of the data query request corresponding to the screen-off.
In some embodiments, not limited to the exemplary list of several priority rules, the electronic device 100 may set the priority of each data query request by other priority rules. For example, the priority of each data query request may also be set according to the state of the application, that is, the priority of the data query request may be set by using the characteristic of whether the screen displays the application when the application is running. At this time, the type of the data query request may be: foreground running and background running. The foreground operation refers to displaying a user interface for running the application on the screen of the electronic device 100 when the application is running, and the background operation refers to not displaying the user interface for running the application on the screen of the electronic device 100 when the application is running.
In other embodiments, the priority of data query requests may be set in conjunction with the state of the application and the screen. At this time, the type of the data query request may be: the method comprises the steps of brightening the screen and unlocking the foreground to operate, brightening the screen and unlocking the background to operate, brightening the screen and locking the foreground to operate, brightening the screen and locking the background to operate, turning off the foreground to operate, and turning off the background to operate.
In summary, the priority rule may determine the priority of the data query request according to the following three characteristics: generation time, data usage, screen status.
In some embodiments, the electronic device 100 may determine characteristics of the data query request from a data structure of the data query request. The data structure of the data query request may be represented as follows:
PublicclassDataQueryContext{
privateDataQueryParameters dataQueryParameters;
private String dataGeneratedTime;
private int screenStatus;
private int dataUsageLevel;
}
the dataQueryParameters represent necessary parameters of the data query request, the datageneredtime represents the generation time of the data query request, the screenStatus represents the screen state of the data query request, and the dataUsageLevel represents the data use of the data query request.
It should be understood that the features of the data query request illustrated in the embodiment of the present application are merely exemplary, and do not constitute a limitation on the priority setting. In other embodiments of the present application, the data query request may also adopt different features in the above embodiments, or replace the above features with other described words.
In one particular example, the priority of the data query request may be quantified. For example, different priorities may be defined by scores, and the total score may be set to 5, with higher scores giving higher priority to data query requests. Specifically, the electronic device 100 may determine the priority of each data query request in the first data query request according to the following formula:
Priority=C1F1+C2F2+C3F3+…+CnFn
wherein Priority represents the Priority of the data query request.
FiThe score corresponding to the ith characteristic in the data query request is represented, and the characteristic can be generation time, data application, screen state and the like. Wherein i is 1,2,3 …, n. n is the number of predetermined features.
CiIndicating the weight that the ith feature takes in the priority of the data query request. C is not less than 0iLess than or equal to 1 and
Figure BDA0002880843360000252
Ci=1。
for example, a data query request may correspond to the following features: generation time, data usage, screen status. In this case, the data query requests can be classified according to different characteristics, with a priority score corresponding to each class.
Specifically, when the data query requests are classified according to the generation time, among the plurality of data query requests arranged in the order of the generation time from the largest, the priority score of the first 20% of the data query requests is 1, the priority score of the 20% -40% of the data query requests is 2, the priority score of the 40% -60% of the data query requests is 3, the priority score of the 60% -80% of the data query requests is 4, and the priority score of the 80% -100% of the data query requests is 5.
When the data query requests are classified according to data use, when the generated data are used for page display, the priority score of the data query request corresponding to the data is 4, when the generated data are used for voice broadcasting, the priority score of the data query request corresponding to the data are 3, when the generated data are used for background use, the priority score of the data query request corresponding to the data are 2, and when the generated data are used for process processing, the priority score of the data query request corresponding to the data are 1.
When the data query requests are classified according to the screen state, the priority score of the data query request generated when the electronic device 100 is in the bright-screen and unlocked state is 5, the priority score of the data query request generated when the electronic device 100 is in the bright-screen and locked state is 3, and the priority score of the data query request generated when the electronic device 100 is in the off-screen state is 1.
Further, the greater the weight a feature has in the priority of a data query request, the greater the degree of influence of the feature on the priority. Specifically, the feature of the generation time may be 30% in the priority of the data query request, the feature of the data usage may be 20% in the priority of the data query request, and the feature of the screen status may be 50% in the priority of the data query request.
Table 1 shows an example of the relationship of the features of the data query request to the scores.
TABLE 1
Figure BDA0002880843360000251
Table 2 shows the corresponding scores of the data query requests Q1, Q2, Q3, Q4, Q7 under different characteristics.
TABLE 2
Figure BDA0002880843360000261
Then, the priority of the data query requests Q1, Q2, Q3, Q4, Q7 is calculated as follows:
Priority Q1=1*30%+4*20%+5*50%=3.6
Priority Q2=2*30%+4*20%+5*50%=3.9
Priority Q3=3*30%+3*20%+1*50%=2.0
Priority Q4=4*30%+2*20%+3*50%=3.1
Priority Q7=5*30%+1*20%+5*50%=4.2
it is to be understood that the priority weights occupied by the different features are not limited to the values in the above examples, and in other embodiments of the present application, the priority weights occupied by the different features may also be other values. For example, the priority weight may be only 0 or 1, and the electronic device 100 determines the priority of the data query request only with a certain characteristic. The scores for different features may be other values, and are not limited herein.
S105, the electronic device 100 adjusts the order of the data query requests in the request queue according to the priority of the data query requests.
Specifically, the background process of the electronic device 100 may rank the data query requests with high priority at the front end of the request queue and rank the data query requests with low priority at the back end of the request queue in order from high priority to low priority. That is, the higher the priority, the earlier the corresponding data query request.
As shown in FIG. 7, the data query requests Q1, Q2, Q3, Q4 and Q7 are data query requests Q7, Q2, Q1, Q4 and Q3 in the order of the adjusted priorities from high to low.
It will be appreciated that filtering invalid data query requests, prioritizing the data query requests, and reordering the data query requests are two operations that are optional.
In some embodiments, the electronic device 100 may perform only the operation in S103, and not the operations in S104 and S105.
In other embodiments, the electronic device 100 may perform only the operations in S104 and S105, and not the operation in S103.
In other implementations, the electronic device 100 may perform the operations in S103, S104, and S105 in order.
S106, the electronic device 100 sequentially processes the data query requests in the request queue to obtain the data requested by the data query requests.
The processing refers to that the background process inquires the data requested by the data inquiry request and returns the obtained data to the foreground process.
Specifically, the background process may obtain data from a memory of the electronic device 100, or may establish a connection with another electronic device or a server to obtain required data. Reference may be made to the foregoing with particular regard to the acquisition of data.
As shown in fig. 7, the electronic device 100 processes the data query requests Q7, Q2, Q1, Q4, and Q3 in the order, that is, the background process queries the data query requests Q7, Q2, Q1, Q4, and Q3 in sequence to request the queried data.
S107, the electronic device 100 processes the acquired data.
Wherein the processing may include one or more of: displaying the data, voice broadcasting the data, converting the data into a graph, calculating the data or storing the data.
Specifically, when the data acquired by the electronic device 100 is data requested by a data query request generated on a user interface where a user currently stays, the processing may be that the electronic device 100 displays the acquired data on the user interface where the user currently stays, may also refer to that the electronic device 100 broadcasts the acquired data by using a speaker, may also refer to that the electronic device 100 uses the acquired data for background use, performs calculation processing on the data, and does not directly display the data on the user interface, or refers to that the data is further processed, changes an expression form of the data, and displays the processed data on the user interface, for example, the acquired heart rate data is changed into a heart rate graph and is displayed on the user interface.
When the data acquired by the electronic device 100 is not the data requested by the data query request generated on the user interface where the current user stays, the processing may refer to that the electronic device 100 stores the acquired data, and recalls the data when needed by the foreground process of the electronic device 100.
For example, in the user interface 710 where the user finally stays in fig. 5K, after the electronic device 100 processes the data query Q7, the heart rate data during the exercise of the user is obtained, and then the heart rate data is further processed and displayed on the user interface 710 in the form of a heart rate graph. After the electronic device 100 processes the data query request Q2, the data of the user, such as the movement distance, the movement heat, the pace, etc., are obtained, and the electronic device 100 caches the data and recalls the data when needed next time.
For a user, when the method provided by the embodiment of the application is used for querying data, the data loading speed on an application program interface is obviously increased, the time for the user to wait for data loading is shortened, and even if the user continuously triggers and generates a plurality of data query requests, the loading speed of the current user interface where the user stays is not obviously slowed down along with the increase of the number of the data query requests.
In summary, the data query method provided in the embodiment of the present application can filter invalid data query requests, dynamically adjust the processing sequence of the data query requests according to the operation of the user on the electronic device, the screen state of the electronic device, and the use of the query data, improve the speed of data query, reduce the resource waste in the data query process, and improve the loading speed of data in the application program running process.
The following describes a technical effect of the data query method provided by the embodiment of the present application with reference to fig. 8.
FIG. 8 is a diagram illustrating a contextual comparison of optimizing a data query using the data query method provided by an embodiment of the present application. As shown in fig. 8, the loading speeds before and after optimization respectively refer to the time taken by the foreground process to initiate a data query request and return data to the background process when the data query method provided by the embodiment of the present application is not used or used. It can be seen that the loading speed of the optimized home page is obviously faster than that before optimization, and when a user switches pages quickly, the loading speed of the optimized page is also obviously faster than that before optimization.
It is understood that the data related to the embodiments of the present application are not limited to the sports health data, and may also be data of a learning class, a social class, a shopping class, and the like. For example, the data query method provided by the embodiment of the application can be used in a learning-class application program, and the data requested to be queried can be learning-class data, which can be data such as recent question-brushing scores, question-brushing time, course learning progress, collected courses and the like of a user.
The application program related to the embodiment of the present application is not limited to the sports application program, and may also be an intelligent device management application program, for example, a hua shi "smart life" application program. During the operation of the smart device management application, the electronic device 100 may generate a plurality of data query requests, where the data query requests may include: status of the device, operational data of the device. Wherein the device status may include one or more of: starting up, standby and shutting down; the data on which the device operates includes one or more of: the light brightness and the light color of the intelligent lamp, and the temperature, the wind speed, the wind direction and the mode of the intelligent air conditioner. The data may be data collected by a device, that is, an intelligent device, or data acquired by the electronic device 100.
When the data query method provided by the embodiment of the application is applied to the intelligent device management application program, the data loading speed can be increased, so that the electronic device 100 preferentially displays data acquired in the operation process of some intelligent devices, and a user can conveniently query the devices and remotely control the intelligent devices.
The application program according to the embodiment of the present application may be a vehicle management application program. During operation of the vehicle management application, the electronic device 100 may generate a plurality of data query requests, where the data query requests may be: information of the vehicle, and traveling data of the vehicle. Wherein the information of the vehicle comprises one or more of: license plate number, vehicle type, person responsible, vehicle type, and unit of use; the driving data of the vehicle includes one or more of: travel time, travel track, travel direction, travel speed, remaining oil amount, location.
The data query method provided by the embodiment of the application is applied to the vehicle management application program, so that the data loading speed can be increased, the electronic device 100 preferentially displays the information and the driving data of the vehicle which a user wants to check, and the user can conveniently query the vehicle information and remotely manage the vehicle.
The embodiments of the present application can be combined arbitrarily to achieve different technical effects.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.
In short, the above description is only an example of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present invention are intended to be included within the scope of the present invention.

Claims (32)

1. A method of data query, the method comprising:
the electronic equipment generates a plurality of data query requests;
the electronic equipment deletes part of the data query requests in the plurality of data query requests to obtain a first data query request;
the electronic equipment adjusts the sequence of each data query request in the first data query request;
and the electronic equipment sequentially acquires the data requested by each data query request in the first data query request according to the adjusted sequence.
2. The method of claim 1, wherein before the electronic device generates the plurality of data query requests, the method further comprises:
the electronic equipment receives a first operation and displays a first user interface;
within a first time after the first operation is received, the electronic equipment receives a second operation and displays a second user interface;
wherein the plurality of data query requests includes a second data query request, the data requested by the second data query request being data required by the first user interface;
the deleting, by the electronic device, a part of the data query requests in the plurality of data query requests specifically includes: the electronic device deletes the second data query request.
3. The method according to claim 1 or 2, wherein the deleting, by the electronic device, a part of the data query requests in the plurality of data query requests specifically includes:
the electronic device deletes any one of the same data query requests among the plurality of data query requests.
4. The method of any of claims 1-3, wherein prior to the electronic device generating the plurality of data query requests, the method further comprises:
the electronic equipment receives a third operation and displays a third user interface;
the electronic equipment receives a fourth operation and displays a fourth user interface;
the electronic equipment receives a fifth operation and displays the third user interface;
wherein the plurality of data query requests include a third data query request, and data requested by the third data query request is data required by the fourth user interface;
the deleting, by the electronic device, a part of the data query requests in the plurality of data query requests specifically includes: and the electronic equipment deletes the third data query request.
5. The method according to any one of claims 1 to 4, wherein the deleting, by the electronic device, a portion of the plurality of data query requests specifically includes: and the electronic equipment deletes the data query request with the generation time larger than a first time threshold from the plurality of data query requests.
6. The method according to any one of claims 1 to 5, wherein the adjusting, by the electronic device, the order of each data query request in the first data query request specifically includes:
the electronic equipment adjusts the sequence of each data query request in the first data query request according to one or more of the following items:
the generation time of the first data query request; the larger the generation time is, the later the corresponding data query request is;
a usage of the data requested by the first data query; when the requested data is higher in the degree perceived by the user, the corresponding data query request is more advanced;
or generating a screen state of the electronic equipment when the first data query request is generated; the screen state of the electronic device comprises: the screen is lightened and unlocked, and the screen is lightened and locked and extinguished; the data query requests corresponding to the screen-up and unlocking are in front of the sequence of the data query requests corresponding to the screen-up and locking, and the data query requests corresponding to the screen-up and locking are in front of the sequence of the data query requests corresponding to the screen-down.
7. The method according to any one of claims 1-6, wherein before the electronic device adjusts the order of each of the first data query requests, the method further comprises:
the electronic equipment determines the priority of each data query request in the first data query request;
the adjusting, by the electronic device, the sequence of each data query request in the first data query request specifically includes: the electronic equipment adjusts the sequence of each data query request in the first data query request according to the priority; wherein, the higher the priority, the earlier the corresponding data query request.
8. The method according to claim 7, wherein the determining, by the electronic device, the priority of each data query request in the first data query request specifically includes:
the electronic device determines a priority of the fourth data query request according to one or more of: generating time, data use and screen state;
the fourth data query request is any one of the first data query requests; the larger the generation time of the fourth data query request is, the lower the priority of the fourth data query request is;
the higher the degree of perception of the data requested by the fourth data query request by the user is, the higher the priority of the fourth data query request is;
when the screen state of the electronic equipment is respectively bright screen and unlocked screen, bright screen and locked screen and off screen when the fourth data query request is generated, the priority of the fourth data query request is gradually reduced;
the generation time of the fourth data query request, the purpose of the requested data, and the screen state of the electronic device at the time of generation are the same or different in degree of influence on the priority of the fourth data query request.
9. The method according to any one of claims 1 to 8, wherein the electronic device sequentially obtains the data requested by each data query request in the first data query request according to the adjusted sequence, and the method further comprises:
the electronic device processes the data, the processing including one or more of: displaying the data, voice broadcasting the data, converting the data into a graph, calculating the data or storing the data.
10. The method of any of claims 1-9, wherein the plurality of data query requests comprises: the electronic equipment responds to a received data query request generated by user operation and/or a data query request periodically generated by the electronic equipment.
11. The method according to any one of claims 1 to 10,
the electronic equipment periodically deletes part of the data query requests in the plurality of data query requests to obtain the first data query request, and adjusts the sequence of each data query request in the first data query request;
or,
after the electronic equipment generates the latest data query request in the data query requests, deleting part of the data query requests in the data query requests to obtain the first data query request, and adjusting the sequence of each data query request in the first data query request;
or,
when the number of the plurality of data query requests reaches a first number threshold, deleting part of the data query requests in the plurality of data query requests to obtain the first data query requests, and adjusting the sequence of each data query request in the first data query requests.
12. The method according to any one of claims 1 to 11,
the plurality of data query requests includes: a data query request generated by a motion application program;
the data requested by the data query request generated by the motion class application program comprises the following data: exercise data, health data;
wherein the motion data comprises one or more of: the exercise steps, the exercise distance, the exercise time, the heat, the exercise track, the exercise type and the exercise heart rate; the health data comprises one or more of: body weight, heart rate, sleep duration, body fat, blood pressure, blood glucose, and blood oxygen saturation.
13. The method of any one of claims 1 to 12,
the plurality of data query requests includes: the data query request is generated by the intelligent equipment management application program;
the data requested by the data query request generated by the intelligent device management application program comprises the following data: the state of the equipment managed by the intelligent equipment management application program and the running data of the equipment.
14. The method according to any one of claims 1 to 13,
the plurality of data query requests includes: a data query request generated by the vehicle management application program;
the data requested by the data query request generated by the vehicle management application program comprises the following data: information of a vehicle managed by the vehicle management application, and travel data of the vehicle;
wherein the information of the vehicle comprises one or more of: license plate number, vehicle type, person responsible, vehicle type, and unit of use; the driving data of the vehicle comprises one or more of the following: travel time, travel track, travel direction, travel speed, remaining oil amount, location.
15. The method of any of claims 1-14, wherein prior to the electronic device generating the plurality of data query requests, the method further comprises:
the electronic equipment runs a first application program;
wherein the plurality of data query requests includes: a data query request of the first application.
16. An electronic device, comprising: a display screen, a memory, one or more processors; the display screen, the memory coupled with the one or more processors, the memory to store computer program code, the computer program code including computer instructions that the one or more processors invoke to cause the electronic device to perform the following:
generating a plurality of data query requests;
deleting part of the data query requests in the plurality of data query requests to obtain a first data query request;
adjusting the sequence of each data query request in the first data query request;
and sequentially acquiring the data requested by each data query request in the first data query request according to the adjusted sequence.
17. The electronic device of claim 16, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
before generating a plurality of data query requests, receiving a first operation and displaying a first user interface; receiving a second operation within a first time after the first operation is received, and displaying a second user interface; wherein the plurality of data query requests includes a second data query request, the data requested by the second data query request being data required by the first user interface;
the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform the following: deleting the second data query request.
18. The electronic device of claim 16 or 17, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
deleting any one of the same data query requests of the plurality of data query requests.
19. The electronic device of any of claims 16-18, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
before generating a plurality of data query requests, receiving a third operation and displaying a third user interface; receiving a fourth operation, and displaying a fourth user interface; receiving a fifth operation and displaying the third user interface; wherein the plurality of data query requests include a third data query request, and data requested by the third data query request is data required by the fourth user interface;
the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform the following: deleting the third data query request.
20. The electronic device of any of claims 16-19, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
deleting the data query requests of the plurality of data query requests, the generation time of which is greater than a first time threshold value.
21. The electronic device of any of claims 16-20, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
adjusting an order of respective ones of the first data query requests according to one or more of:
the generation time of the first data query request; the larger the generation time is, the later the corresponding data query request is;
a usage of the data requested by the first data query; when the requested data is higher in the degree perceived by the user, the corresponding data query request is more advanced;
or generating a screen state of the electronic equipment when the first data query request is generated; the screen state of the electronic device comprises: lightening and unlocking the screen, lightening and locking the screen, and extinguishing the screen; the data query requests corresponding to the screen-up and unlocking are in front of the sequence of the data query requests corresponding to the screen-up and locking, and the data query requests corresponding to the screen-up and locking are in front of the sequence of the data query requests corresponding to the screen-down.
22. The electronic device of any of claims 16-21, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
before adjusting the sequence of each data query request in the first data query request, determining the priority of each data query request in the first data query request;
the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to perform the following:
adjusting the sequence of each data query request in the first data query request according to the priority; wherein, the higher the priority, the earlier the corresponding data query request.
23. The electronic device of claim 22, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
determining a priority of the fourth data query request based on one or more of: generating time, data use and screen state;
the fourth data query request is any one of the first data query requests;
the larger the generation time of the fourth data query request is, the lower the priority of the fourth data query request is;
the higher the degree of the data requested by the fourth data query request perceived by the user is, the higher the priority of the fourth data query request is;
when the screen state of the electronic equipment is respectively bright screen and unlocked screen, bright screen and locked screen and off screen when the fourth data query request is generated, the priority of the fourth data query request is gradually reduced;
the generation time of the fourth data query request, the purpose of the requested data, and the screen state of the electronic device at the time of generation are the same or different in degree of influence on the priority of the fourth data query request.
24. The electronic device of any of claims 16-23, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
according to the adjusted sequence, after data requested by each data query request in the first data query request is acquired in sequence, the data is processed, and the processing comprises one or more of the following items: displaying the data, voice broadcasting the data, converting the data into a graph, calculating the data or storing the data.
25. The electronic device of any of claims 16-24, wherein the plurality of data query requests comprises: data query requests generated in response to received user operations, and/or data query requests generated periodically.
26. The electronic device of any of claims 16-25, wherein the one or more processors are specifically configured to invoke the computer instructions to cause the electronic device to:
periodically deleting part of the data query requests in the plurality of data query requests to obtain the first data query request, and adjusting the sequence of each data query request in the first data query request;
or,
after generating the latest data query request in the plurality of data query requests, deleting part of the data query requests in the plurality of data query requests to obtain the first data query request, and adjusting the sequence of each data query request in the first data query request;
or,
when the number of the plurality of data query requests reaches a first number threshold, deleting part of the data query requests in the plurality of data query requests to obtain the first data query requests, and adjusting the sequence of each data query request in the first data query requests.
27. The electronic device of any of claims 16-26,
the plurality of data query requests includes: a data query request generated by a motion application program;
the data requested by the data query request generated by the motion class application program comprises the following data: exercise data, health data;
wherein the motion data comprises one or more of: the exercise steps, the exercise distance, the exercise time, the heat, the exercise track, the exercise type and the exercise heart rate; the health data comprises one or more of: body weight, heart rate, sleep duration, body fat, blood pressure, blood glucose, and blood oxygen saturation.
28. The electronic device of any of claims 16-27,
the plurality of data query requests includes: the data query request is generated by the intelligent equipment management application program;
the data requested by the data query request generated by the intelligent device management application program comprises the following data: the state of the equipment managed by the intelligent equipment management application program and the running data of the equipment.
29. The electronic device of any one of claims 16-28,
the plurality of data query requests includes: a data query request generated by the vehicle management application program;
the data requested by the data query request generated by the vehicle management application program comprises the following data: information of a vehicle managed by the vehicle management application program and travel data of the vehicle;
wherein the information of the vehicle comprises one or more of: license plate number, vehicle type, person responsible, vehicle type and use unit; the driving data of the vehicle comprises one or more of the following: travel time, travel track, travel direction, travel speed, remaining oil amount, location.
30. The electronic device of any of claims 16-29, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to:
before generating a plurality of data query requests, operating a first application program;
wherein the plurality of data query requests includes: a data query request of the first application.
31. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-15.
32. A computer program product, characterized in that it causes a computer to carry out the method according to any one of claims 1 to 15 when said computer program product is run on the computer.
CN202011645223.5A 2020-12-31 2020-12-31 Data query method and electronic equipment Pending CN114691946A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011645223.5A CN114691946A (en) 2020-12-31 2020-12-31 Data query method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011645223.5A CN114691946A (en) 2020-12-31 2020-12-31 Data query method and electronic equipment

Publications (1)

Publication Number Publication Date
CN114691946A true CN114691946A (en) 2022-07-01

Family

ID=82135844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011645223.5A Pending CN114691946A (en) 2020-12-31 2020-12-31 Data query method and electronic equipment

Country Status (1)

Country Link
CN (1) CN114691946A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700602A (en) * 2022-12-08 2023-09-05 荣耀终端有限公司 Method and equipment for inquiring and expanding service life of memory

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103544035A (en) * 2013-10-21 2014-01-29 北京奇虎科技有限公司 Application clearing method and device for mobile terminal
US20150026692A1 (en) * 2013-07-22 2015-01-22 Mastercard International Incorporated Systems and methods for query queue optimization
US20180107740A1 (en) * 2016-10-17 2018-04-19 Microsoft Technology Licensing, Llc Combining catalog search results from multiple package repositories
CN108287878A (en) * 2018-01-02 2018-07-17 沈阳东软医疗系统有限公司 A kind of dynamic buffering data failure dispatching method, device and caching system
CN109408761A (en) * 2018-10-16 2019-03-01 翟红鹰 A kind of filter method of repetitive requests, system, equipment and storage medium
CN110020175A (en) * 2017-12-29 2019-07-16 阿里巴巴集团控股有限公司 A kind of search processing method, processing equipment and system
CN110162543A (en) * 2019-05-29 2019-08-23 北京奇艺世纪科技有限公司 A kind of information query method and device
CN110489447A (en) * 2019-07-16 2019-11-22 招联消费金融有限公司 Data query method, apparatus, computer equipment and storage medium
US20200042647A1 (en) * 2018-08-02 2020-02-06 International Business Machines Corporation Machine-learning to alarm or pre-empt query execution
CN110955681A (en) * 2019-10-14 2020-04-03 京东数字科技控股有限公司 Information processing method and device, electronic equipment and storage medium
CN111444408A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Network search processing method and device and electronic equipment
CN116541418A (en) * 2023-06-30 2023-08-04 阿里巴巴(中国)有限公司 Data query method, electronic device and computer readable storage medium
CN117149849A (en) * 2023-08-30 2023-12-01 上海炎凰数据科技有限公司 Method and device for processing multiple query requests and electronic equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150026692A1 (en) * 2013-07-22 2015-01-22 Mastercard International Incorporated Systems and methods for query queue optimization
CN103544035A (en) * 2013-10-21 2014-01-29 北京奇虎科技有限公司 Application clearing method and device for mobile terminal
US20180107740A1 (en) * 2016-10-17 2018-04-19 Microsoft Technology Licensing, Llc Combining catalog search results from multiple package repositories
CN110020175A (en) * 2017-12-29 2019-07-16 阿里巴巴集团控股有限公司 A kind of search processing method, processing equipment and system
CN108287878A (en) * 2018-01-02 2018-07-17 沈阳东软医疗系统有限公司 A kind of dynamic buffering data failure dispatching method, device and caching system
US20200042647A1 (en) * 2018-08-02 2020-02-06 International Business Machines Corporation Machine-learning to alarm or pre-empt query execution
CN109408761A (en) * 2018-10-16 2019-03-01 翟红鹰 A kind of filter method of repetitive requests, system, equipment and storage medium
CN110162543A (en) * 2019-05-29 2019-08-23 北京奇艺世纪科技有限公司 A kind of information query method and device
CN110489447A (en) * 2019-07-16 2019-11-22 招联消费金融有限公司 Data query method, apparatus, computer equipment and storage medium
CN110955681A (en) * 2019-10-14 2020-04-03 京东数字科技控股有限公司 Information processing method and device, electronic equipment and storage medium
CN111444408A (en) * 2020-03-26 2020-07-24 腾讯科技(深圳)有限公司 Network search processing method and device and electronic equipment
CN116541418A (en) * 2023-06-30 2023-08-04 阿里巴巴(中国)有限公司 Data query method, electronic device and computer readable storage medium
CN117149849A (en) * 2023-08-30 2023-12-01 上海炎凰数据科技有限公司 Method and device for processing multiple query requests and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
XUANHE ZHOU等: "Database Meets Artificial Intelligence: A Survey", 《IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING》, vol. 34, no. 3, 14 May 2020 (2020-05-14), pages 1096 - 1116 *
叶根梅;: "云数据库查询优化中半连接序列方法的应用研究", 吉林工程技术师范学院学报, no. 03, 26 March 2015 (2015-03-26), pages 98 - 100 *
王立: "分布式内存数据库系统的查询处理与优化", 《中国博士学位论文全文数据库 (信息科技辑)》, no. 12, 15 December 2015 (2015-12-15), pages 138 - 2 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700602A (en) * 2022-12-08 2023-09-05 荣耀终端有限公司 Method and equipment for inquiring and expanding service life of memory
CN116700602B (en) * 2022-12-08 2024-04-12 荣耀终端有限公司 Method and equipment for inquiring and expanding service life of memory

Similar Documents

Publication Publication Date Title
CN113794800B (en) Voice control method and electronic equipment
WO2021052263A1 (en) Voice assistant display method and device
WO2020151387A1 (en) Recommendation method based on user exercise state, and electronic device
CN114816210B (en) Full screen display method and device of mobile terminal
WO2021213164A1 (en) Application interface interaction method, electronic device, and computer readable storage medium
WO2021063343A1 (en) Voice interaction method and device
CN111526314B (en) Video shooting method and electronic equipment
WO2020191685A1 (en) Frequency adjustment method and apparatus applied to terminal, and electronic device
CN114443277A (en) Memory management method and device, electronic equipment and computer readable storage medium
CN114089933B (en) Display parameter adjusting method, electronic device, chip and readable storage medium
WO2021036770A1 (en) Split-screen processing method and terminal device
WO2022199509A1 (en) Method for application performing drawing operation, and electronic device
WO2022095788A1 (en) Panning photography method for target user, electronic device, and storage medium
CN113761427A (en) Method for generating card in self-adaptive mode, terminal device and server
WO2022160991A1 (en) Permission control method and electronic device
WO2021143391A1 (en) Video call-based screen sharing method and mobile device
CN112783384A (en) Control method for cloud application operation and electronic equipment
CN113132526A (en) Page drawing method and related device
CN114461057A (en) VR display control method, electronic device and computer readable storage medium
WO2022166435A1 (en) Picture sharing method and electronic device
CN115525372A (en) Method and device for displaying interface
CN113986369B (en) Internet of things equipment control method and system, electronic equipment and storage medium
CN114691946A (en) Data query method and electronic equipment
CN115409458A (en) Prompting method, graphical user interface and related device
CN114694646A (en) Voice interaction processing method and related device

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