Image display method, computing device and storage medium

By testing and selecting the best memory, the problem of communication connection limitation in external graphics cards is solved, and the image processing speed of the graphics processor is improved.

CN114881839BActive Publication Date: 2025-08-15UNIONTECH SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210451450.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2025-08-15
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

When using an external graphics card, the CPU stores data to the display memory due to communication connections, resulting in a slower speed of processing image data by the graphics processor.

Method used

The speed at which the central processor writes to internal memory and display memory, and the speed at which the graphics processor reads from these memories, determines memory preference options based on the speed ratio, and stores image data in the optimal memory for image display.

Benefits of technology

By optimizing memory selection, the limitations on the graphics processor by communication connections are reduced and the image processing capabilities of the graphics processor are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114881839B_ABST
    Figure CN114881839B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of operating systems and discloses an image display method, computing device, and storage medium. The method includes the following steps: testing a first write speed of a central processing unit (CPU) for writing data to an internal memory and a second write speed of a CPU for writing data to a display memory; testing a first read speed of a graphics processor (GPU) for reading data from an internal memory and a second read speed of a graphics processor (GPU) for reading data from a display memory; determining a preferred memory option based on the tested speeds, the preferred memory option including an internal memory or a display memory; upon receiving an image processing request, determining a target memory based on the preferred memory option and storing the image data in the target memory; and the graphics processor obtaining image data from the target memory for image display. The present invention can determine the optimal memory based on the write speed of the internal memory to different memories and the read speed of the graphics processor to different memories, thereby improving the image processing capability of the graphics processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of operating systems, and in particular to an image display method, a computing device, and a storage medium. Background Art

[0002] With the development of computer technology, graphics display and computing have become part of every aspect of our lives. As a key component of image processing, graphics processors (GPUs) have become particularly important. To process images more quickly during the operation of computing devices, external graphics cards are often used to increase the image processing speed of computing devices.

[0003] However, using an external graphics card doesn't necessarily increase image processing speed. A graphics card has a built-in graphics processor and display memory. The computing device's central processing unit (CPU) stores image data to be displayed in the display memory, from which the GPU reads the data. However, if the CPU's ability to store data to the display memory is limited by the communication link, this can actually slow down the GPU's image processing speed.

[0004] To this end, a new image display method is needed. Summary of the Invention

[0005] To this end, the present invention provides an image display method to try to solve or at least alleviate the above problems.

[0006] According to one aspect of the present invention, there is provided an image display method suitable for execution in a computing device, wherein the computing device includes a central processing unit and an internal memory, and is communicatively connected to a graphics card, wherein the graphics card includes a display memory and a graphics processor, and the method comprises the steps of: testing a first write speed at which the central processing unit writes data to the internal memory and a second write speed at which the central processing unit writes data to the display memory; testing a first read speed at which the graphics processor reads data from the internal memory and a second read speed at which the graphics processor reads data from the display memory; determining a memory preference option based on the first write speed, the second write speed, the first read speed, and the second read speed, wherein the memory preference option includes the internal memory or the display memory; when an image processing request is received, determining a target memory based on the memory preference option, and storing the image data in the target memory; and the graphics processor obtaining the image data from the target memory for image display.

[0007] Optionally, in the method according to the present invention, determining the memory preferred option based on the first write speed, the second write speed, the first read speed and the second read speed includes the steps of: calculating a first parameter of the internal memory based on the first write speed and the first read speed; calculating a second parameter of the display memory based on the second write speed and the second read speed; and determining the memory preferred option based on the first parameter and the second parameter.

[0008] Optionally, in the method according to the present invention, determining the memory preferred option based on the first parameter and the second parameter includes the steps of: comparing the first parameter with the second parameter to obtain a speed ratio; if the speed ratio is greater than a preset ratio threshold, determining the internal memory as the memory preferred option.

[0009] Optionally, the method according to the present invention further comprises the step of: if the speed ratio is equal to or less than a preset ratio threshold, determining the display memory as the preferred memory option.

[0010] Optionally, in the method according to the present invention, when an image processing request is received, determining the target memory according to the memory preference option includes the steps of: judging whether a memory preference flag is set, the memory preference flag including a display memory flag or an internal memory flag; if the memory preference flag is not set, obtaining the memory preference option, and setting the memory preference flag according to the memory preference option; and determining the target memory according to the memory preference flag.

[0011] Optionally, the method according to the present invention further includes the step of: if a memory preference flag is set, determining the target register according to the memory preference flag.

[0012] Optionally, in the method according to the present invention, setting the memory preference flag according to the memory preference option includes the step of: if the memory preference option is display memory, setting the memory preference flag to the display memory flag.

[0013] Optionally, the method according to the present invention further includes the step of: if the memory preference option is internal memory, setting the memory preference flag to the internal memory flag.

[0014] According to another aspect of the present invention, a computing device is provided, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the image display method according to the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium storing one or more programs is provided. The one or more programs include instructions that, when executed by a computing device, cause the computing device to execute the image display method according to the present invention.

[0016] The present invention discloses an image display method suitable for execution in a computing device. The computing device includes a central processing unit (CPU) and an internal memory, and is communicatively connected to a graphics card, wherein the graphics card includes a display memory and a graphics processor. The method includes the following steps: testing a first write speed of the CPU for writing data to the internal memory and a second write speed for writing data to the display memory; testing a first read speed of the graphics processor for reading data from the internal memory and a second read speed for reading data from the display memory; determining a preferred memory option based on the first write speed, the second write speed, the first read speed, and the second read speed, wherein the preferred memory option includes the internal memory or the display memory; upon receiving an image processing request, determining a target memory based on the preferred memory option and storing the image data in the target memory; and obtaining the image data from the target memory by the graphics processor for image display. The present invention can determine the optimal memory based on the write speed of the internal memory to different memories and the read speed of the graphics processor to different memories, thereby improving the image processing capability of the graphics processor and reducing the limitation of the communication connection on the image processing capability. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein may be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other objects, features, and advantages of the present invention will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements.

[0018] Figure 1 shows a schematic diagram of a computing device 100 according to an exemplary embodiment of the present invention;

[0019] Figure 2 FIG2 shows a flow chart of an image display method 200 according to an exemplary embodiment of the present invention;

[0020] Figure 3 A schematic diagram of a memory test according to an exemplary embodiment of the present invention is shown;

[0021] Figure 4 FIG2 shows a schematic diagram of applying for memory according to an exemplary embodiment of the present invention;

[0022] Figure 5 A schematic diagram illustrating providing a display service according to an exemplary embodiment of the present invention is shown. DETAILED DESCRIPTION

[0023] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. The same reference numerals generally refer to the same components or elements.

[0024] First reference Figure 1 , Figure 1 1 shows a schematic diagram of a computing device 100 according to an exemplary embodiment of the present invention. Figure 1 As shown, the computing device 100 includes an internal memory 111, an external memory 112, and a central processing unit 113. The internal memory 111 includes, but is not limited to, volatile storage (e.g., random access memory), non-volatile storage (e.g., read-only memory), flash memory, or any combination of such memories. The external memory 112 refers to storage other than the internal memory 111 and the cache of the central processing unit 113, and can be specifically implemented as a hard disk, floppy disk, optical disk, USB flash drive, etc. The central processing unit 113 is the computing core and control core of the computing device 100, and is used to parse computer instructions and process data in computer software.

[0025] According to one embodiment of the present invention, the computing device may also include an integrated graphics card (not shown) integrated into the computing device. The graphics processor in the integrated graphics card can also process images, but if the computing device's external graphics card 140 has greater computing power, graphics card 140 may be preferred for data processing in most cases. The graphics card 140, which is in communication with the computing device 100, includes display memory 141 and a graphics processor 142. Display memory 141 is memory built into the graphics card 140 and is used to store rendering data processed or to be extracted by the graphics processor 142. The graphics processor 142 is a microprocessor that performs image and graphics-related operations.

[0026] Computing device 100 also runs an operating system 120 based on the aforementioned components, which is suitable for controlling the operation of computing device 100. Furthermore, examples may be implemented in conjunction with graphics libraries, other operating systems, or any other application, and are not limited to any particular application or system. The present invention is not limited to the specific type of operating system 120. Computing device 100 may also run one or more applications (not shown) based on operating system 120. The present invention does not limit the number or type of applications running on computing device 100. For example, the applications may be implemented as email and contact applications, word processing applications, spreadsheet applications, database applications, slide show applications, drawing or computer-aided applications, web browser applications, and the like.

[0027] According to one aspect, the computing device 100 may also be connected to one or more input devices 131, such as a keyboard, mouse, pen, voice input device, touch input device, etc. One or more output devices 132 may also be connected, such as a display, speakers, printer, etc. The aforementioned devices are examples, and other devices may also be used. The computing device 100 may include one or more communication connections that allow communication with other computing devices. Examples of suitable communication connections include, but are not limited to: RF transmitter, receiver, and / or transceiver circuitry; Universal Serial Bus (USB), parallel, and / or serial ports.

[0028] An embodiment of the present invention also provides a non-transitory readable storage medium storing instructions for causing the computing device to execute a method according to an embodiment of the present invention. The readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be a computer-readable instruction, a data structure, a program module, or other data. Examples of readable storage media include, but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices, or any other non-transitory readable storage medium.

[0029] According to one aspect, communication media is implemented by computer-readable instructions, data structures, program modules, or other data in a modulated data signal (e.g., a carrier wave or other transport mechanism), and includes any information delivery media. According to one aspect, the term "modulated data signal" describes a signal that has one or more characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency (RF), infrared, and other wireless media.

[0030] According to one embodiment of the present invention, the computing device 100 and the graphics card 140 can be communicatively connected via a PCIE interface, etc. The present invention does not limit the specific method of connecting the computing device 100 and the graphics card 140. Since the computing device 100 and the graphics card 140 can actually be connected in a variety of different ways, the data communication speed between the computing device 100 and the graphics card 140 is also related to the connection method, sometimes fast and sometimes slow. When the data communication speed between the computing device 100 and the graphics card 140 is slow, if the display data is still stored in the display memory 141, the data processing speed requirement of the graphics card 140 cannot be met, thereby reducing the data processing speed of the graphics card 140.

[0031] In order to achieve a higher image processing speed for the graphics card 140, the present invention provides an image display method 200. The image display method of the present invention is suitable for execution in a computing device, such as the computing device 100.

[0032] Now refer to Figure 2 , Figure 2 FIG. 2 is a flow chart of an image display method 200 according to an exemplary embodiment of the present invention. Figure 2 As shown, step S210 is first executed to test a first writing speed of the central processing unit writing data into the internal memory and a second writing speed of the central processing unit writing data into the display memory.

[0033] According to one embodiment of the present invention, when testing the first write speed, a test memory is applied for in the internal memory to perform a data write test; when testing the second write speed, a driver of the graphics card 140 is called to apply for a test memory in the display memory to perform a test.

[0034] According to an embodiment of the present invention, the first write speed and the second write speed may specifically be the amount of data written per unit time, or the test time obtained by fixing the amount of data written.

[0035] Then, step S220 is executed to test a first reading speed of the graphics processor for reading data from the internal memory and a second reading speed of the graphics processor for reading data from the display memory.

[0036] According to one embodiment of the present invention, the first read speed and the second read speed may specifically refer to the amount of data read per unit time, or the test time obtained by fixing the amount of data read. When the first write speed and the second write speed specifically refer to the amount of data written per unit time, the first read speed and the second read speed specifically refer to the amount of data read per unit time. When the first write speed and the second write speed specifically refer to the test time obtained by fixing the amount of data written, the first read speed and the second read speed specifically refer to the test time obtained by fixing the amount of data read.

[0037] According to an embodiment of the present invention, the memory size requested from the internal memory or the display memory can be configured as needed, such as customized by the user.

[0038] According to one embodiment of the present invention, when the configured memory size does not comply with the rules, is too small (such as 0) or too large, and exceeds the memory size that can be tested, so that the write speed or read speed cannot be correctly tested, the memory for applying for memory can be set according to the default value, such as internal memory or display memory.

[0039] Subsequently, step S230 is executed to determine a preferred memory option based on the first write speed, the second write speed, the first read speed, and the second read speed. The preferred memory option includes internal memory or display memory. Specifically, first, a first parameter of the internal memory is calculated based on the first write speed and the first read speed. According to one embodiment of the present invention, the first parameter can be obtained by adding the first write speed and the first read speed; it can also be obtained by averaging the first write speed and the first read speed. The present invention does not limit the specific calculation method of the first parameter.

[0040] Next, a second parameter of the display memory is calculated based on the second write speed and the second read speed. According to one embodiment of the present invention, the second parameter can be obtained by adding the second write speed and the second read speed, or by averaging the second write speed and the second read speed. The present invention does not limit the specific method for calculating the second parameter.

[0041] Third, the memory priority option is determined based on the first parameter and the second parameter. Specifically: first, the first parameter is compared with the second parameter to obtain a speed ratio, and then the speed ratio is compared with a preset ratio threshold. If the speed ratio is greater than the preset ratio threshold, the internal memory is determined as the memory priority option; if the speed ratio is equal to or less than the preset ratio threshold, the display memory is determined as the memory priority option. If the speed ratio is greater than the preset ratio threshold, it means that when the central processing unit stores the display data in the internal memory, the graphics card is more efficient in obtaining the display data, and the display data is preferentially stored in the internal memory; the graphics card is able to obtain the display data from the internal memory.

[0042] If the speed ratio is equal to or less than the preset ratio threshold, it means that when the central processor stores the display data in the display memory, the graphics card obtains the display data more efficiently, so the display data is stored in the internal memory first; the graphics card can obtain the display data from the internal memory.

[0043] According to an embodiment of the present invention, the preset ratio threshold may be set to 1.

[0044] According to an embodiment of the present invention, steps S310 to S330 of the present invention may be executed by a preset memory test application, and the preset memory test application may also be integrated into a preset memory test tool.

[0045] According to one embodiment of the present invention, a preset memory test application can be set to start when the computing device is turned on. When the computing device is turned on, the graphics card 140 driver is initialized, and the test environment preparation work of the preset memory test application is completed, the preset memory test application begins to execute and test the read and write speeds of various memory devices.

[0046] Now refer to Figure 3 , Figure 3 FIG. 1 shows a schematic diagram of a memory test according to an exemplary embodiment of the present invention. Figure 3 As shown, during the test, a preset memory test program is started, and memory in the internal memory and display memory are requested separately. The CPU writes data to the internal memory for a test, obtaining a speed s1, and writes data to the display memory for a test, obtaining a speed s2. The graphics processor then reads data from the internal memory for a test, obtaining a speed s3, and reads data from the graphics processor for a test, obtaining a speed s4. Subsequently, speeds s1 and s3 are added together to obtain a first parameter, and speeds s2 and s4 are added together to obtain a second parameter.

[0047] The first parameter is then compared with the second parameter to obtain a comparison result x. The comparison result x is compared with a preset ratio threshold n: if the comparison result x is greater than the preset ratio threshold n, the internal memory is determined as the target memory; if the comparison result x is less than or equal to the preset ratio threshold n, the display memory is determined as the target memory.

[0048] Then, step S240 is executed, when an image processing request is received, a target memory is determined according to the memory preference option, and the image data is stored in the target memory. When an image processing request is received, a memory is requested to store the image data, and the image data is stored in the requested memory.

[0049] When requesting memory, it is necessary to determine whether to request from internal memory or display memory. Specifically, it is determined whether the memory priority flag is set. The memory priority flag includes either the display memory flag or the internal memory flag. The memory priority flag is a flag pre-stored in a register that indicates whether to request memory from internal memory or display memory. If the memory priority flag is set, the target register is determined based on the memory priority flag.

[0050] If the memory preference flag is not set, a memory preference option is obtained, and the memory preference flag is set according to the memory preference option, and then the target memory is determined according to the memory preference flag.

[0051] When setting the memory priority flag, if the memory priority option is display memory, set the memory priority flag to the display memory flag; if the memory priority option is internal memory, set the memory priority flag to the internal memory flag. Setting the memory priority flag can facilitate the determination of the target register, eliminating the need to obtain the memory priority option each time a memory request is made, thus improving memory request speed.

[0052] According to one embodiment of the present invention, after determining the memory preferred option, the preset memory test program generates a test result file for storing the memory preferred option, so that after receiving an image processing request, the test result file is read to determine the memory preferred option.

[0053] When determining the target memory according to the memory priority identification bit, if the memory priority identification bit is the display memory identification bit, the display memory is used as the target memory; if the memory priority identification bit is the internal memory, the internal memory is used as the target memory.

[0054] Now refer to Figure 4 , Figure 4 FIG. 1 shows a schematic diagram of applying for memory according to an exemplary embodiment of the present invention. Figure 4 As shown, when it is necessary to apply for the use of memory, it is necessary to determine whether the memory priority flag is set. If the memory priority flag is set, the memory is directly applied for and used according to the memory priority flag.

[0055] If the memory priority flag is not set, the memory priority option is obtained, and the memory priority flag is set according to the memory priority option, and memory is applied for and used according to the memory priority flag.

[0056] Figure 5 FIG. 1 shows a schematic diagram of providing a display service according to an exemplary embodiment of the present invention. Figure 5 As shown, when the computing device has not performed a memory test, the preset memory test application is executed after the graphics card driver is initialized, and the above steps S310-S320 are executed to perform the test, obtain the memory preferred option and save it.

[0057] Next, the display server is started. Specifically, the display server can be implemented as a display server, providing display services to clients that send display requests. The display server sets a memory flag based on the memory preference setting. Upon receiving a client's display request, the server selects internal memory or display memory based on the memory preference flag to request memory for display.

[0058] The present invention discloses an image display method suitable for execution in a computing device. The computing device includes a central processing unit (CPU) and an internal memory, and is communicatively connected to a graphics card, wherein the graphics card includes a display memory and a graphics processor. The method includes the following steps: testing a first write speed of the CPU for writing data to the internal memory and a second write speed for writing data to the display memory; testing a first read speed of the graphics processor for reading data from the internal memory and a second read speed for reading data from the display memory; determining a preferred memory option based on the first write speed, the second write speed, the first read speed, and the second read speed, wherein the preferred memory option includes the internal memory or the display memory; upon receiving an image processing request, determining a target memory based on the preferred memory option and storing the image data in the target memory; and obtaining the image data from the target memory by the graphics processor for image display. The present invention can determine the optimal memory based on the write speed of the internal memory to different memories and the read speed of the graphics processor to different memories, thereby improving the image processing capability of the graphics processor and reducing the limitation of the communication connection on the image processing capability.

[0059] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0060] Similarly, it should be understood that in order to streamline the disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof.

[0061] Those skilled in the art will appreciate that the modules, units, or groups of devices in the examples disclosed herein may be arranged in the device described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the aforementioned examples may be combined into one module or further divided into multiple submodules.

[0062] Those skilled in the art will appreciate that the modules in the devices of the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or groups in the embodiments may be combined into one module or unit or group, and furthermore they may be divided into a plurality of submodules or subunits or subgroups. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0063] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features and not other features included in other embodiments, the combination of features from different embodiments is intended to be within the scope of the invention and to form different embodiments.

[0064] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions described. Thus, a processor having the necessary instructions for implementing the method or method element forms a device for implementing the method or method element. Furthermore, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0065] The various techniques described herein may be implemented in conjunction with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embedded in a tangible medium, such as a floppy disk, CD-ROM, hard drive, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes an apparatus for practicing the present invention.

[0066] When the program code is executed on a programmable computer, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code, and the processor is configured to execute the image display method of the present invention according to the instructions in the program code stored in the memory.

[0067] By way of example and not limitation, computer-readable media include computer storage media and communication media. Computer-readable media include computer storage media and communication media. Computer storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and includes any information delivery media. Combinations of any of the above are also included within the scope of computer-readable media.

[0068] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved and are not intended to imply that the objects so described must have a given order in time, space, ranking, or in any other manner.

[0069] Although the present invention has been described with respect to a limited number of embodiments, those skilled in the art, having the benefit of the foregoing description, will appreciate that other embodiments are contemplated within the scope of the invention thus described. Furthermore, it should be noted that the language used in this specification has been selected primarily for readability and instructional purposes, rather than for the purpose of explaining or limiting the subject matter of the present invention. Consequently, numerous modifications and variations will be apparent to those skilled in the art. The disclosure of the present invention is intended to be illustrative, not restrictive, of the scope of the invention.

Claims

1. An image display method, adapted for execution in a computing device comprising a central processing unit (CPU) and internal memory, and in communication with a graphics card comprising display memory and a graphics processor, the method comprising the steps of: testing a first writing speed of the central processing unit writing data to the internal memory and a second writing speed of the central processing unit writing data to the display memory; testing a first reading speed at which the graphics processor reads data from the internal memory and a second reading speed at which the graphics processor reads data from the display memory; determining a memory preference option according to the first write speed, the second write speed, the first read speed, and the second read speed, wherein the memory preference option includes an internal memory or a display memory; When an image processing request is received, a target memory is determined according to the memory preference option, and the image data is stored in the target memory, wherein when the image processing request is received, determining the target memory according to the memory preference option includes the steps of: determining whether a memory preference flag is set, the memory preference flag including a display memory flag or an internal memory flag; if the memory preference flag is not set, obtaining the memory preference option, setting the memory preference flag according to the memory preference option, and determining the target memory according to the memory preference flag; The graphics processor obtains image data from the target memory for image display; Determining the preferred memory option according to the first write speed, the second write speed, the first read speed, and the second read speed comprises the steps of: Obtaining a first parameter of the internal memory by adding the first write speed and the first read speed; obtaining a second parameter of the display memory by adding the second writing speed and the second reading speed; Determining the memory preferred option according to the first parameter and the second parameter includes comparing the first parameter with the second parameter to obtain a speed ratio, and if the speed ratio is greater than a preset ratio threshold, determining the internal memory as the memory preferred option.

2. The method according to claim 1, wherein The method further comprises the steps of: If the speed ratio is equal to or less than the preset ratio threshold, the display memory is determined as a preferred memory option.

3. The method according to claim 1, wherein The method further comprises the steps of: If the memory priority flag is set, the target register is determined according to the memory priority flag.

4. The method according to claim 3, wherein: The step of setting the memory preference flag according to the memory preference option comprises the following steps: If the preferred memory option is display memory, the preferred memory flag is set to the display memory flag.

5. The method according to claim 4, wherein: The method further comprises the steps of: If the preferred memory option is the internal memory, the preferred memory flag is set to the internal memory flag.

6. A computing device comprising: one or more processors; Memory; as well as One or more devices comprising instructions for performing the method according to any one of claims 1-5.

7. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data storage method and device

    CN107077514A

  • Optimized access to fast storage equipment

    CN112748854A