IP Library › Granted Patent US 11,762,675
Granted Patent B2
US 11,762,675 · App. 17/382,157 · Granted Sep 19, 2023

Method and apparatus for loading picture

Inventors: Baoqiu Cui (Beijing, CN); Hua Wu (Beijing, CN); Kang Xie (Beijing, CN)
Assignee: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
G06F9/451G06F3/0483G06F3/0485G06F9/445G06F9/4881G06F16/9574
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,762,675
App. No.
17/382,157
Granted
Sep 19, 2023
Kind
B2
Abstract

The disclosure relates to a method and an apparatus for loading a picture. A target page element is obtained. A motion state of the target page element is obtained. A to-be-loaded picture carried by the target page element is obtained. The to-be-loaded picture is added to a to-be-loaded queue based on the motion state being a scrolling state. The to-be-loaded queue is configured to monitor the to-be-loaded picture based on a change of the motion state. The to-be-loaded picture is added to a loading state based on the motion state changing to a non-scrolling state.

Claims (79)

1. A method for loading a picture, comprising:

obtaining at least one target page element;

obtaining a motion state of the at least one target page element as a scrolling state;

obtaining at least one to-be-loaded picture carried by the at least one target page element;

in response to obtaining the motion state as the scrolling state, adding the at least one to-be-loaded picture to a to-be-loaded queue and not downloading the at least one to-be-loaded picture in the to-be-loaded queue;

setting a motion state label of the at least one to-be-loaded picture as a scrolling state in response to obtaining the motion state of the at least one target page element as the scrolling state;

monitoring the at least one to-be-loaded picture in the to-be-loaded queue by monitoring the motion state of the at least one target page element carrying the at least one to-be-loaded picture;

obtaining that the motion state label of the at least one target page element carrying the at least one to-be-loaded picture in the to-be-loaded queue changes from the scrolling state to a non-scrolling state;

setting the motion state label of the at least one to-be-loaded picture as a non-scrolling state in response to obtaining that the motion state of the at least one target page element changes from the scrolling state to the non-scrolling stat;

moving the at least one to-be-loaded picture from the to-be-loaded queue to a loading queue to be downloaded in response to setting the motion state label of the at least one to-be-loaded picture as the non-scrolling state;

downloading, one by one, the at least one to-be-loaded picture in the loading queue; and

displaying at least one of the at least one downloaded to-be-loaded picture in a display space of an electronic device.

2. The method of claim 1 , further comprising:

obtaining a mounting state of the at least one target page element, wherein the mounting state is configured to indicate whether the at least one target page element is mounted or not;

moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue based on the mounting state indicating that the at least one target page element is mounted and the motion state label being the non-scrolling state, and

adding the at least one to-be-loaded picture to the to-be-loaded queue based on the mounting state indicating that the at least one target page element is mounted and the motion state label being the scrolling state.

3. The method of claim 2 , further comprising:

not adding the at least one to-be-loaded picture to the to-be-loaded queue or moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue based on the mounting state indicating that the at least one target page element is not mounted.

4. The method of claim 1 , further comprising:

obtaining a position state of the at least one target page element,

moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue in response to determining that the at least one target page element is within the display space of the electronic device based on the position state and the motion state label being the non-scrolling state; and

adding the at least one to-be-loaded picture to the to-be-loaded queue in response to determining that the at least one target page element is within the display space of the electronic device based on the position state and the motion state label being the scrolling state.

5. The method of claim 4 , further comprising:

not adding the at least one to-be-loaded picture to the to-be-loaded queue or moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue in response to determining that at least one the target page element is outside the display space of the electronic device based on the position state.

6. The method of claim 1 , further comprising:

removing the at least one to-be-loaded picture from the to-be-loaded queue in response to the at least one target page element being not mounted.

7. A non-transitory computer-readable storage medium, having instructions stored thereon, wherein when the instructions are executed by a processor, the processor is caused to execute a method for loading a picture, the method comprising:

obtaining at least one target page element;

obtaining a motion state of the at least one target page element as a scrolling state;

obtaining at least one to-be-loaded picture carried by the at least one target page element;

in response to obtaining the motion state as the scrolling state, adding the at least one to-be-loaded picture to a to-be-loaded queue and not downloading the at least one to-be-loaded picture in the to-be-loaded queue;

setting a motion state label of the at least one to-be-loaded picture as a scrolling state in response to obtaining the motion state of the at least one target page element as the scrolling state;

monitoring the at least one to-be-loaded picture in the to-be-loaded queue by monitoring the motion state of the at least one target page element carrying the at least one to-be-loaded picture;

obtaining that the motion state label of the at least one target page element carrying the at least one to-be-loaded picture in the to-be-loaded queue changes from the scrolling state to a non-scrolling state;

setting the motion state label of the at least one to-be-loaded picture as a non-scrolling state in response to obtaining that the motion state of the at least one target page element changes from the scrolling state to the non-scrolling stat;

moving the at least one to-be-loaded picture from the to-be-loaded queue to a loading queue to be downloaded in response to setting the motion state label of the at least one to-be-loaded picture as the non-scrolling state;

downloading, one by one, the at least one to-be-loaded picture in the loading queue; and

displaying at least one of the at least one downloaded to-be-loaded picture in a display space of an electronic device.

8. The non-transitory computer-readable storage medium of claim 7 , wherein the method further comprises:

obtaining a mounting state of the at least one target page element, wherein the mounting state is configured to indicate whether the at least one target page element is mounted or not;

moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue based on the mounting state indicating that the at least one target page element is mounted and the motion state label being the non-scrolling state, and

adding the at least one to-be-loaded picture to the to-be-loaded queue based on the mounting state indicating that the at least one target page element is mounted and the motion state label being the scrolling state.

9. The non-transitory computer-readable storage medium of claim 8 , wherein the method further comprises:

not adding the at least one to-be-loaded picture to the to-be-loaded queue or moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue based on the mounting state indicating that the at least one target page element is not mounted.

10. The non-transitory computer-readable storage medium of claim 7 , wherein the method further comprises:

obtaining a position state of the at least one target page element,

moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue in response to determining that the at least one target page element is within the display space of the electronic device based on the position state and the motion state label being the non-scrolling state; and

adding the at least one to-be-loaded picture to the to-be-loaded queue in response to determining that the at least one target page element is within the display space of the electronic device based on the position state and the motion state label being the scrolling state.

11. The non-transitory computer-readable storage medium of claim 10 , wherein the method further comprises:

not adding the at least one to-be-loaded picture to the to-be-loaded queue or moving the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue in response to determining that at least one the target page element is outside the display space of the electronic device based on the position state.

12. An electronic device, comprising:

a processor; and

a memory configured to store instructions executable by the processor;

wherein, the processor is configured to configured to:

obtain at least one target page element;

obtain a motion state of the at least one target page element as a scrolling state;

obtain at least one to-be-loaded picture carried by the at least one target page element;

in response to obtaining the motion state as the scrolling state, add the at least one to-be-loaded picture to a to-be-loaded queue and not downloading the at least one to-be-loaded picture in the to-be-loaded queue;

set a motion state label of the at least one to-be-loaded picture as a scrolling state in response to obtaining the motion state of the at least one target page element as the scrolling state;

monitor the at least one to-be-loaded picture in the to-be-loaded queue by monitoring the motion state of the at least one target page element carrying the at least one to-be-loaded picture;

obtain that the motion state label of the at least one target page element carrying the at least one to-be-loaded picture in the to-be-loaded queue changes from the scrolling state to a non-scrolling state;

set the motion state label of the at least one to-be-loaded picture as a non-scrolling state in response to obtaining that the motion state of the at least one target page element changes from the scrolling state to the non-scrolling stat;

moving the at least one to-be-loaded picture from the to-be-loaded queue to a loading queue to be downloaded in response to setting the motion state label of the at least one to-be-loaded picture as the non-scrolling state;

download, one by one, the at least one to-be-loaded picture in the loading queue; and

display at least one of the at least one downloaded to-be-loaded picture in a display space of an electronic device.

13. The electronic device of claim 12 , wherein the processor is further configured to:

obtain a mounting state of the at least one target page element, wherein the mounting state is configured to indicate whether the at least one target page element is mounted or not;

move the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue based on the mounting state label indicating that the at least one target page element is mounted and the motion state being the non-scrolling state, and

add the at least one to-be-loaded picture to the to-be-loaded queue based on the mounting state indicating that the at least one target page element is mounted and the motion state label being the scrolling state.

14. The electronic device of claim 13 , wherein the processor is further configured to:

not add the at least one to-be-loaded picture to the to-be-loaded queue or move the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue based on the mounting state indicating that the at least one target page element is not mounted.

15. The electronic device of claim 12 , wherein the processor is further configured to:

obtain a position state of the at least one target page element,

move the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue in response to determining that the at least one target page element is within the display space of the electronic device based on the position state and the motion state label being the non-scrolling state; and

add the at least one to-be-loaded picture to the to-be-loaded queue in response to determining that the at least one target page element is within the display space of the electronic device based on the position state and the motion state label being the scrolling state.

16. The electronic device of claim 15 , wherein the processor is further configured to:

not add the at least one to-be-loaded picture to the to-be-loaded queue or move the at least one to-be-loaded picture from the to-be-loaded queue to the loading queue in response to determining that the at least one target page element is outside the display space of the electronic device based on the position state.

17. The electronic device of claim 12 , wherein the processor is further configured to:

remove the at least one to-be-loaded picture from the to-be-loaded queue in response to the at least one target page element being not mounted.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 21, 2021
From: CUI, BAOQIU; WU, HUA; XIE, KANG
To: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
Reel/Frame 056938/0770 →
Priority Claims (1)
CN 202110046009.6 · Jan 14, 2021 · national
Continuity (1)
Related Publication 20220222092A1 · Jul 14, 2022