Nothing Special   »   [go: up one dir, main page]

CN117667295B - Display method, device and storage medium of dynamic wallpaper - Google Patents

Display method, device and storage medium of dynamic wallpaper Download PDF

Info

Publication number
CN117667295B
CN117667295B CN202410147253.5A CN202410147253A CN117667295B CN 117667295 B CN117667295 B CN 117667295B CN 202410147253 A CN202410147253 A CN 202410147253A CN 117667295 B CN117667295 B CN 117667295B
Authority
CN
China
Prior art keywords
dynamic wallpaper
frame
wallpaper
target
dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410147253.5A
Other languages
Chinese (zh)
Other versions
CN117667295A (en
Inventor
朱金武
黄德安
陈子文
姜亚明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Imyfone Technology Co ltd
Original Assignee
Shenzhen Imyfone Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Imyfone Technology Co ltd filed Critical Shenzhen Imyfone Technology Co ltd
Priority to CN202410147253.5A priority Critical patent/CN117667295B/en
Publication of CN117667295A publication Critical patent/CN117667295A/en
Application granted granted Critical
Publication of CN117667295B publication Critical patent/CN117667295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The invention relates to the field of image processing, and discloses a display method, equipment and a storage medium of dynamic wallpaper. The method comprises the following steps: when the dynamic wallpaper is detected, the 1 st frame of the dynamic wallpaper is used as a reference frame of the target dynamic wallpaper to be stored, and whether the n+1st frame of the dynamic wallpaper is the same as the n+2st frame of the dynamic wallpaper is judged, wherein n is an integer which starts to be increased from 0; if the difference areas are different, performing difference area calculation to obtain a difference area; storing the difference area as an n+2 frame of the target dynamic wallpaper, wherein the target dynamic wallpaper is obtained when all frames in the dynamic wallpaper are judged; when a display request is detected, taking the 1 st frame in the target dynamic wallpaper as the canvas ground color; and displaying an m+1st frame of the target dynamic wallpaper on the canvas, wherein m is an integer which starts to increment from 1 and is less than or equal to n+1 in response to the display request. In the embodiment of the invention, the waste of computing resources is reduced.

Description

Display method, device and storage medium of dynamic wallpaper
Technical Field
The present invention relates to the field of image processing, and in particular, to a method and apparatus for displaying dynamic wallpaper, and a storage medium.
Background
In the context of rapid development of the internet, people have increasingly demanded videos, and meanwhile, dynamic wallpaper with videos as the background is also increasingly popular on Win. Video is transmitted and played without separation, and as dynamic wallpaper, video is played continuously and circularly, and the performance consumption of real-time decoding is huge.
Current video codecs, such as h264 and h265 (hevc), often consume more hardware resources in the encoding and decoding processes. If the method is directly applied as desktop wallpaper, the method is equivalent to continuous encoding and decoding operations in the background, and computer resources can be continuously consumed. Causing waste of computing resources.
Disclosure of Invention
The invention mainly aims to solve the technical problem of waste of computing resources caused by current video encoding and decoding.
The first aspect of the present invention provides a method for displaying dynamic wallpaper, where the method for displaying dynamic wallpaper includes:
When the dynamic wallpaper is detected, the 1 st frame of the dynamic wallpaper is used as a reference frame of the target dynamic wallpaper to be stored, and whether the n+1st frame of the dynamic wallpaper is the same as the n+2st frame of the dynamic wallpaper is judged, wherein n is an integer which is increased from 0;
If the n+1st frame of the dynamic wallpaper is different from the n+2nd frame of the dynamic wallpaper, performing difference area calculation on the n+1st frame of the dynamic wallpaper and the n+2nd frame of the dynamic wallpaper to obtain a difference area;
Storing the difference area as an n+2 frame of the target dynamic wallpaper, wherein the target dynamic wallpaper is obtained when all frames in the dynamic wallpaper are judged;
when a display request is detected, taking the 1 st frame in the target dynamic wallpaper as the bottom color of the canvas;
And displaying an m+1st frame of the target dynamic wallpaper on the canvas, wherein m is an integer which is increased from 1 and is less than or equal to n+1 in response to the display request.
Optionally, in a first implementation manner of the first aspect of the present invention, after the step of storing the 1 st frame of the dynamic wallpaper as a reference frame and determining whether the n+1st frame is the same as the n+2nd frame, the method further includes:
If the n+1th frame of the dynamic wallpaper is the same as the n+2th frame of the dynamic wallpaper, the n+2th frame of the dynamic wallpaper is identified to be the same as the n+1th frame of the dynamic wallpaper.
Optionally, in a second implementation manner of the first aspect of the present invention, if the n+1st frame is different from the n+2nd frame, performing difference region calculation on the n+1st frame and the n+2nd frame, and obtaining the difference region includes:
performing difference judgment on the n+1th frame of the dynamic wallpaper and the n+2th frame of the dynamic wallpaper to obtain an initial difference region;
dividing a first region corresponding to the initial difference region in an n+1th frame of the dynamic wallpaper into a first fragment set, and dividing a second region corresponding to the initial difference region in an n+2th frame of the dynamic wallpaper into a second fragment set;
Extracting a third fragment set which is different from the first fragment set from the second fragment set;
and performing splicing operation on the third fragment set to obtain the difference region.
Optionally, in a third implementation manner of the first aspect of the present invention, the step of dividing a first area corresponding to the initial difference area in an n+1th frame of the dynamic wallpaper into a first fragment set, and dividing a second area corresponding to the initial difference area in an n+2th frame of the dynamic wallpaper into a second fragment set includes:
According to a preset shape, a first region corresponding to the initial difference region in an n+1th frame of the dynamic wallpaper is divided into a first fragment set, and according to the preset shape, a second region corresponding to the initial difference region in an n+2th frame of the dynamic wallpaper is divided into a second fragment set.
Optionally, in a fourth implementation manner of the first aspect of the present invention, if the n+1th frame is different from the n+2th frame, performing difference region calculation on the n+1th frame and the n+2th frame, and obtaining the difference region includes:
performing pixel point association on the (n+1) th frame of the dynamic wallpaper and the (n+2) th frame of the dynamic wallpaper to obtain a pixel corresponding relation;
dividing the (n+1) th frame of the dynamic wallpaper into a first fragment set, and correspondingly dividing the (n+2) th frame of the dynamic wallpaper into a second fragment set;
Extracting a third fragment set which is different from the first fragment set from the second fragment set according to the pixel corresponding relation;
and according to the pixel corresponding relation, performing a splicing operation on the third fragment set to obtain the difference region.
Optionally, in a fifth implementation manner of the first aspect of the present invention, before the step of detecting the dynamic wallpaper, the method further includes:
when a setting request of dynamic wallpaper is detected, extracting a video carried by the setting request;
And taking the video as the dynamic wallpaper.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the step of using the video as the dynamic wallpaper includes:
Invoking MediaInfo a tool to detect a video format of the video;
If the video format is not the RGB format, selecting a target conversion algorithm from preset conversion algorithms according to the video format;
And executing format conversion operation on the video according to the target conversion algorithm to obtain target video in RGB format, and taking the implementation target video as dynamic wallpaper.
Optionally, in a seventh implementation manner of the first aspect of the present invention, after the step of storing the 1 st frame of the dynamic wallpaper as the reference frame of the target dynamic wallpaper when the dynamic wallpaper is detected, the method further includes:
When an adding instruction of the additional information is detected, extracting text information carried by the adding instruction;
executing semantic analysis on the text information to obtain an analysis result;
judging whether the analysis result corresponds to a target semantic type in preset semantic types or not;
If the analysis result corresponds to a target semantic type in the preset semantic types, determining target area coordinates associated with the target semantic type in the reference frame;
And rendering the additional information to the target area coordinates to update the reference frame.
A second aspect of the present invention provides a display device of dynamic wallpaper, comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the display device of the dynamic wallpaper to perform the display method of the dynamic wallpaper.
A third aspect of the present invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of displaying dynamic wallpaper as described above.
In the embodiment of the invention, when the dynamic wallpaper is detected, the display equipment of the dynamic wallpaper can capture the first frame of the dynamic wallpaper first and take the first frame as the basis for subsequent comparison and processing. The content of the dynamic wallpaper is then compared from frame to determine whether the two frames are identical. When the two frames are found to be different in content, the region of difference between the two frames is calculated. The difference region is stored as the n+2 frame of the target dynamic wallpaper, which means that the display device of the dynamic wallpaper will store the calculated difference region as a new frame, thereby constructing a new dynamic wallpaper. When the dynamic wallpaper is required to be displayed, the display device of the dynamic wallpaper takes the first frame as the background color of the canvas. And displaying the m+1st frame of the target dynamic wallpaper on the canvas in response to the display request. When it is detected that two consecutive frames are different, only the region of difference between the two frames is calculated, rather than recomputing the contents of the entire canvas. Unnecessary computation is reduced, especially for large-area varying areas. Since only the part that differs from the previous frame is stored instead of the whole new frame, the use of storage resources is also optimized. In a scenario with a large number of consecutive frames, the storage space requirement can be significantly reduced. When displaying dynamic wallpaper, the display device of the dynamic wallpaper only updates the changed area, not the entire canvas. Unnecessary redrawing or flickering is avoided, thereby reducing the computational burden of the GPU and CPU. Since the change of the dynamic wallpaper content can be automatically detected, the allocation of the computing resources can be adjusted according to the actual change condition of the wallpaper. The method and the device can more efficiently cope with the change of various dynamic contents, and further reduce the waste of computing resources.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for displaying dynamic wallpaper according to an embodiment of the invention;
FIG. 2 is a diagram of a step 102 of a method for displaying dynamic wallpaper according to an embodiment of the invention;
FIG. 3 is a diagram of an embodiment of a method for displaying dynamic wallpaper according to an embodiment of the invention, before step 101;
FIG. 4 is a diagram of an embodiment of a method 101 for displaying dynamic wallpaper according to an embodiment of the invention;
fig. 5 is a schematic diagram of an embodiment of a display device of dynamic wallpaper according to an embodiment of the invention.
Detailed Description
The embodiment of the invention provides a display method, equipment and storage medium of dynamic wallpaper.
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the present disclosure has been illustrated in the drawings in some form, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and examples of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
In describing embodiments of the present disclosure, the term "comprising" and its like should be taken to be open-ended, i.e., including, but not limited to. The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first," "second," and the like, may refer to different or the same object. Other explicit and implicit definitions are also possible below.
For easy understanding, the following describes a specific flow of an embodiment of the present invention, referring to fig. 1, and one embodiment of a method for displaying dynamic wallpaper in an embodiment of the present invention includes:
101. When the dynamic wallpaper is detected, the 1 st frame of the dynamic wallpaper is used as a reference frame of the target dynamic wallpaper to be stored, and whether the n+1st frame of the dynamic wallpaper is the same as the n+2st frame of the dynamic wallpaper is judged, wherein n is an integer which is increased from 0;
Specifically, n=0 is set, and the target dynamic wallpaper is empty. And reading the 1 st frame of the dynamic wallpaper, and storing the 1 st frame as a reference frame into the target dynamic wallpaper.
Judging whether n is smaller than the total frame number of the dynamic wallpaper: if yes, increasing n by 1, and entering the next step; otherwise, the algorithm is ended.
And reading an n+1th frame and an n+2th frame of the dynamic wallpaper.
Compare whether the n+1st frame and the n+2nd frame are identical: if the number of the dynamic wallpaper is equal to the number of the dynamic wallpaper, increasing n by 1, and returning to execute the judgment of whether n is smaller than the total frame number of the dynamic wallpaper; if it is different, the next step is performed.
And carrying out difference region calculation on the n+1th frame and the n+2th frame to obtain a difference region.
And storing the difference area as an n+2 frame of the target dynamic wallpaper. And increasing n by 1, and returning to execute the judgment whether n is smaller than the total frame number of the dynamic wallpaper.
Through the algorithm, the target dynamic wallpaper can be gradually constructed, and only the part which is different from the previous frame is stored, so that the aims of saving storage space and reducing the waste of computing resources are realized.
Optionally, if the n+1th frame of the dynamic wallpaper is the same as the n+2th frame of the dynamic wallpaper, the n+2th frame of the dynamic wallpaper is identified as the n+1th frame of the dynamic wallpaper. Wherein by identifying which frames are identical, the display device of the dynamic wallpaper may skip the frames faster, thereby speeding up the construction process of the dynamic wallpaper. Unnecessary repeated calculation and storage are avoided, and the algorithm efficiency is improved. No difference calculation and storage is required between consecutive identical frames. By identifying these same frames, the display device of the dynamic wallpaper may skip these redundant steps, thereby saving computing resources.
102. If the n+1st frame of the dynamic wallpaper is different from the n+2nd frame of the dynamic wallpaper, performing difference area calculation on the n+1st frame of the dynamic wallpaper and the n+2nd frame of the dynamic wallpaper to obtain a difference area;
Specifically, the n+1st frame and the n+2nd frame of the dynamic wallpaper are read.
Calculating a difference region between the n+1st frame and the n+2nd frame:
For each pixel, it is compared whether the pixel values of the two frames at that location are the same.
If different, the pixel point is marked as part of the difference region.
And repeatedly calculating the difference area between the n+1th frame and the n+2th frame until all the pixel points are compared.
And storing the obtained difference area as an n+2 frame of the target dynamic wallpaper.
Through the algorithm, the difference region between the n+1st frame and the n+2nd frame can be accurately calculated, so that only the changed region is updated, and the aim of reducing the waste of calculation resources is fulfilled.
Specifically, referring to fig. 2, fig. 2 is a schematic diagram showing a specific embodiment of a step 102 of a method for displaying dynamic wallpaper according to an embodiment of the present invention, where the step 102 includes the following specific embodiments:
1021. Performing difference judgment on the n+1th frame of the dynamic wallpaper and the n+2th frame of the dynamic wallpaper to obtain an initial difference region;
1022. Dividing a first region corresponding to the initial difference region in an n+1th frame of the dynamic wallpaper into a first fragment set, and dividing a second region corresponding to the initial difference region in an n+2th frame of the dynamic wallpaper into a second fragment set;
Optionally, according to a preset shape, the first region corresponding to the initial difference region in the n+1th frame of the dynamic wallpaper is divided into a first fragment set, and according to a preset shape, the second region corresponding to the initial difference region in the n+2th frame of the dynamic wallpaper is divided into a second fragment set. The display device of the dynamic wallpaper can divide the difference area in a consistent way by using the preset shape, so that all the fragment sets are ensured to have similar shapes and sizes. This helps to improve the consistency and predictability of subsequent processing steps. Segmentation using preset shapes may allow for more standardization and simplification of the process flow. The display device of the dynamic wallpaper can perform the segmentation operation faster, reduces the need for manual adjustment and intervention, and improves the efficiency.
1023. Extracting a third fragment set which is different from the first fragment set from the second fragment set;
1024. And performing splicing operation on the third fragment set to obtain the difference region.
In steps 1021-1024, the display device of the dynamic wallpaper can more accurately identify the specific difference between the n+1st frame and the n+2nd frame by dividing the difference region into smaller sets of fragments. This helps to improve the accuracy and efficiency of subsequent processing steps. By subdividing the difference region into a set of fragments, the display device of the dynamic wallpaper may more efficiently store and transmit such difference information. Smaller sets of shards may reduce the occupation of memory space while also helping to transfer differential data more quickly. By extracting a third set of fragments that is different from the first set of fragments, the display device of the dynamic wallpaper may more finely process these particular areas. By performing a stitching operation on the third set of fragments, the display device of the dynamic wallpaper may more quickly construct the n+2 frame of the target dynamic wallpaper. By processing only the actually changed region, unnecessary redrawing or rendering operations can be reduced, thereby improving the display efficiency of the dynamic wallpaper.
Optionally, step 102 further includes the following embodiments:
1025. Performing pixel point association on the (n+1) th frame of the dynamic wallpaper and the (n+2) th frame of the dynamic wallpaper to obtain a pixel corresponding relation;
1026. Dividing the (n+1) th frame of the dynamic wallpaper into a first fragment set, and correspondingly dividing the (n+2) th frame of the dynamic wallpaper into a second fragment set;
1027. Extracting a third fragment set which is different from the first fragment set from the second fragment set according to the pixel corresponding relation;
1028. And according to the pixel corresponding relation, performing a splicing operation on the third fragment set to obtain the difference region.
In steps 1021-1024, the display device of the dynamic wallpaper is able to accurately identify the difference between the n+1st frame and the n+2nd frame at the pixel level by pixel point association. This helps to more accurately determine the region of discrepancy, improving the accuracy of the subsequent processing steps. By dividing the n+1st frame and the n+2nd frame into sets of fragments, respectively, the display device of the dynamic wallpaper can perform efficient difference detection and processing on the fragments. The difference region calculation method based on the pixel correspondence allows the display device of the dynamic wallpaper to perform finer difference processing on the fragment set.
103. The difference area is stored as an n+2th frame of the target dynamic wallpaper, wherein the target dynamic wallpaper is obtained when all frames in the dynamic wallpaper are judged;
Specifically, the calculated difference region is stored as the n+2th frame. Checking whether the dynamic wallpaper has residual frames or not, and judging whether the dynamic wallpaper has residual frames or not: if yes, increasing n by 1, and returning to the step 3; and if not, ending the algorithm to obtain the target dynamic wallpaper.
Through the algorithm, the target dynamic wallpaper can be gradually constructed, and only the part which is different from the previous frame is stored, so that the aims of saving storage space and reducing the waste of computing resources are realized.
104. When a display request is detected, taking the 1 st frame in the target dynamic wallpaper as the bottom color of the canvas;
specifically, when a display request is detected, the 1 st frame is read from the target dynamic wallpaper. And displaying the read 1 st frame as the background color of the canvas. The operation can take the 1 st frame as the ground color of canvas when displaying dynamic wallpaper, and provides a foundation for the display of the subsequent frames.
105. Displaying an m+1st frame of the target dynamic wallpaper on the canvas in response to the display request, wherein m is an integer increasing from 1 and is less than or equal to n+1;
Specifically, m=1, n is set as the increment integer calculated in the previous step.
When a display request is detected, the next step is entered.
And reading the m+1st frame from the target dynamic wallpaper.
And displaying the read m+1st frame on a canvas.
Checking whether m is equal to or less than n+1: if yes, increasing m by 1, and returning to execute the reading of the (m+1) th frame from the target dynamic wallpaper; otherwise, the algorithm is ended.
Through the algorithm, the target dynamic wallpaper can be displayed frame by frame so as to respond to the display request, and smooth display of the dynamic wallpaper is realized. Only the changed area is updated each time, unnecessary redrawing or flickering is avoided, and accordingly the waste of computing resources is reduced.
Specifically, referring to fig. 3, fig. 3 is a schematic diagram showing a specific embodiment before step 101 of the method for displaying dynamic wallpaper according to an embodiment of the invention, where step 101 includes the following specific embodiments:
106. when a setting request of dynamic wallpaper is detected, extracting a video carried by the setting request;
107. And taking the video as the dynamic wallpaper.
In steps 106-107, the display device of the dynamic wallpaper can automatically extract video and convert the video into the dynamic wallpaper, thereby providing great convenience for users. The video extraction and conversion are automatically processed, so that errors possibly caused by manual operation of a user, such as file path errors, unsupported file formats and the like, are reduced. It is ensured that the source video of the dynamic wallpaper is desired by the user. For users unfamiliar with how to set dynamic wallpaper, the set threshold is lowered.
Specifically, referring to fig. 4, fig. 4 is a schematic diagram of a specific embodiment after step 101 of the method for displaying dynamic wallpaper according to an embodiment of the present invention, and the following specific implementation manner is further included after step 101:
108. When an adding instruction of the additional information is detected, extracting text information carried by the adding instruction;
109. executing semantic analysis on the text information to obtain an analysis result;
110. Judging whether the analysis result corresponds to a target semantic type in preset semantic types or not;
111. if the analysis result corresponds to a target semantic type in the preset semantic types, determining target area coordinates associated with the target semantic type in the reference frame;
112. And rendering the additional information to the target area coordinates to update the reference frame.
In steps 108-112, the user can automatically add text information to the dynamic wallpaper by adding instructions, without manual manipulation, providing convenience. According to the method, the meaning of the text information is judged through semantic analysis, and the coordinates of the target area in the reference frame are determined according to the preset semantic type, so that the text information can be flexibly rendered in a proper area, and customization and individuation of the dynamic wallpaper are improved. According to the method, text information can be updated in the reference frame, so that the dynamic wallpaper can be dynamically changed according to the instruction of a user, and the interactivity and the dynamic property of the dynamic wallpaper are improved.
In the embodiment of the invention, when the dynamic wallpaper is detected, the display equipment of the dynamic wallpaper can capture the first frame of the dynamic wallpaper first and take the first frame as the basis for subsequent comparison and processing. The content of the dynamic wallpaper is then compared from frame to determine whether the two frames are identical. When the two frames are found to be different in content, the region of difference between the two frames is calculated. The difference region is stored as the n+2 frame of the target dynamic wallpaper, which means that the display device of the dynamic wallpaper will store the calculated difference region as a new frame, thereby constructing a new dynamic wallpaper. When the dynamic wallpaper is required to be displayed, the display device of the dynamic wallpaper takes the first frame as the background color of the canvas. And displaying the m+1st frame of the target dynamic wallpaper on the canvas in response to the display request. When it is detected that two consecutive frames are different, only the region of difference between the two frames is calculated, rather than recomputing the contents of the entire canvas. Unnecessary computation is reduced, especially for large-area varying areas. Since only the part that differs from the previous frame is stored instead of the whole new frame, the use of storage resources is also optimized. In a scenario with a large number of consecutive frames, the storage space requirement can be significantly reduced. When displaying dynamic wallpaper, the display device of the dynamic wallpaper only updates the changed area, not the entire canvas. Unnecessary redrawing or flickering is avoided, thereby reducing the computational burden of the GPU and CPU. Since the change of the dynamic wallpaper content can be automatically detected, the allocation of the computing resources can be adjusted according to the actual change condition of the wallpaper. The method and the device can more efficiently cope with the change of various dynamic contents, and further reduce the waste of computing resources.
5 fig. 5 is a schematic structural diagram of a display device of dynamic wallpaper according to an embodiment of the invention, where the display device 500 of dynamic wallpaper may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 510 (e.g., one or more processors) and a memory 520, one or more storage media 530 (e.g., one or more mass storage devices) storing application programs 533 or data 532. Wherein memory 520 and storage medium 530 may be transitory or persistent storage. The program stored on the storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the display device 500 of the dynamic wallpaper. Still further, the processor 510 may be configured to communicate with the storage medium 530 to execute a series of instruction operations in the storage medium 530 on the display device 500 of the dynamic wallpaper.
The dynamic wallpaper-based display device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input/output interfaces 560, and/or one or more operating systems 531, such as Windows Serve, mac OS X, unix, linux, free BSD, and the like. It will be appreciated by those skilled in the art that the display device structure of the dynamic wallpaper shown in fig. 5 does not constitute a limitation of the dynamic wallpaper based display device, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, when the instructions are executed on a computer, cause the computer to perform the steps of the method for displaying dynamic wallpaper.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Moreover, although operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (8)

1. The display method of the dynamic wallpaper is characterized by comprising the following steps of:
When the dynamic wallpaper is detected, the 1 st frame of the dynamic wallpaper is used as a reference frame of the target dynamic wallpaper to be stored, and whether the n+1st frame of the dynamic wallpaper is the same as the n+2st frame of the dynamic wallpaper is judged, wherein n is an integer which is increased from 0;
If the n+1st frame of the dynamic wallpaper is different from the n+2nd frame of the dynamic wallpaper, performing difference area calculation on the n+1st frame of the dynamic wallpaper and the n+2nd frame of the dynamic wallpaper to obtain a difference area;
Storing the difference area as an n+2 frame of the target dynamic wallpaper, wherein the target dynamic wallpaper is obtained when all frames in the dynamic wallpaper are judged;
when a display request is detected, taking the 1 st frame in the target dynamic wallpaper as the bottom color of the canvas;
displaying an m+1st frame of the target dynamic wallpaper on the canvas in response to the display request, wherein m is an integer increasing from 1 and is less than or equal to n+1;
if the n+1st frame of the dynamic wallpaper is different from the n+2nd frame of the dynamic wallpaper, performing difference region calculation on the n+1st frame of the dynamic wallpaper and the n+2nd frame of the dynamic wallpaper, and obtaining a difference region includes:
performing difference judgment on the n+1th frame of the dynamic wallpaper and the n+2th frame of the dynamic wallpaper to obtain an initial difference region;
dividing a first region corresponding to the initial difference region in an n+1th frame of the dynamic wallpaper into a first fragment set, and dividing a second region corresponding to the initial difference region in an n+2th frame of the dynamic wallpaper into a second fragment set;
Extracting a third fragment set which is different from the first fragment set from the second fragment set;
Performing a splicing operation on the third fragment set to obtain the difference region;
the step of dividing the first region corresponding to the initial difference region in the n+1th frame of the dynamic wallpaper into a first fragment set and dividing the second region corresponding to the initial difference region in the n+2th frame of the dynamic wallpaper into a second fragment set includes:
According to a preset shape, a first region corresponding to the initial difference region in an n+1th frame of the dynamic wallpaper is divided into a first fragment set, and according to the preset shape, a second region corresponding to the initial difference region in an n+2th frame of the dynamic wallpaper is divided into a second fragment set.
2. The method for displaying dynamic wallpaper according to claim 1, wherein after the step of storing the 1 st frame of the dynamic wallpaper as a reference frame of a target dynamic wallpaper and determining whether the n+1st frame of the dynamic wallpaper is identical to the n+2nd frame of the dynamic wallpaper, the method further comprises:
If the n+1th frame of the dynamic wallpaper is the same as the n+2th frame of the dynamic wallpaper, the n+2th frame of the dynamic wallpaper is identified to be the same as the n+1th frame of the dynamic wallpaper.
3. The method according to claim 1, wherein if the n+1th frame of the dynamic wallpaper is different from the n+2th frame of the dynamic wallpaper, performing difference region calculation on the n+1th frame of the dynamic wallpaper and the n+2th frame of the dynamic wallpaper, and obtaining the difference region comprises:
performing pixel point association on the (n+1) th frame of the dynamic wallpaper and the (n+2) th frame of the dynamic wallpaper to obtain a pixel corresponding relation;
dividing the (n+1) th frame of the dynamic wallpaper into a first fragment set, and correspondingly dividing the (n+2) th frame of the dynamic wallpaper into a second fragment set;
Extracting a third fragment set which is different from the first fragment set from the second fragment set according to the pixel corresponding relation;
and according to the pixel corresponding relation, performing a splicing operation on the third fragment set to obtain the difference region.
4. The method of displaying dynamic wallpaper according to claim 1, wherein prior to the step of detecting dynamic wallpaper, the method further comprises:
when a setting request of dynamic wallpaper is detected, extracting a video carried by the setting request;
And taking the video as the dynamic wallpaper.
5. The method of displaying dynamic wallpaper according to claim 4, wherein the step of using the video as the dynamic wallpaper comprises:
Invoking MediaInfo a tool to detect a video format of the video;
If the video format is not the RGB format, selecting a target conversion algorithm from preset conversion algorithms according to the video format;
And executing format conversion operation on the video according to the target conversion algorithm to obtain a target video in an RGB format, and taking the target video as dynamic wallpaper.
6. A method of displaying dynamic wallpaper according to any of claims 1-3, wherein after the step of storing the 1 st frame of the dynamic wallpaper as a reference frame of a target dynamic wallpaper upon detection of the dynamic wallpaper, the method further comprises:
When an adding instruction of the additional information is detected, extracting text information carried by the adding instruction;
executing semantic analysis on the text information to obtain an analysis result;
judging whether the analysis result corresponds to a target semantic type in preset semantic types or not;
If the analysis result corresponds to a target semantic type in the preset semantic types, determining target area coordinates associated with the target semantic type in the reference frame;
And rendering the additional information to the target area coordinates to update the reference frame.
7. A display device of dynamic wallpaper, characterized in that the display device of dynamic wallpaper comprises: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
The at least one processor invoking the instructions in the memory to cause the display device of the dynamic wallpaper to perform the display method of the dynamic wallpaper according to any of claims 1-6.
8. A computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements a method of displaying dynamic wallpaper according to any of claims 1-6.
CN202410147253.5A 2024-02-02 2024-02-02 Display method, device and storage medium of dynamic wallpaper Active CN117667295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410147253.5A CN117667295B (en) 2024-02-02 2024-02-02 Display method, device and storage medium of dynamic wallpaper

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410147253.5A CN117667295B (en) 2024-02-02 2024-02-02 Display method, device and storage medium of dynamic wallpaper

Publications (2)

Publication Number Publication Date
CN117667295A CN117667295A (en) 2024-03-08
CN117667295B true CN117667295B (en) 2024-04-16

Family

ID=90073588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410147253.5A Active CN117667295B (en) 2024-02-02 2024-02-02 Display method, device and storage medium of dynamic wallpaper

Country Status (1)

Country Link
CN (1) CN117667295B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672776A (en) * 2017-10-16 2019-04-23 华为技术有限公司 Show the method and terminal of dynamic image
CN114090168A (en) * 2022-01-24 2022-02-25 麒麟软件有限公司 Self-adaptive adjusting method for image output window of QEMU (QEMU virtual machine)
CN114339404A (en) * 2021-12-31 2022-04-12 珠海豹趣科技有限公司 Display method and device of screen protection wallpaper in windows system and electronic equipment
CN115061770A (en) * 2022-08-10 2022-09-16 荣耀终端有限公司 Method and electronic device for displaying dynamic wallpaper
CN116797631A (en) * 2022-03-18 2023-09-22 Tcl科技集团股份有限公司 Differential area positioning method, differential area positioning device, computer equipment and storage medium
CN117193912A (en) * 2023-09-04 2023-12-08 浙江吉利控股集团有限公司 Dynamic wallpaper display method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020139533A1 (en) * 2018-12-26 2020-07-02 Snap Inc. Creation and user interactions with three-dimensional wallpaper on computing devices

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672776A (en) * 2017-10-16 2019-04-23 华为技术有限公司 Show the method and terminal of dynamic image
CN114339404A (en) * 2021-12-31 2022-04-12 珠海豹趣科技有限公司 Display method and device of screen protection wallpaper in windows system and electronic equipment
CN114090168A (en) * 2022-01-24 2022-02-25 麒麟软件有限公司 Self-adaptive adjusting method for image output window of QEMU (QEMU virtual machine)
CN116797631A (en) * 2022-03-18 2023-09-22 Tcl科技集团股份有限公司 Differential area positioning method, differential area positioning device, computer equipment and storage medium
CN115061770A (en) * 2022-08-10 2022-09-16 荣耀终端有限公司 Method and electronic device for displaying dynamic wallpaper
CN117193912A (en) * 2023-09-04 2023-12-08 浙江吉利控股集团有限公司 Dynamic wallpaper display method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于帧差分法与快速图分割相结合的运动目标检测方法;陈佳 等;现代电子技术;20160201;第39卷(第03期);第13-17、22页 *

Also Published As

Publication number Publication date
CN117667295A (en) 2024-03-08

Similar Documents

Publication Publication Date Title
US11317123B2 (en) Systems and methods for using pre-calculated block hashes for image block matching
CN106717007B (en) Cloud end streaming media server
US8812560B2 (en) Dynamically scalable modes
US9754385B2 (en) Efficient encoding of composited display frames
KR20200094364A (en) Method and system for improving compression ratio by difference between blocks of image file
GB2551199A (en) Video data processing system
CN110235176A (en) Processing method and processing device, data transmission method and device, the storage medium of image
US10930020B2 (en) Texture compression using a neural network
CN114116635A (en) Parallel decompression of compressed data streams
CN110662080B (en) Machine-oriented universal coding method
CN111294600A (en) Compression method, decompression method and device for video sequence frame
CN113486881B (en) Text recognition method, device, equipment and medium
CN117667295B (en) Display method, device and storage medium of dynamic wallpaper
CN112153388A (en) Image compression method, device and related equipment
CN109582654B (en) PDF document compression method and device, computer equipment and storage medium
CN108668170B (en) Image information processing method and device, and storage medium
CN108668169B (en) Image information processing method and device, and storage medium
CN101477674A (en) Method for data computation assistance by display card
CN112686109B (en) Method and device for extracting offline video file, electronic equipment and storage medium
JP2014099848A (en) Image division system and image division method
CN115037937B (en) Image compression method, apparatus, device and medium
CN110674348B (en) Video classification method and device and electronic equipment
Tahir et al. A Comprehensive Examination of the WebP utilizing JavaScript and React Library
US20240331203A1 (en) Computer system and data compressing method
US12108091B2 (en) Media data processing method, apparatus and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant