CN114979749B - Graphic interface drawing method, electronic equipment and readable storage medium - Google Patents

Graphic interface drawing method, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114979749B
CN114979749B CN202210720720.XA CN202210720720A CN114979749B CN 114979749 B CN114979749 B CN 114979749B CN 202210720720 A CN202210720720 A CN 202210720720A CN 114979749 B CN114979749 B CN 114979749B
Authority
CN
China
Prior art keywords
display data
graphical interface
reusable
decoded
elements
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
CN202210720720.XA
Other languages
Chinese (zh)
Other versions
CN114979749A (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 Skyworth RGB Electronics Co Ltd
Original Assignee
Shenzhen Skyworth RGB Electronics 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 Skyworth RGB Electronics Co Ltd filed Critical Shenzhen Skyworth RGB Electronics Co Ltd
Priority to CN202210720720.XA priority Critical patent/CN114979749B/en
Publication of CN114979749A publication Critical patent/CN114979749A/en
Application granted granted Critical
Publication of CN114979749B publication Critical patent/CN114979749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8146Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics

Abstract

The invention discloses a graphic interface drawing method, a graphic interface drawing device, an electronic device and a readable storage medium, which are applied to the technical field of graphic drawing, wherein the graphic interface drawing method comprises the following steps: receiving a drawing request of a graphical interface, and determining an element to be decoded of the graphical interface according to the drawing request; determining non-reusable elements and reusable elements in the elements to be decoded; decoding the non-reusable element to obtain first display data, and obtaining second display data corresponding to the reusable element from a secondary memory drawing area; combining the first display data and the second display data into the graphical interface data; copying the graphic interface data to a main memory drawing area to draw the graphic interface. The graphic interface is drawn through the memory copy, the user cannot feel the decoding display refreshing process of the picture, better interactive experience is brought to the user, and the technical problem of low graphic drawing speed in the prior art is solved.

Description

Graphic interface drawing method, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of graphics rendering technologies, and in particular, to a graphics interface rendering method, an electronic device, and a readable storage medium.
Background
With the popularization of home networks and the improvement of the hardware performance of televisions, televisions are increasingly developed towards networking and intelligent. Along with the release of the valley singing android system, the intelligent process of the television industry is greatly accelerated. However, the android system is designed for small mobile devices such as mobile phones, and is transplanted to large screen devices such as televisions, so that various problems exist, and the greatest challenge is performance for graphical interfaces. For smart televisions, the resolution is 1280×720 and the resolution is 1920×1080, but the difference between the CPU, the memory, etc. and the current mobile phone configuration is not large, in other words, the pixels of the android system on the television that need to be processed under similar hardware performance are as much as 2.5 times to 5.5 times that of the mobile phone device. At present, when a graphic interface is drawn on a television, a picture needs to be decoded firstly, then decoded data is stored in a display memory and finally displayed, if the decoding capability of a processor of the television is limited, the time required for decoding the picture is long, the system is perceived to run slowly and is blocked, and the graphic drawing speed is slow.
Disclosure of Invention
The invention mainly aims to provide a graphic interface drawing method, a graphic interface drawing device, an electronic device and a readable storage medium, and aims to solve the technical problem of low graphic drawing speed in the prior art.
In order to achieve the above object, the present invention provides a graphic interface drawing method applied to a graphic interface drawing apparatus, the graphic interface drawing method comprising:
receiving a drawing request of a graphical interface, and determining an element to be decoded of the graphical interface according to the drawing request;
determining non-reusable elements and reusable elements in the elements to be decoded;
decoding the non-reusable element to obtain first display data, and obtaining second display data corresponding to the reusable element from a secondary memory drawing area;
combining the first display data and the second display data into the graphical interface data;
copying the graphic interface data to a main memory drawing area to draw the graphic interface.
Optionally, the step of determining non-reusable elements and reusable elements of the elements to be decoded includes:
acquiring a graphical interface at the previous moment;
if the current graphical interface and the graphical interface at the previous moment are different interfaces, matching the current element to be decoded with the element to be decoded at the previous moment;
and taking the element to be decoded which is successfully matched as a reusable element, and taking the element to be decoded which is failed to be matched as an non-reusable element.
Optionally, after the step of copying the graphical interface data to the main memory drawing area to draw the graphical interface, the graphical interface drawing method further includes:
determining whether each element composing the graphical interface is a reusable element;
copying the second display data corresponding to the reusable element to the secondary memory drawing area and caching.
Optionally, after the step of copying and caching the second display data corresponding to the reusable element to the secondary memory drawing area, the graphical interface drawing method further includes:
and if the residual storage space of the secondary memory drawing area is detected to be smaller than a preset storage space threshold value, releasing the second display data cached in the secondary memory drawing area until the residual storage space of the secondary memory drawing area is not smaller than the preset storage space threshold value.
Optionally, the step of releasing the second display data cached in the secondary memory drawing area includes:
determining the historical use frequency of each second display data cached in the secondary memory drawing area;
sorting the second display data according to the historical use frequency to obtain a data use frequency sequence;
and sequentially releasing the second display data of the ordered sequence in the data use frequency sequence.
Optionally, the step of combining the first display data and the second display data into the graphical interface data includes:
determining preset position coordinates of the first display data and the second display data;
and combining the first display data and the second display data into the graphical interface data according to the preset position coordinates.
Optionally, before the step of combining the first display data and the second display data into the graphical interface data according to the preset position coordinates, the graphical interface drawing method further includes:
obtaining second display data cached in the secondary memory drawing area;
performing image transformation processing on the second display data to obtain second display data subjected to at least one processing;
copying the processed second display data to the main memory drawing area for continuously drawing the transformation animation of the graphical interface.
In order to achieve the above object, the present invention also provides a graphic interface drawing apparatus applied to a graphic interface drawing device, the graphic interface drawing apparatus comprising:
the drawing request module is used for receiving a drawing request of the graphical interface and determining elements to be decoded of the graphical interface according to the drawing request;
the multiplexing judgment module is used for determining non-multiplexing elements and multiplexing elements in the elements to be decoded;
the element decoding module is used for decoding the non-reusable element to obtain first display data, and acquiring second display data corresponding to the reusable element from a secondary memory drawing area;
the interface combination module is used for combining the first display data and the second display data into the graphical interface data;
and the interface drawing module is used for copying the graphic interface data to the main memory drawing area so as to draw the graphic interface.
Optionally, the multiplexing judgment module is further configured to:
acquiring a graphical interface at the previous moment;
if the current graphical interface and the graphical interface at the previous moment are different interfaces, matching the current element to be decoded with the element to be decoded at the previous moment;
and taking the element to be decoded which is successfully matched as a reusable element, and taking the element to be decoded which is failed to be matched as an non-reusable element.
Optionally, the interface drawing module is further configured to:
determining whether each element composing the graphical interface is a reusable element;
copying the second display data corresponding to the reusable element to the secondary memory drawing area and caching.
Optionally, the interface drawing module is further configured to:
and if the residual storage space of the secondary memory drawing area is detected to be smaller than a preset storage space threshold value, releasing the second display data cached in the secondary memory drawing area until the residual storage space of the secondary memory drawing area is not smaller than the preset storage space threshold value.
Optionally, the interface drawing module is further configured to:
determining the historical use frequency of each second display data cached in the secondary memory drawing area;
sorting the second display data according to the historical use frequency to obtain a data use frequency sequence;
and sequentially releasing the second display data of the ordered sequence in the data use frequency sequence.
Optionally, the interface combination module is further configured to:
determining preset position coordinates of the first display data and the second display data;
and combining the first display data and the second display data into the graphical interface data according to the preset position coordinates.
Optionally, the interface combination module is further configured to:
obtaining second display data cached in the secondary memory drawing area;
performing image transformation processing on the second display data to obtain second display data subjected to at least one processing;
copying the processed second display data to the main memory drawing area for continuously drawing the transformation animation of the graphical interface.
The invention also provides an electronic device comprising: the computer-readable storage medium comprises a memory, a processor and a program of the graphical interface drawing method stored in the memory and capable of running on the processor, wherein the program of the graphical interface drawing method can realize the steps of the graphical interface drawing method when being executed by the processor.
The present invention also provides a readable storage medium, which is a computer readable storage medium, and the computer readable storage medium stores a program for implementing a graphical interface drawing method, where the program for implementing the graphical interface drawing method implements the steps of the graphical interface drawing method when executed by a processor.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the graphical interface rendering method as described above.
The embodiment of the invention provides a graphic interface drawing method, namely, a drawing request of a graphic interface is received, and an element to be decoded of the graphic interface is determined according to the drawing request; determining non-reusable elements and reusable elements in the elements to be decoded; decoding the non-reusable element to obtain first display data, and obtaining second display data corresponding to the reusable element from a secondary memory drawing area; combining the first display data and the second display data into the graphical interface data; copying the graphic interface data to a main memory drawing area to draw the graphic interface, decoding and directly acquiring different elements in the graphic interface respectively, so that CPU resources are prevented from being occupied due to repeated decoding of part of graphic elements, combining the decoded first element data and second element data in the added secondary memory drawing area, copying the combined graphic interface data through memory data, and sending the combined graphic interface data to the main memory drawing area to quickly display related images in the main memory drawing area, so that a user cannot feel a decoding display refreshing process of the graphic interface, and the graphic drawing speed is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of a graphical interface rendering method according to a first embodiment of the present invention;
fig. 2 is a schematic device structure diagram of a hardware operating environment related to a graphical interface drawing method in an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the above objects, features and advantages of the present invention more comprehensible, the following description of the embodiments accompanied with the accompanying drawings will be given in detail. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
An embodiment of the present invention provides a graphical interface drawing method, in a first embodiment of the graphical interface drawing method of the present invention, referring to fig. 1, the graphical interface drawing method includes:
step S10, a drawing request of a graphical interface is received, and an element to be decoded of the graphical interface is determined according to the drawing request;
step S20, determining non-reusable elements and reusable elements in the elements to be decoded;
step S30, decoding the non-reusable element to obtain first display data, and obtaining second display data corresponding to the reusable element from a secondary memory drawing area;
step S40, combining the first display data and the second display data into the graphical interface data;
and S50, copying the graphic interface data to a main memory drawing area to draw the graphic interface.
In this embodiment, it should be noted that, at present, the resolution of the graphic display of the television platform is 1920×1080, and a display storage space may be added in the display storage module, which is defined as a buffer display area for buffering the decoded picture element data. The added display area may be defined as 1920 x 600, which is not visible to the user, as the secondary memory map area of the present invention. The original display area can be used as a main memory drawing area, the added cache display area is used as a secondary memory drawing area for auxiliary drawing, the main memory drawing area is used for acquiring graphic interface data so as to skip a decoding step to directly draw a complete graphic interface, a user can directly see the graphic interface instead of each element being decoded when watching, the secondary memory drawing area is used for decoding the elements and caching second display data of the reusable elements, various data are combined into the complete graphic interface data, and the steps carried out in the secondary memory drawing area cannot be seen by the user; the graphical interface is formed by combining a plurality of elements according to preset position coordinates, the elements comprise non-reusable elements and reusable elements, the non-reusable elements can be decoded to obtain first display data, the decoded reusable elements are copied in advance to be cached in a secondary memory drawing area, decoding is not needed, and the first display data can be directly obtained from the secondary memory drawing area.
Illustratively, steps S10 through S50 include:
receiving a drawing request of a graphical interface, decomposing the graphical interface according to the drawing request, and obtaining an element to be decoded; determining non-reusable elements and reusable elements in the elements to be decoded; decoding the non-reusable element to obtain first display data, and obtaining second display data decoded by the non-reusable element from a secondary memory drawing area; combining the first display data and the second display data into graphical interface data; copying the graphic interface data to a main memory drawing area to directly draw the graphic interface.
Specifically, the graphic interface is decomposed into elements taking a single icon as a unit, the non-reusable elements and the reusable elements in the elements are determined, the non-reusable elements are decoded, first display data are obtained, if the reusable data are decoded in advance, decoded second display data are directly obtained from the secondary memory drawing area, the first display data and the second display data are combined into complete graphic interface data according to a preset position coordinate, the graphic interface data are copied to the main memory drawing area, and the graphic interface is drawn directly according to the main memory drawing area, so that the process of decoding and displaying images one by one is avoided, meanwhile, the decoding process of part of the elements is reduced, the repeated decoding of part of the graphic elements is avoided, the CPU (Central processing Unit) resource is occupied, the use efficiency of the CPU is improved, and the graphic drawing speed is improved.
In step S20, the step of determining non-reusable elements and reusable elements of the elements to be decoded includes:
step A10, a graphical interface at the previous moment is obtained;
step A20, if the current graphical interface and the graphical interface at the previous moment are different interfaces, matching the current element to be decoded with the element to be decoded at the previous moment;
and step A30, taking the element to be decoded which is successfully matched as a reusable element, and taking the element to be decoded which is failed to be matched as an uncousable element.
In this embodiment, it should be noted that, the graphic interface may be refreshed according to a fixed frequency, if the same element component exists in different pictures under different interfaces, the part of the component may be cached in the secondary memory drawing area after decoding, and when the cached component is needed, the decoding process may be skipped to directly obtain the decoded data.
Illustratively, steps a10 through a30 include:
and acquiring a graphical interface at the previous moment, if the graphical interface at the previous moment and the current graphical interface are different interfaces, multiplexing elements exist in the two interfaces, matching the element to be decoded of the current graphical interface with the element to be decoded at the previous moment, taking the element to be decoded which is successfully matched as the multiplexing element, and taking the element to be decoded which is failed to be matched as the non-multiplexing element.
In step S50, after the step of copying the graphical interface data to the main memory drawing area to draw the graphical interface, the graphical interface drawing method further includes:
step S60, determining whether each element composing the graphical interface is a reusable element;
and step S70, copying the second display data corresponding to the reusable element to the secondary memory drawing area and caching.
In this embodiment, it should be noted that, when the reusable element is determined as the reusable element for the first time, the reusable element needs to be cached in the secondary memory drawing area, where the reusable element is an element that needs to be repeatedly used in the subsequent graphic interface drawing, for example, the realization of a progress bar such as rotating a waiting animation icon and adjusting volume.
Illustratively, steps S60 through S70 include:
and after the graphic interface is drawn, if detecting that part of elements of the graphic interface need to be repeatedly used in the subsequent graphic interface drawing, determining the elements as reusable data, performing memory copying on second display data corresponding to the reusable elements to the secondary memory drawing area for caching, and extracting the part of second display data for use when the secondary memory drawing area needs to be used next time.
At S70, after the step of copying and buffering the second display data corresponding to the reusable element to the secondary memory drawing area, the graphical interface drawing method further includes:
and step A10, if the residual storage space of the secondary memory drawing area is detected to be smaller than a preset storage space threshold value, releasing the second display data cached in the secondary memory drawing area until the residual storage space of the secondary memory drawing area is not smaller than the preset storage space threshold value.
Illustratively, step a10 includes:
if the fact that the residual memory space in the secondary memory drawing area is insufficient is detected, the residual memory space is smaller than a preset memory space threshold value, the second display data cached in the secondary memory drawing area are released, the second display data can be automatically adjusted according to the use condition of the memory, if more memories are available, more data are cached, and if fewer memories are available, a part of caches are released, memory overflow is avoided, the use efficiency of a CPU is improved, and complex and dynamic image interfaces can be displayed rapidly.
In step a10, the step of releasing the second display data cached in the secondary memory drawing area includes:
step A11, determining the historical use frequency of each second display data cached in the secondary memory drawing area;
step A12, sorting the second display data according to the historical use frequency to obtain a data use frequency sequence;
and step A13, sequentially releasing the second display data of the ordered sequence in the data use frequency sequence.
Illustratively, steps a11 through a13 include:
determining the historical use frequency of each second display data cached in the secondary memory drawing area, and sequencing each second display data according to the historical use frequency to obtain a data use frequency sequence; and releasing the second display data of the ordered columns according to the data use frequency sequence until the residual storage space of the secondary memory drawing area is not smaller than the preset storage space threshold value.
In step S40, the step of combining the first display data and the second display data into the graphical interface data includes:
step B10, determining preset position coordinates of the first display data and the second display data;
and step B20, combining the first display data and the second display data into the graphical interface data according to the preset position coordinates.
Illustratively, steps B10 through B20 include:
and determining preset position coordinates of the first display data and the second display data by the graphical interface, and determining the positions of the first display data and the second display data on the graphical interface according to each preset position coordinate, so as to obtain the graphical interface data by combining.
In step S40, before the step of combining the first display data and the second display data into the graphical interface data according to the preset position coordinates, the graphical interface drawing method further includes:
step C10, obtaining second display data cached in the secondary memory drawing area;
step C20, performing image transformation processing on the second display data to obtain second display data subjected to at least one processing;
and step C30, copying the processed second display data to the main memory drawing area for continuously drawing the transformation animation of the graphical interface.
In this embodiment, the image conversion process may be a process of enlarging, reducing, changing a shape, changing a position, or the like of a reusable element corresponding to the second display data.
Illustratively, steps C10 through C30 include:
obtaining cached second display data in the secondary memory drawing area, and performing various image change processing on the second display data to obtain second display data subjected to at least one processing; copying the processed second display data to the main memory drawing area for drawing the graphical interface.
And after the second display data is subjected to multiple image conversion processes, a dynamic target image display effect can be smoothly and rapidly realized.
The embodiment of the invention provides a graphic interface drawing method, namely, a drawing request of a graphic interface is received, and an element to be decoded of the graphic interface is determined according to the drawing request; determining non-reusable elements and reusable elements in the elements to be decoded; decoding the non-reusable element to obtain first display data, and obtaining second display data corresponding to the reusable element from a secondary memory drawing area; combining the first display data and the second display data into the graphical interface data; copying the graphic interface data to a main memory drawing area to draw the graphic interface, decoding and directly acquiring different elements in the graphic interface respectively, so that CPU resources are prevented from being occupied by repeated decoding of partial graphic elements, combining the decoded first element data and the decoded second element data in the added secondary memory drawing area, copying the combined graphic interface data through the memory data, and sending the combined graphic interface data to the main memory drawing area to quickly display related images in the main memory drawing area, so that a user cannot feel a decoding display refreshing process of the graphic interface, and the graphic drawing speed is improved.
Example two
The embodiment of the invention also provides a graphic interface drawing device, which is applied to graphic interface drawing equipment and comprises:
the drawing request module is used for receiving a drawing request of the graphical interface and determining elements to be decoded of the graphical interface according to the drawing request;
the multiplexing judgment module is used for determining non-multiplexing elements and multiplexing elements in the elements to be decoded;
the element decoding module is used for decoding the non-reusable element to obtain first display data, and acquiring second display data corresponding to the reusable element from a secondary memory drawing area;
the interface combination module is used for combining the first display data and the second display data into the graphical interface data;
and the interface drawing module is used for copying the graphic interface data to the main memory drawing area so as to draw the graphic interface.
Optionally, the multiplexing judgment module is further configured to:
acquiring a graphical interface at the previous moment;
if the current graphical interface and the graphical interface at the previous moment are different interfaces, matching the current element to be decoded with the element to be decoded at the previous moment;
and taking the element to be decoded which is successfully matched as a reusable element, and taking the element to be decoded which is failed to be matched as an non-reusable element.
Optionally, the interface drawing module is further configured to:
determining whether each element composing the graphical interface is a reusable element;
copying the second display data corresponding to the reusable element to the secondary memory drawing area and caching.
Optionally, the interface drawing module is further configured to:
and if the residual storage space of the secondary memory drawing area is detected to be smaller than a preset storage space threshold value, releasing the second display data cached in the secondary memory drawing area until the residual storage space of the secondary memory drawing area is not smaller than the preset storage space threshold value.
Optionally, the interface drawing module is further configured to:
determining the historical use frequency of each second display data cached in the secondary memory drawing area;
sorting the second display data according to the historical use frequency to obtain a data use frequency sequence;
and sequentially releasing the second display data of the ordered sequence in the data use frequency sequence.
Optionally, the interface combination module is further configured to:
determining preset position coordinates of the first display data and the second display data;
and combining the first display data and the second display data into the graphical interface data according to the preset position coordinates.
Optionally, the interface combination module is further configured to:
obtaining second display data cached in the secondary memory drawing area;
performing image transformation processing on the second display data to obtain second display data subjected to at least one processing;
copying the processed second display data to the main memory drawing area for continuously drawing the transformation animation of the graphical interface.
The graphical interface drawing device provided by the invention solves the technical problem of low graphical drawing speed by adopting the graphical interface drawing method in the first embodiment. Compared with the prior art, the graphical interface drawing device provided by the embodiment of the invention has the same beneficial effects as the graphical interface drawing method provided by the embodiment, and other technical features in the graphical interface drawing device are the same as the features disclosed by the method of the embodiment, and are not repeated herein.
Example III
The embodiment of the invention provides electronic equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the graphical interface rendering method in the first embodiment.
Referring now to fig. 2, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 2 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 2, the electronic device may include a processing means (e.g., a central processing unit, a graphic processor, etc.) that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage means into a Random Access Memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM and RAM are connected to each other via a bus. An input/output (I/O) interface is also connected to the bus.
In general, the following systems may be connected to the I/O interface: input devices including, for example, touch screens, touch pads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices including, for example, liquid Crystal Displays (LCDs), speakers, vibrators, etc.; storage devices including, for example, magnetic tape, hard disk, etc.; a communication device. The communication means may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by a processing device.
The electronic equipment provided by the invention solves the technical problem of low graphic drawing speed by adopting the graphic interface drawing method in the first embodiment. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the invention are the same as those of the graphical interface drawing method provided by the first embodiment, and other technical features of the electronic device are the same as those disclosed by the method of the first embodiment, so that the description is omitted herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Example IV
The present embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the method of graphics rendering in the first embodiment described above.
The computer readable storage medium according to the embodiments of the present invention may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having 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. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: receiving a drawing request of a graphical interface, and determining an element to be decoded of the graphical interface according to the drawing request; determining non-reusable elements and reusable elements in the elements to be decoded; decoding the non-reusable element to obtain first display data, and obtaining second display data corresponding to the reusable element from a secondary memory drawing area; combining the first display data and the second display data into the graphical interface data; copying the graphic interface data to a main memory drawing area to draw the graphic interface.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The computer readable storage medium provided by the invention stores the computer readable program instructions for executing the graphic interface drawing method, and solves the technical problem of low graphic drawing speed. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the invention are the same as those of the graphical interface drawing method provided by the first embodiment, and are not described herein.
Example five
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the graphical interface rendering method as described above.
The computer program product provided by the invention solves the technical problem of low graph drawing speed. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as those of the graphical interface drawing method provided by the first embodiment, and are not described herein.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein, or any application, directly or indirectly, within the scope of the invention.

Claims (9)

1. A graphical interface rendering method, characterized in that the graphical interface rendering method comprises:
receiving a drawing request of a graphical interface, and determining an element to be decoded of the graphical interface according to the drawing request;
determining non-reusable elements and reusable elements in the elements to be decoded;
decoding the non-reusable element to obtain first display data, and obtaining second display data corresponding to the reusable element from a secondary memory drawing area;
combining the first display data and the second display data into the graphical interface data;
copying the graphic interface data to a main memory drawing area to draw the graphic interface;
wherein the step of determining the non-reusable elements and the reusable elements of the elements to be decoded comprises:
acquiring a graphical interface at the previous moment;
if the current graphical interface and the graphical interface at the previous moment are different interfaces, matching the current element to be decoded with the element to be decoded at the previous moment;
and taking the element to be decoded which is successfully matched as a reusable element, and taking the element to be decoded which is failed to be matched as an non-reusable element.
2. The graphical interface rendering method of claim 1, wherein after the step of copying the graphical interface data to a main memory rendering area to render the graphical interface, the graphical interface rendering method further comprises:
determining whether each element composing the graphical interface is a reusable element;
copying the second display data corresponding to the reusable element to the secondary memory drawing area and caching.
3. The graphical interface rendering method of claim 2, wherein after the step of copying and buffering the second display data corresponding to the reusable element to the secondary memory rendering area, the graphical interface rendering method further comprises:
and if the residual storage space of the secondary memory drawing area is detected to be smaller than a preset storage space threshold value, releasing the second display data cached in the secondary memory drawing area until the residual storage space of the secondary memory drawing area is not smaller than the preset storage space threshold value.
4. A method of graphical interface rendering as defined in claim 3, wherein said step of releasing said second display data cached in said secondary memory rendering area comprises:
determining the historical use frequency of each second display data cached in the secondary memory drawing area;
sorting the second display data according to the historical use frequency to obtain a data use frequency sequence;
and sequentially releasing the second display data of the ordered sequence in the data use frequency sequence.
5. The graphical interface rendering method of claim 1, wherein the step of combining the first display data and the second display data into the graphical interface data comprises:
determining preset position coordinates of the first display data and the second display data;
and combining the first display data and the second display data into the graphical interface data according to the preset position coordinates.
6. The graphical interface rendering method of claim 5, wherein prior to the step of combining the first display data and the second display data into the graphical interface data according to the preset position coordinates, the graphical interface rendering method further comprises:
obtaining second display data cached in the secondary memory drawing area;
performing image transformation processing on the second display data to obtain second display data subjected to at least one processing;
copying the processed second display data to the main memory drawing area for continuously drawing the transformation animation of the graphical interface.
7. A graphical interface rendering apparatus, characterized in that the graphical interface rendering apparatus comprises:
the drawing request module is used for receiving a drawing request of the graphical interface and determining elements to be decoded of the graphical interface according to the drawing request;
the multiplexing judgment module is used for determining non-multiplexing elements and multiplexing elements in the elements to be decoded;
the element decoding module is used for decoding the non-reusable element to obtain first display data, and acquiring second display data corresponding to the reusable element from a secondary memory drawing area;
the interface combination module is used for combining the first display data and the second display data into the graphical interface data;
the interface drawing module is used for copying the graphic interface data to a main memory drawing area so as to draw the graphic interface;
wherein the step of determining non-reusable elements and reusable elements of the elements to be decoded comprises:
acquiring a graphical interface at the previous moment;
if the current graphical interface and the graphical interface at the previous moment are different interfaces, matching the current element to be decoded with the element to be decoded at the previous moment;
and taking the element to be decoded which is successfully matched as a reusable element, and taking the element to be decoded which is failed to be matched as an non-reusable element.
8. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the graphical interface rendering method of any one of claims 1 to 6.
9. A computer-readable storage medium, on which a program for realizing the graphical interface rendering method is stored, the program being executed by a processor to realize the steps of the graphical interface rendering method according to any one of claims 1 to 6.
CN202210720720.XA 2022-06-23 2022-06-23 Graphic interface drawing method, electronic equipment and readable storage medium Active CN114979749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210720720.XA CN114979749B (en) 2022-06-23 2022-06-23 Graphic interface drawing method, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210720720.XA CN114979749B (en) 2022-06-23 2022-06-23 Graphic interface drawing method, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114979749A CN114979749A (en) 2022-08-30
CN114979749B true CN114979749B (en) 2024-03-22

Family

ID=82965933

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210720720.XA Active CN114979749B (en) 2022-06-23 2022-06-23 Graphic interface drawing method, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114979749B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070073190A (en) * 2006-01-04 2007-07-10 삼성전자주식회사 Embedded system and a graphic user interface displaying method thereof
CN101983508A (en) * 2008-02-01 2011-03-02 活动视频网络有限公司 Automatic video program recording in an interactive television environment
CN106210576A (en) * 2016-07-13 2016-12-07 青岛海信电器股份有限公司 Display system, content display and content display method
CN109032712A (en) * 2018-06-01 2018-12-18 北京金山安全软件有限公司 Method and device for generating application program configuration diagram
CN110471700A (en) * 2019-08-06 2019-11-19 Oppo广东移动通信有限公司 Graphic processing method, device, storage medium and electronic equipment
CN111666318A (en) * 2019-03-05 2020-09-15 阿里巴巴集团控股有限公司 Graph drawing method and device and electronic equipment
CN113076050A (en) * 2021-04-25 2021-07-06 深圳创维-Rgb电子有限公司 Man-machine interaction method and device based on memory copy, television and storage medium
CN114359017A (en) * 2021-12-27 2022-04-15 阿波罗智联(北京)科技有限公司 Multimedia resource processing method and device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20070073190A (en) * 2006-01-04 2007-07-10 삼성전자주식회사 Embedded system and a graphic user interface displaying method thereof
CN101983508A (en) * 2008-02-01 2011-03-02 活动视频网络有限公司 Automatic video program recording in an interactive television environment
CN106210576A (en) * 2016-07-13 2016-12-07 青岛海信电器股份有限公司 Display system, content display and content display method
CN109032712A (en) * 2018-06-01 2018-12-18 北京金山安全软件有限公司 Method and device for generating application program configuration diagram
CN111666318A (en) * 2019-03-05 2020-09-15 阿里巴巴集团控股有限公司 Graph drawing method and device and electronic equipment
CN110471700A (en) * 2019-08-06 2019-11-19 Oppo广东移动通信有限公司 Graphic processing method, device, storage medium and electronic equipment
CN113076050A (en) * 2021-04-25 2021-07-06 深圳创维-Rgb电子有限公司 Man-machine interaction method and device based on memory copy, television and storage medium
CN114359017A (en) * 2021-12-27 2022-04-15 阿波罗智联(北京)科技有限公司 Multimedia resource processing method and device and electronic equipment

Also Published As

Publication number Publication date
CN114979749A (en) 2022-08-30

Similar Documents

Publication Publication Date Title
CN109460233B (en) Method, device, terminal equipment and medium for updating native interface display of page
CN109857486B (en) Method, device, equipment and medium for processing program page data
CN111291244B (en) House source information display method, device, terminal and storage medium
US20220394333A1 (en) Video processing method and apparatus, storage medium, and electronic device
CN111240793B (en) Method, device, electronic equipment and computer readable medium for cell prerendering
CN114416261B (en) Information display method, device, equipment and medium
CN113535105B (en) Media file processing method, device, equipment, readable storage medium and product
CN114676358A (en) Control display method and device, electronic equipment, storage medium and program product
CN112053286B (en) Image processing method, device, electronic equipment and readable medium
CN112351221B (en) Image special effect processing method, device, electronic equipment and computer readable storage medium
CN114780197B (en) Split screen rendering method, device, equipment and storage medium
CN114979749B (en) Graphic interface drawing method, electronic equipment and readable storage medium
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN113961280B (en) View display method and device, electronic equipment and computer readable storage medium
CN115328429A (en) Display method, display device, electronic apparatus, and storage medium
CN114092362A (en) Panoramic picture loading method and device
CN115348478B (en) Equipment interactive display method and device, electronic equipment and readable storage medium
CN111949325B (en) Display method and device and electronic equipment
CN112306339B (en) Method and apparatus for displaying image
CN111586261B (en) Target video processing method and device and electronic equipment
US20220292731A1 (en) Method and apparatus for text effect processing
CN111563214B (en) Reference line processing method and device
CN116028740A (en) Page display method and device, storage medium and electronic equipment
CN116492679A (en) Page rendering method, device, medium and electronic equipment
CN117311882A (en) Picture rendering method, device, equipment and medium

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