Disclosure of Invention
The embodiment of the invention provides a method and a device for loading data by display equipment, which can solve the problem of poor accuracy and timeliness of data loading in the related technology. The technical scheme is as follows:
in a first aspect, a method for loading data for a display device is provided, the method comprising:
when a control instruction for a control on a display device interface is received, the position of target data in loaded data is obtained by monitoring callback of display data in the control;
when the position of the target data in the loaded data meets a preset condition, loading the next batch of data different from the loaded data;
the target data is the last data displayed on the interface in the control, and the loaded data is all data currently loaded in the control.
In a possible implementation manner, the control instruction is triggered by a drag operation of a mouse on the control or by a key of a remote control device.
In one possible implementation, the callback is used to indicate the target data;
correspondingly, the obtaining the position of the target data in the loaded data by monitoring the callback of the display data in the control comprises:
determining the target data when the callback is received;
and acquiring the position of the target data in the loaded data according to the arrangement sequence of the target data in the loaded data.
In one possible implementation, the callback is used to indicate the location of the target data in the loaded data;
correspondingly, the obtaining the position of the target data in the loaded data by monitoring the callback of the display data in the control comprises:
and when the callback is received, acquiring the position of the target data in the loaded data.
In one possible implementation manner, before receiving a control instruction for a control on a display device interface, the method further includes:
and when a display instruction of the interface is received, loading preset data into the control, and monitoring callback of the display data in the control.
In one possible implementation manner, the loading, when the position of the target data in the loaded data meets a preset condition, a next batch of data different from the loaded data includes:
when the position of the target data in the loaded data meets a first preset condition, loading a first batch of data;
and when the position of the target data in the loaded data meets a second preset condition, loading a second batch of data.
In a possible implementation manner, the first preset condition is that the position of the target data in the loaded data is before a first preset position, the second preset condition is that the position of the target data in the loaded data is after a second preset position, and the second preset position is determined according to the number of the loaded data and the first preset position.
In a second aspect, an apparatus for loading data for a display device is provided, the apparatus comprising:
the acquisition module is used for acquiring the position of target data in the loaded data by monitoring callback of display data in the control when a control instruction of the control on the display equipment interface is received;
the loading module is used for loading the next batch of data different from the loaded data when the position of the target data in the loaded data meets a preset condition;
the target data is the last data displayed on the interface in the control, and the loaded data is all data currently loaded in the control.
In a possible implementation manner, the control instruction is triggered by a drag operation of a mouse on the control or by a key of a remote control device.
In one possible implementation, the callback is used to indicate the target data;
correspondingly, the obtaining module is configured to determine the target data when the callback is received; and acquiring the position of the target data in the loaded data according to the arrangement sequence of the target data in the loaded data.
In one possible implementation, the callback is used to indicate the location of the target data in the loaded data;
correspondingly, the obtaining module is configured to obtain a position of the target data in the loaded data when the callback is received.
In a possible implementation manner, the loading module is further configured to load preset data to the control when a display instruction for the interface is received;
the acquisition module is further configured to monitor a callback of display data in the control.
In one possible implementation manner, the loading module is configured to load a first batch of data when a position of the target data in the loaded data meets a first preset condition; and when the position of the target data in the loaded data meets a second preset condition, loading a second batch of data.
In a possible implementation manner, the first preset condition is that the position of the target data in the loaded data is before a first preset position, the second preset condition is that the position of the target data in the loaded data is after a second preset position, and the second preset position is determined according to the number of the loaded data and the first preset position.
In a third aspect, an electronic device is provided that includes a processor and a memory; the memory is used for storing a computer program; the processor is configured to execute the computer program stored in the memory to implement the method steps of any one of the implementations of the first aspect or the second aspect.
In a fourth aspect, a computer-readable storage medium is provided, in which a computer program is stored, which, when being executed by a processor, carries out the method steps of any of the implementations of the first or second aspect.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
by monitoring the callback of the display data in the control, the position of the target data in the loaded data can be acquired through the callback, and whether the data is loaded or not is determined according to whether the position meets the preset condition or not. According to the scheme, the opportunity for loading the data is determined by monitoring the callback, the data is loaded without depending on the change of the focus, and the accuracy and the timeliness of the data loading can be greatly improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for loading data by a display device according to an embodiment of the present invention. Referring to fig. 1, the method includes:
101. and when a control instruction for the control on the display equipment interface is received, the position of the target data in the loaded data is obtained by monitoring the callback of the display data in the control.
102. And when the position of the target data in the loaded data meets a preset condition, loading the next batch of data different from the loaded data.
The target data is the last data displayed on the interface in the control, and the loaded data is all data currently loaded in the control.
According to the method provided by the embodiment of the invention, the callback of the display data in the control is monitored, so that the position of the target data in the loaded data can be acquired through the callback, and whether the data is loaded or not is determined according to whether the position meets the preset condition or not. According to the scheme, the opportunity for loading the data is determined by monitoring the callback, the data is loaded without depending on the change of the focus, and the accuracy and the timeliness of the data loading can be greatly improved.
Optionally, the control instruction is triggered by a drag operation of a mouse on the control or by a button of the remote control device.
Optionally, the callback is used to indicate the target data;
correspondingly, the obtaining the position of the target data in the loaded data by monitoring the callback of the display data in the control comprises:
when the callback is received, determining the target data;
and acquiring the position of the target data in the loaded data according to the arrangement sequence of the target data in the loaded data.
Optionally, the callback is used to indicate the location of the target data in the loaded data;
correspondingly, the obtaining the position of the target data in the loaded data by monitoring the callback of the display data in the control comprises:
when the callback is received, the position of the target data in the loaded data is obtained.
Optionally, before receiving a control instruction for a control on the display device interface, the method further includes:
and when a display instruction of the interface is received, loading preset data into the control, and monitoring callback of the display data in the control.
Optionally, when the position of the target data in the loaded data meets a preset condition, loading a next batch of data different from the loaded data, including:
when the position of the target data in the loaded data meets a first preset condition, loading a first batch of data;
and loading a second batch of data when the position of the target data in the loaded data meets a second preset condition.
Optionally, the first preset condition is that the position of the target data in the loaded data is before a first preset position, the second preset condition is that the position of the target data in the loaded data is after a second preset position, and the second preset position is determined according to the number of the loaded data and the first preset position.
Fig. 2 is a flowchart of a method for loading data by a display device according to an embodiment of the present invention. The method is performed by an electronic device, which may be provided as a display device, see fig. 2, the method comprising:
201. and when a display instruction of the interface is received, loading preset data into the control, and monitoring callback of the display data in the control.
In the embodiment of the invention, when a user wants to open a certain interface (such as the interface A), a display instruction of the interface can be triggered through corresponding operation. The interface A contains a control C, and a large amount of data can be displayed in the control C. When the electronic device receives the display instruction, a batch of preset data which needs to be displayed currently can be loaded into the control of the interface. Taking the batch of loaded preset data as the data set (n) as an example, since the size of the control in the interface is limited, all the preset data cannot be displayed to the user at one time in the control, at this time, the electronic device may only display a part of the preset data in the control.
For example, the interface a may be a one-dimensional calendar interface, and the control C may be a control for displaying calendar data, which may contain a plurality of child controls as a parent control. Referring to fig. 3, a schematic diagram of data displayed in a control C may be located in a preset area of the calendar interface, such as an area marked by a dashed box in fig. 3, where the dashed box area includes a plurality of child controls of the parent control C, for example, a date data (which may include a day of the week, a solar calendar, and a calendar) is correspondingly displayed in each child control. When the electronic device may default to just start opening the interface, calendar data of the current year, for example, all calendar data of 2018, needs to be displayed to the user, and the electronic device may load all calendar data of 2018 into the parent control as preset data. Due to the limited size of the electronic device display screen, as shown in fig. 4, the electronic device may only display the calendar data of 2018,month 2, 19 and 31 in the parent control.
It should be noted that, when the display instruction is received, in addition to loading the preset data, the electronic device may also monitor a callback of the parent control, that is, a callback of the display data in the control. When a technician designs a control displayed in the interface, if the control does not have a callback for monitoring data displayed in the control, the technician can add the callback by himself, so that the data displayed in the interface a can be confirmed by monitoring the callback in the process of displaying the interface by the electronic device. In this way, the electronic device may receive the callback when new data is displayed in the interface. Wherein the display of new data is seen in asubsequent step 202 and the receipt of a callback is seen in asubsequent step 203.
202. And when a control instruction for the control on the interface is received, the position of the target data in the loaded data is obtained by monitoring the callback of the display data in the control.
The target data is the last data displayed on the interface in the control, namely, the last child control displayed on the interface each time; the loaded data is all data currently loaded into the control.
In the embodiment of the invention, in the process that the electronic equipment displays the current data in the control, if a user wants to check new data in the control, a control instruction for the control can be triggered through corresponding operation, and when the electronic equipment receives the control instruction, new data different from the data currently displayed by the control can be displayed in the control.
In a possible implementation manner, the control instruction can be triggered by a dragging operation of a mouse on the control or by a key of a remote control device. For example, the control instruction may be a first control instruction, that is, a control instruction triggered by a drag operation of the mouse on the control. For example, in the process of displaying the interface a, a user may perform a drag operation on the control through a mouse (or a mouse), and trigger the first control instruction, where the first control instruction may not cause a change of a focus on the interface.
When the electronic device receives the first control instruction, new data may be displayed in the control according to the first control instruction, for example, the electronic device may display another part of the loaded preset data instep 201. For example, if the user drags a distance to the right using the mouse, the electronic device may display the calendar data of 19 th to 31 th month 1 of 2018.
The control command may also be a second control command, i.e. a control command triggered by a key of a remote control device (e.g. a remote control). For example, the user may press the up-down key of the remote control to trigger the second control command, which causes a change in focus on the interface. For example, if the user presses the up key or the left key, the electronic device may display the calendar data of 2018, month 2, No. 18 to No. 30.
In the embodiment of the invention, when the electronic device receives the control instruction, the position of the target data in the new data in the loaded data can be acquired by monitoring the callback of the display data in the control besides displaying the new data.
If the electronic device displays new data according to the first control instruction, the target data is data corresponding to a child control displayed on the edge of the display screen of the electronic device according to the first control instruction, that is, data corresponding to two child controls located on the edge of the display screen in the parent control, such as calendar data of number 1/19 in 2018.
When the electronic device displays the new data, a callback may be received to obtain the location of the target data in the new data in the loaded data. In one possible implementation, the callback is used to indicate the target data; accordingly, the electronic device may determine the target data when the callback is received; and acquiring the position of the target data in the loaded data according to the arrangement sequence of the target data in the loaded data, wherein the loaded data is all data which are currently loaded into the control, such as all the calendar data of 2018. The target data is determined by monitoring the callback, and then the position of the target data in the loaded data can be rapidly determined according to the loaded data, so that whether the data needs to be loaded or not is determined.
The location of the target data in the loaded data may refer to the target data being the first few in the loaded data, and the location may be represented by an index. For example, the callback received by the electronic device may indicate the target data of 19/1/2018, the electronic device may determine that the target data is 19 th in all the calendar data of 2018, and accordingly, the electronic device may obtain index of 19.
In one possible implementation, the callback is used to indicate the location of the target data in the loaded data; accordingly, when the callback is received, the electronic device may obtain the location of the target data in the loaded data. For example, the callback received by the electronic device may directly indicate that the target data is 19 th in the loaded data, that is, index ═ 19. The callback listening mode can facilitate the electronic equipment to quickly acquire the position of the target data in the loaded data so as to determine whether the data needs to be loaded or not.
It should be noted that, if the electronic device displays new data according to the second control instruction, the target data may be data at a focus corresponding to the second control instruction, such as calendar data of number 18/2/2018. Similar to the first control instruction reception callback, when the electronic device receives the callback, the target data or the position of the target data in the loaded data may be acquired, and if the target data is 49 th in all the calendar data of 2018, No. 2 and No. 18 in 2018, the electronic device may acquire index of 49.
By monitoring the callback of the display data of the control after the interface is opened, the electronic equipment can receive the callback when new data is displayed in the control, so that the position of the target data in the loaded data can be known.
203. And when the position of the target data in the loaded data meets a preset condition, loading the next batch of data different from the loaded data.
In the embodiment of the present invention, the electronic device may set a preset condition, and load data when the position of the target data in the loaded data meets the preset condition.
In one possible implementation manner, when the position of the target data in the loaded data meets a first preset condition, loading a first batch of data; and loading a second batch of data when the position of the target data in the loaded data meets a second preset condition.
The first preset condition is that the position of the target data in the loaded data is before a first preset position, and accordingly, the first batch of data is a batch of data before the currently loaded data, such as Set (N-1). The first preset position may be an empirical value, that is, when it is determined that the current data is displayed at a certain position according to an actual situation, the remaining data needs to be loaded. Accordingly, the first preset condition may be that index < experience value, and if index < experience value, the electronic device may load a previous batch of data of currently loaded data. Taking a calendar as an example, if the currently loaded data of the electronic device is all calendar data in 2018, when moving to a certain data in month 1 of 2018, the data in 2017 needs to be loaded in advance.
The second preset condition is that the position of the target data in the loaded data is behind a second preset position, and accordingly, the second batch of data is a batch of data after the currently loaded data, such as Set (N + 1). The second preset position is determined according to the number of the loaded data and the first preset position. For example, if the number of the loaded data is set.length, the second preset condition may be that index > set.length-an empirical value, and if index > set.length-an empirical value, the electronic device may load a batch of data after the currently loaded data. Taking a calendar as an example, if the electronic device has currently loaded all calendar data in 2018, when moving to a certain data in 12 months in 2018, the data in 2019 needs to be loaded in advance.
When the position of the target data in the loaded data meets the preset condition, the next batch of data is loaded in advance, so that when a user operates the control, the electronic equipment can display new data in time, and the user can not feel the pause feeling caused by loading one data in the middle, so that the user experience the same as that of loading all calendar data of each year at one time is achieved, and the performance of the electronic equipment is not influenced.
It should be noted that, in consideration of that a user may trigger a control instruction for a control through different operation modes, for example, a first control instruction is triggered by dragging an operation of a mouse for the control, or a second control instruction is triggered by a key operation of a remote controller, and different control instructions need different times for preloading data, the electronic device may set different preset conditions for the different control instructions.
In a possible implementation manner, when the control instruction is a first control instruction and the position of the target data in the loaded data meets a preset condition corresponding to the first control instruction, the electronic device may load a next batch of data different from the loaded data; when the control instruction is a second control instruction and the position of the target data in the loaded data meets the preset condition corresponding to the second control instruction, the electronic device can load the next batch of data different from the loaded data.
Specifically, when the position of the target data in the loaded data meets a first preset condition corresponding to the first control instruction or the second control instruction, loading a first batch of data, wherein different control instructions correspond to different first preset conditions; and loading a second batch of data when the position of the target data in the loaded data meets a second preset condition corresponding to the first control instruction or the second control instruction, wherein different control instructions correspond to different second preset conditions. The specific implementation process has been specifically described in the foregoing, and is not described herein again.
When the positions of the target data in the loaded data meet different conditions, different data are loaded, so that a user can not feel the feeling of blocking caused by the fact that one loaded data exists in the middle, the reliability of data loading is improved, the use of a user scene can be guaranteed, and the consumption of resources such as a CPU (central processing unit) is not increased.
It should be noted that, if the position of the target data in the loaded data does not satisfy the preset condition, the electronic device may continue to monitor the callback of the display data in the control, and once the callback is received, obtain the target data again, and determine whether the position of the target data in the loaded data satisfies the preset condition.
204. And when a closing instruction of the interface is received, cancelling call-back for monitoring display data in the control, and releasing all loaded data.
In the embodiment of the invention, when a user wants to close the interface a, a closing instruction of the interface a can be triggered through corresponding operation, for example, the user can click a return button at the upper left corner of the interface through a mouse or press a return button of a remote controller. When the electronic device receives the closing instruction, the interface a can be closed, the monitoring is cancelled, and all data are released, so that the memory occupied by the data is released.
According to the method provided by the embodiment of the invention, the callback of the display data in the control is monitored, so that the position of the target data in the loaded data can be acquired through the callback, and whether the data is loaded or not is determined according to whether the position meets the preset condition or not. According to the scheme, the opportunity for loading the data is determined by monitoring the callback, the data is loaded without depending on the change of the focus, and the accuracy and the timeliness of the data loading can be greatly improved.
Fig. 4 is a schematic structural diagram of an apparatus for loading data for a display device according to an embodiment of the present invention. Referring to fig. 4, the apparatus includes:
the obtainingmodule 401 is configured to, when a control instruction for a control on a display device interface is received, obtain a position of target data in the loaded data by monitoring a callback of display data in the control;
aloading module 402, configured to load a next batch of data different from the loaded data when a position of the target data in the loaded data meets a preset condition;
the target data is the last data displayed on the interface in the control, and the loaded data is all data currently loaded in the control.
Optionally, the control instruction is triggered by a drag operation of a mouse on the control or by a button of the remote control device.
Optionally, the callback is used to indicate the target data;
accordingly, the obtainingmodule 401 is configured to determine the target data when receiving the callback; and acquiring the position of the target data in the loaded data according to the arrangement sequence of the target data in the loaded data.
Optionally, the callback is used to indicate the location of the target data in the loaded data;
accordingly, the obtainingmodule 401 is configured to obtain the location of the target data in the loaded data when the callback is received.
Optionally, theloading module 402 is further configured to load preset data to the control when a display instruction for the interface is received;
the obtainingmodule 401 is further configured to monitor a callback of display data in the control.
Optionally, theloading module 402 is configured to load a first batch of data when a position of the target data in the loaded data meets a first preset condition; and loading a second batch of data when the position of the target data in the loaded data meets a second preset condition.
Optionally, the first preset condition is that the position of the target data in the loaded data is before a first preset position, the second preset condition is that the position of the target data in the loaded data is after a second preset position, and the second preset position is determined according to the number of the loaded data and the first preset position.
In the embodiment of the invention, the callback of the display data in the control is monitored, so that the position of the target data in the loaded data can be acquired through the callback, and whether the data is loaded or not is determined according to whether the position meets the preset condition or not. According to the scheme, the opportunity for loading the data is determined by monitoring the callback, the data is loaded without depending on the change of the focus, and the accuracy and the timeliness of the data loading can be greatly improved.
It should be noted that: in the apparatus for loading data for a display device according to the above embodiment, when loading data, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for loading data by a display device provided in the foregoing embodiment and the method embodiment for loading data by a display device belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiment and are not described herein again.
Fig. 5 is a schematic structural diagram of anelectronic device 500 according to an embodiment of the present invention. Theelectronic device 500 may be: smart phones, tablet computers, MP3 players (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4), notebook computers, or desktop computers. Theelectronic device 500 may also be referred to by other names as user equipment, portable electronic device, laptop electronic device, desktop electronic device, and so on.
In general, theelectronic device 500 includes: aprocessor 501 and amemory 502.
Theprocessor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. Theprocessor 501 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). Theprocessor 501 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, theprocessor 501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments,processor 501 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory.Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium inmemory 502 is used to store at least one instruction for execution byprocessor 501 to implement the method for display device loading data provided by the method embodiments herein.
In some embodiments, theelectronic device 500 may further optionally include: aperipheral interface 503 and at least one peripheral. Theprocessor 501,memory 502 andperipheral interface 503 may be connected by a bus or signal lines. Each peripheral may be connected to theperipheral interface 503 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one ofradio frequency circuitry 504,display screen 505,camera 506,audio circuitry 507,positioning components 508, andpower supply 509.
Theperipheral interface 503 may be used to connect at least one peripheral related to I/O (Input/Output) to theprocessor 501 and thememory 502. In some embodiments, theprocessor 501,memory 502, andperipheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of theprocessor 501, thememory 502, and theperipheral interface 503 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
TheRadio Frequency circuit 504 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. Theradio frequency circuitry 504 communicates with communication networks and other communication devices via electromagnetic signals. Therf circuit 504 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, theradio frequency circuit 504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. Theradio frequency circuitry 504 may communicate with other electronic devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, therf circuit 504 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
Thedisplay screen 505 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When thedisplay screen 505 is a touch display screen, thedisplay screen 505 also has the ability to capture touch signals on or over the surface of thedisplay screen 505. The touch signal may be input to theprocessor 501 as a control signal for processing. At this point, thedisplay screen 505 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, thedisplay screen 505 may be one, providing the front panel of theelectronic device 500; in other embodiments, the display screens 505 may be at least two, respectively disposed on different surfaces of theelectronic device 500 or in a folded design; in still other embodiments, thedisplay 505 may be a flexible display disposed on a curved surface or on a folded surface of theelectronic device 500. Even more, thedisplay screen 505 can be arranged in a non-rectangular irregular figure, i.e. a shaped screen. TheDisplay screen 505 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
Thecamera assembly 506 is used to capture images or video. Optionally,camera assembly 506 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of an electronic apparatus, and a rear camera is disposed on a rear surface of the electronic apparatus. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments,camera assembly 506 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 507 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to theprocessor 501 for processing, or inputting the electric signals to theradio frequency circuit 504 to realize voice communication. For stereo capture or noise reduction purposes, the microphones may be multiple and disposed at different locations of theelectronic device 500. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from theprocessor 501 or theradio frequency circuit 504 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments,audio circuitry 507 may also include a headphone jack.
Thepositioning component 508 is used to locate the current geographic Location of theelectronic device 500 for navigation or LBS (Location Based Service). ThePositioning component 508 may be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union's galileo System.
Thepower supply 509 is used to power the various components in theelectronic device 500. Thepower source 509 may be alternating current, direct current, disposable or rechargeable. Whenpower supply 509 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, theelectronic device 500 also includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: acceleration sensor 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, optical sensor 515, and proximity sensor 516.
The acceleration sensor 511 may detect the magnitude of acceleration on three coordinate axes of a coordinate system established with theelectronic device 500. For example, the acceleration sensor 511 may be used to detect components of the gravitational acceleration in three coordinate axes. Theprocessor 501 may control thetouch screen 505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 511. The acceleration sensor 511 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 512 may detect a body direction and a rotation angle of theelectronic device 500, and the gyro sensor 512 may cooperate with the acceleration sensor 511 to acquire a 3D motion of the user on theelectronic device 500. Theprocessor 501 may implement the following functions according to the data collected by the gyro sensor 512: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensors 513 may be disposed on a side bezel of theelectronic device 500 and/or on an underlying layer of thetouch display screen 505. When the pressure sensor 513 is disposed on the side frame of theelectronic device 500, the holding signal of the user to theelectronic device 500 can be detected, and theprocessor 501 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed at the lower layer of thetouch display screen 505, theprocessor 501 controls the operability control on the UI interface according to the pressure operation of the user on thetouch display screen 505. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 514 is used for collecting a fingerprint of the user, and theprocessor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, theprocessor 501 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 514 may be disposed on the front, back, or side of theelectronic device 500. When a physical button or vendor Logo is provided on theelectronic device 500, the fingerprint sensor 514 may be integrated with the physical button or vendor Logo.
The optical sensor 515 is used to collect the ambient light intensity. In one embodiment, theprocessor 501 may control the display brightness of thetouch display screen 505 based on the ambient light intensity collected by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of thetouch display screen 505 is increased; when the ambient light intensity is low, the display brightness of thetouch display screen 505 is turned down. In another embodiment,processor 501 may also dynamically adjust the shooting parameters ofcamera head assembly 506 based on the ambient light intensity collected by optical sensor 515.
A proximity sensor 516, also known as a distance sensor, is typically disposed on the front panel of theelectronic device 500. The proximity sensor 516 is used to capture the distance between the user and the front of theelectronic device 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front surface of theelectronic device 500 gradually decreases, theprocessor 501 controls thetouch display screen 505 to switch from the bright screen state to the dark screen state; when the proximity sensor 516 detects that the distance between the user and the front surface of theelectronic device 500 becomes gradually larger, theprocessor 501 controls thetouch display screen 505 to switch from the screen-on state to the screen-on state.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is not intended to be limiting of theelectronic device 500 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, storing a computer program is also provided, which when executed by a processor implements the method for a display device to load data in the above embodiments. For example, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.