Image data processing method and device, electronic equipment and nonvolatile storage medium

By constructing a text character conversion library and generating a text image represented by pixel values, the problem of low efficiency and high power consumption in Legacy mode is solved, and efficient remote data transmission and display is achieved.

CN119045760APending Publication Date: 2024-11-29SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411095138.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The transmission and display of image data in Legacy mode is low and has high power consumption. Especially when displaying on remote consoles, the VGA display module needs to process data represented by pixels, resulting in an increase in data volume and an increase in power consumption.

Method used

By pre-constructing a text character conversion library, text characters are represented by pixels and stored corresponding character shape data, obtain target text data from video memory according to display needs, generate text images represented by pixel values, and directly transmit and display remote data to avoid VGA Display module participation.

Benefits of technology

It improves image data transmission and display efficiency in Legacy mode, reduces image data processing power consumption, and reduces unnecessary data processing and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045760A_ABST
    Figure CN119045760A_ABST
Patent Text Reader

Abstract

The invention discloses an image data processing method and device, electronic equipment and a nonvolatile storage medium, and is applied to the technical field of computers. The method comprises the following steps of: pre-constructing a text character conversion library which represents each text character in an image pixel format and stores corresponding character shape data; obtaining target text data from a corresponding video memory position at a host screen display position based on the to-be-processed content, generating index information according to content information and a text character storage mode of the target text data, and reading corresponding target character shape data from a text character conversion library according to display requirements based on the index information; and according to a display demand, generating a text image represented by the pixel value based on the attribute information and the target character shape data. According to the invention, the problem of poor image data processing performance in a remote operation process in related technologies can be solved, the transmission efficiency and the image display efficiency of the image data in the Legacy mode can be improved, and the power consumption of image data processing is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an image data processing method, device, electronic equipment and non-volatile storage medium. Background Art

[0002] BMC (Baseboard Management Controller) manages and monitors computer system hardware to achieve remote monitoring, management and maintenance of the server, thereby reducing the need for physical contact with equipment and improving server reliability and maintainability. When a user needs to remotely operate the server host operating system, the image data generated by the local server host operating system needs to be transmitted to the remote console through the network for display, which requires the remote console to transmit and compress the image data.

[0003] When the related technology uses the Legacy mode to display image data, it directly restores the display on the remote console based on the DVI (Digital Visual Interface) data signal output by the VGA (Video Graphics Array) display device. This method requires processing data represented by pixels, resulting in an increase in the amount of data to be processed, and the transmission efficiency and display efficiency of image data are both low. Moreover, when only the remote console display is required, the VGA also needs to provide pixel-represented data to the image compression module, which increases the power consumption of the server.

[0004] In view of this, achieving high-efficiency and low-power image data processing in the Legacy mode is a technical problem that needs to be solved by those skilled in the art.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The present invention provides an image data processing method, device, electronic device and non-volatile storage medium, which can improve the transmission efficiency and image display efficiency of image data in Legacy mode and effectively reduce the power consumption of image data processing.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In one aspect, the present invention provides an image data processing method, comprising:

[0009] Pre-building a text character conversion library; the text character conversion library is used to represent each text character in an image pixel format and store corresponding character shape data;

[0010] Based on the display position of the content to be processed on the host screen, the corresponding target text data is obtained from the corresponding position of the video memory; the target text data includes attribute information and content information;

[0011] Generate index information according to the content information and the text character storage method in the text character conversion library, so as to read corresponding target character shape data from the text character conversion library according to display requirements based on the index information;

[0012] According to the display requirement, a text image represented by pixel values ​​is generated based on the attribute information and the target character shape data.

[0013] In a first exemplary implementation, the display requirement is a normal image display requirement, and according to the display requirement, generating a text image represented by pixel values ​​based on the attribute information and the target character shape data includes:

[0014] constructing an image storage space based on the pixel size and resolution of the text characters in the text character conversion library;

[0015] Based on the color identification value of each position of the target character shape data, reading the corresponding pixel value from the attribute information;

[0016] According to the target character shape data and the pixel values ​​at different positions, the corresponding pixel values ​​are filled in the corresponding positions of the image storage space to obtain a text image represented by the pixel values, and the text image is written into the corresponding position of the memory.

[0017] In a second exemplary implementation, filling corresponding pixel values ​​at corresponding positions in the image storage space according to the target character shape data and pixel values ​​at different positions includes:

[0018] If the image storage space includes a space background attribute value, then fill the pixel value of the font color position corresponding to the target character shape data according to the foreground color of the attribute information;

[0019] If the image storage space does not include a space background attribute value, the pixel value of the font color position corresponding to the target character shape data is filled according to the foreground color of the attribute information, and the pixel value of the background color position corresponding to the target character shape data is filled according to the background color of the attribute information.

[0020] In a third exemplary implementation, the display requirement is a compressed image display requirement, and according to the display requirement, generating a text image represented by pixel values ​​based on the attribute information and the target character shape data includes:

[0021] The text character conversion library also includes compressed image data, wherein the compressed image data is image data obtained by compressing a character shape having a pixel value;

[0022] If the display requirement is a black and white image, the target character shape data after character shape compression with pixel values ​​is directly written into the corresponding position of the memory;

[0023] If the display requirement is an original image, the pixel value at the corresponding position of the target character shape data is updated according to the foreground color pixel value and the background color pixel value of the attribute information.

[0024] In a fourth exemplary embodiment, after generating a text image represented by pixel values ​​based on the attribute information and the target character shape data according to the display requirement, the method further includes:

[0025] Monitor changes in the content displayed on the host screen;

[0026] According to the changes in the content displayed on the host screen, the corresponding changed text data and screen position information are obtained from the channel of the host operating system writing video memory;

[0027] Generate change data index information according to the change text data and the text character storage method in the text character conversion library, and read corresponding change character shape data from the text character conversion library based on the change data index information;

[0028] A changing text image is generated based on the changing character shape data, the screen position information, and the changing text data.

[0029] In a fifth exemplary implementation, before acquiring corresponding target text data from a corresponding position of a video memory based on the display position of the content to be processed on the host screen, the method further includes:

[0030] Pre-configure an APB interface, and configure display requirements through the APB interface;

[0031] When receiving the register read and write operation instructions from the host, the corresponding register value is returned and a control signal is generated at the same time.

[0032] In a sixth exemplary implementation, the text character conversion library includes a normal character library and a compressed character library, and the process of constructing the text character conversion library includes:

[0033] Acquire text characters to be converted; the text characters to be converted include content information represented by ASIIC codes;

[0034] Based on the ASIIC code of the text character to be converted, the text character to be converted is represented by m×n pixels, and the pixel value of each pixel is a first pixel value or a second pixel value, to obtain character shape data of the text character to be converted; wherein m and n represent the horizontal and vertical sizes of the image corresponding to the text character to be converted, the first pixel value is a font color identification value, and the second pixel value is a background color identification value;

[0035] According to the first preset text character storage method, the character shape data of all the text characters to be converted are stored in the corresponding positions of the normal character library to obtain a constructed normal character library;

[0036] Acquire the character shape data of the text character to be converted from the normal character library to obtain a normal character text image restored to pixel representation;

[0037] Determining a compressed image size corresponding to a minimum compression unit according to an image format of the normal character text image;

[0038] Compressing the normal character text image according to a preset compression ratio and the compressed image size;

[0039] According to the second preset text character storage method, the compressed image data of all the text characters to be converted are stored in the corresponding positions of the compressed character library to obtain a constructed compressed character library.

[0040] Another aspect of the present invention provides an image data processing device, comprising:

[0041] A character library construction module is used to construct a text character conversion library; the text character conversion library is used to represent each text character in an image pixel format and store corresponding character shape data;

[0042] A data acquisition module, used to acquire corresponding target text data from a corresponding position of a video memory based on the display position of the content to be processed on the host screen; the target text data includes attribute information and content information;

[0043] An index module, used for generating index information according to the content information and the text character storage method in the text character conversion library, so as to read corresponding target character shape data from the text character conversion library according to display requirements based on the index information;

[0044] The image generation module is used to generate a text image represented by pixel values ​​based on the attribute information and the target character shape data according to the display requirements.

[0045] The present invention also provides an electronic device, comprising a processor, wherein the processor is configured to implement the steps of the image data processing method as described in any of the preceding items when executing a computer program stored in a memory.

[0046] Finally, the present invention further provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the image data processing method as described in any of the preceding items are implemented.

[0047] The technical solution provided by the present invention has the advantages that text characters are represented by pixels, and text image data is generated and stored. When remote data transmission and remote display are required, the text data is directly obtained from the video memory, and then the corresponding stored character shape data is called, and the final text image that meets the display requirements is generated in combination with the attribute information. The amount of data that needs to be processed in the whole process is not large, which can improve the transmission efficiency and image display efficiency of the image data in the Legacy mode; because the data is obtained from the video memory, there is no need for the VGA display module to work at the same time, thereby solving the problem that the VGA display module needs to work at the same time during the text mode remote transmission process, thereby wasting power consumption, and effectively reducing the power consumption of image data processing.

[0048] In addition, the present invention also provides a corresponding implementation device, electronic device and non-volatile storage medium for the image data processing method, which further makes the method more practical, and the device, electronic device and non-volatile storage medium have corresponding advantages.

[0049] The technical features mentioned above, the technical features to be mentioned below, and the technical features shown separately in the drawings can be arbitrarily combined with each other, as long as the combined technical features are not contradictory. All feasible feature combinations are technical contents clearly recorded in this article. Any of the multiple sub-features contained in the same sentence can be applied independently, and does not have to be applied together with other sub-features. It should be understood that the above general description and the detailed description below are only exemplary and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 It is a flowchart of an image data processing method in a remote display process in the related art;

[0052] Figure 2 A schematic flow chart of an image data processing method provided by the present invention;

[0053] Figure 3 A schematic diagram of character shape data provided by the present invention;

[0054] Figure 4 A schematic diagram of color identification values ​​corresponding to character shape data provided by the present invention;

[0055] Figure 5 A schematic diagram of the framework of the image data processing system provided by the present invention in an exemplary application scenario;

[0056] Figure 6 A schematic diagram of the framework structure of the image processing device provided by the present invention in an exemplary application scenario;

[0057] Figure 7 A schematic flow chart of another image data processing method provided by the present invention;

[0058] Figure 8 A structural diagram of a specific implementation of the image data processing device provided by the present invention;

[0059] Fig. 9 A structural diagram of a specific implementation of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0060] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, the terms "first", "second", "third", "fourth", etc. in the specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of the two are intended to cover non-exclusive inclusions. The term "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described here as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.

[0061] At present, some servers use Intel CPU (Central Processing Unit), and the client uses the Legacy mode that occupies less video memory and is easy to operate to display image data on the remote console. Figure 1As shown in the figure, in order to realize the display of the remote console in Legacy mode, the BMC directly obtains the DVI data signal output by the VGA display device through PCIe (peripheral component interconnect express, a high-speed serial computer expansion bus standard) EP (Endpoint, terminal), thereby obtaining RGB (color model) image data, compressing the image data using the image compression model, storing it in the memory, and transmitting it to the remote end through the network through the network control model, and restoring the display on the remote console. Among them, the DVI interface data is RGB data, that is, the image is composed of pixels one by one, and each pixel is represented by 32 bits.

[0062] It can be seen that the image compression module directly obtains DVI data from the VGA display module. Legacy mode is a way of displaying in text mode, which can use very little video memory space to store display data, but the DVI interface data is RGB data, that is, the image is composed of pixels one by one, and each pixel is represented by 32 bits. This requires processing the data represented by pixels, resulting in a sudden increase in the amount of data that needs to be processed for remote display. In addition, when only remote console display is required, the VGA display module still needs to provide pixel-represented data to the image compression module, increasing the power consumption of the entire server.

[0063] In view of this, in order to solve the problem of low efficiency and high power consumption of remote transmission and remote display of image data in Legacy mode of the baseboard management controller of the server in the related art, the present invention pre-represents the text characters with pixels, generates text image data for storage. When remote data transmission and remote display are required, the text data is directly obtained from the video memory, and then the corresponding stored character shape data is called, and the final text image that meets the display requirements is generated in combination with the attribute information, which can improve the transmission efficiency and image display efficiency of the image data in Legacy mode, and effectively reduce the power consumption of image data processing. After introducing the technical scheme of the present invention, various non-limiting embodiments of the present invention are described in detail below. In order to better illustrate the present invention, numerous specific details are given in the specific embodiments below. Those skilled in the art should understand that the present invention can also be implemented without these specific details. In other examples, the methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present invention.

[0064] First see Figure 2 , Figure 2 A flowchart of an image data processing method provided in this embodiment may include the following contents:

[0065] S201: Pre-build a text character conversion library.

[0066] In this step, the text character conversion library is a database storing character shape data. The character shape data is data generated after each text character is represented in an image pixel format. The so-called character shape data uses multiple pixels and uses different colors to distinguish the font display position and background to represent the shape of the text character. For example, the text character is A, such as Figure 3 As shown, 16×8 pixels are used to represent it. For A display, the occupied pixel grid is filled with black, and the non-A display occupied pixel grid is filled with white. The black pixel grid shows the shape of the text character A. Since the text character has its own color when actually displayed, when the character shape data generates a text image, it is necessary to fill the matching pixel value according to the color identification value of the character shape data. All text characters or at least commonly used text characters, including but not limited to uppercase and lowercase English letters, numbers, and commonly used Chinese characters are represented in image pixel format, and the corresponding character shape data is stored, so that the text character conversion library is constructed.

[0067] S202: Based on the display position of the content to be processed on the host screen, corresponding target text data is obtained from the corresponding position of the video memory.

[0068] In this step, the host screen display position is the position of the content to be processed displayed on the screen, the position of the screen display content stored in the video memory corresponds to its position displayed on the screen, and the target text data includes at least attribute information and content information, which are stored in the video memory as shown in Table 1 below. The attribute information includes a foreground color using 4 bits, a background color using 3 bits, and a flashing data using 1 bit. The content information refers to which text character is represented, and is usually represented by an 8-bit encoding.

[0069] Table 1 Data storage method of target text data in video memory

[0070]

[0071] S203: Generate index information according to the content information and the text character storage method in the text character conversion library, so as to read corresponding target character shape data from the text character conversion library according to display requirements based on the index information.

[0072] This step can pre-configure the APB (Advanced Peripheral Bus bus standard used in embedded systems) interface. The APB interface serves as a slave device interface to receive the register read and write operations of the host. The configuration of the APB bus can be received, and different functions can be completed according to different configurations. In the present invention, the display requirements can be configured through the APB interface. The display requirements include but are not limited to normal image display requirements, compressed image display requirements, black and white image display requirements, and incremental image display requirements, wherein the incremental image display requirements are the requirements of only reading the changed text data to generate the corresponding text image. When the APB interface is configured, the slave device, that is, the client, can receive the read and write operations of the APB bus to implement the operation of the register. In other words, when the register read and write operation instructions of the host are received, the corresponding register value is returned. At the same time, the control signals of each functional module are generated through the register and sent to each functional module to realize the control and monitoring of each functional module.

[0073] In this step, after obtaining the text data that needs to be remotely displayed and remotely transmitted, that is, the content information of the target text data, the target text characters that need to be remotely displayed and remotely transmitted can be known based on the content information. Since the text character conversion library constructed in S201 has stored the character shape data of each text character, based on the storage method of each text character in the text character conversion library, that is, the text character storage method, the position of the target character shape data corresponding to the target text character in the text character conversion library can be determined, that is, the index information is obtained. For example, if the content information adopts the ASIIC (American Standard Code for Information Interchange, American Standard Code for Information Interchange) code form, the index also uses the ASIIC code to index, and the text character storage method is that 256 symbols are stored in the character library storage in sequence, each symbol occupies 80 bits, and 10 bytes are used here to represent one character. Using the ASIIC code as an index, for example, the ASIIC code of the capital letter A is 8'h41, which is 65 in decimal, and the generated index information is 65*10~(66*10-1), that is, the character shape data of the capital letter A is stored at these addresses. Due to different display requirements, the character shape data is also different. For example, the character shape data obtained from the character conversion font under the compressed image display requirement is the character shape data after compression processing.

[0074] S204: Generate a text image represented by pixel values ​​based on the attribute information and the target character shape data according to display requirements.

[0075] After the target character shape data is obtained from the text character conversion library in the previous step, the pixel value of the corresponding position of the target character shape data is set based on the display requirements, that is, whether to set the pixel value of the background color and foreground color contained in the attribute information. For example, if the display requirement is a black and white image, and the color identification value of the target character shape data is 1 and 0, 1 represents the font color, and 0 represents the background color, then the target character shape data is the final generated text image. If the display requirement is a normal image, the pixel value of the pixel point corresponding to the background of the target character shape data needs to be filled according to the background color value of the attribute information, and the pixel value of the pixel point corresponding to the font of the target character shape data needs to be filled according to the foreground color value of the attribute information. Then, the target character shape data after the pixel value is filled is the final generated text image.

[0076] In the technical solution provided in this embodiment, text characters are represented by pixels, and text image data is generated for storage. When remote data transmission and remote display are required, the text data is directly obtained from the video memory, and then the corresponding stored character shape data is called, and the final text image that meets the display requirements is generated in combination with the attribute information. The amount of data that needs to be processed in the whole process is not large, which can improve the transmission efficiency and image display efficiency of the image data in the Legacy mode. Since the data is obtained from the video memory, there is no need for the VGA display module to work at the same time, thereby solving the problem that the VGA display module needs to work at the same time during the text mode remote transmission process, thereby wasting power consumption, and effectively reducing the power consumption of image data processing.

[0077] In the above embodiment, there is no limitation on how to generate the final text image. Based on the above embodiment, the present invention also provides a variety of text image generation methods for different display requirements, which may include the following:

[0078] For display requirements that are normal image display requirements, an image storage space can be constructed based on the pixel size and resolution of the text characters in the text character conversion library; based on the color identification value of each position of the target character shape data, the corresponding pixel value is read from the attribute information; according to the target character shape data and the pixel values ​​at different positions, the corresponding pixel values ​​are filled in the corresponding positions of the image storage space to obtain a text image represented by the pixel values, and the text image is written to the corresponding position of the memory, so that a text image represented by the pixel values ​​is stored in the memory.

[0079] In this embodiment, the image storage space is used to cache the generated image data, for example, it can be RAM (Random Access Memory). For example, if the pixel height of the character is 16 and the resolution is 720x400, the size of the image storage space can be 16x720, that is, the height of the image storage space is the height of one character and the width is 720. The target character shape data includes the font occupied position and the background position, and different positions use different color identification values, such as Figure 4 As shown, for Figure 3 In the character A shown, 1 represents the font occupied position, that is, the font color, and 0 represents the background color. The corresponding background pixel value and foreground color pixel value are read from the attribute information based on the color identification value of each pixel point of the target character shape data. If the color identification value corresponding to the current position is the font color, the pixel value of the foreground color in the attribute information is filled into the current position; if the color identification value corresponding to the current position is the background color, the pixel value of the background color in the attribute information is filled into the current position. Exemplarily, when constructing the image storage space, after the background color of the image storage space is set at the same time, that is, if the image storage space includes the space background attribute value, the pixel value of the font color position corresponding to the target character shape data is filled according to the foreground color of the attribute information; if the image storage space does not include the space background attribute value, the pixel value of the font color position corresponding to the target character shape data is filled according to the foreground color of the attribute information, and the pixel value of the background color position corresponding to the target character shape data is filled according to the background color of the attribute information.

[0080] Combination Figure 3 and Figure 4 For example, the image storage space is RAM, and the default value in RAM is black background color, 0x000000. The first line of RAM is the default value 0x000000, representing black; the first 8 pixel values ​​of the second line are filled in with the corresponding pixel values ​​according to the first 8bit indexed, when it is 0, it is filled in with 0x000000, when it is 1, the pixel value corresponding to the font color is filled in, and it is necessary to confirm it according to the attribute foreground color read out from the video memory, and fill in the corresponding pixel value; the first 8 pixel values ​​of the third line are filled in with the corresponding value according to the second 8bit indexed, and so on; in this way, a 720x16 pixel value image will be generated, which can be written to the corresponding position in the video memory.

[0081] It can be seen that, by constructing an image storage space, this embodiment can automatically generate and store normally displayed image data according to the video memory content, which is beneficial to improving the image data transmission efficiency and display efficiency during remote operation.

[0082] If the display requirement is a compressed image display requirement, correspondingly, the text character conversion library also includes compressed image data, and the compressed image data is image data after compressing the character shape with pixel values. Under this display requirement, it can also be determined whether the pixel values ​​of the foreground color and background color of the attribute information need to update the corresponding area according to whether the displayed image is an original image or a black and white image. Exemplarily, if the display requirement is a black and white image, the target character shape data after the character shape with pixel values ​​is compressed is directly written to the corresponding position of the memory, so that a compressed text image can be stored in the memory using a smaller storage space. If the display requirement is an original image, the pixel value at the corresponding position of the target character shape data is updated according to the foreground color pixel value and background color pixel value of the attribute information, so that a compressed text image carrying the color of the original image is stored in the memory.

[0083] It can be seen that the present invention can realize the compression of text images, and can compress black and white images or original color images according to needs, and realize the transmission of compressed data to the remote end, which is further beneficial to improve the image data transmission efficiency and display efficiency during remote operation.

[0084] Furthermore, if the display requirement is an incremental image display requirement, the changes in the content displayed on the host screen can be monitored; based on the changes in the content displayed on the host screen, the corresponding changed text data and screen position information are obtained from the channel that the host operating system writes to the video memory; based on the changed text data and the text character storage method in the text character conversion library, changed data index information is generated, and based on the changed data index information, the corresponding changed character shape data is read from the text character conversion library; based on the changed character shape data, the screen position information and the changed text data, a changed text image is generated.

[0085] In this embodiment, the screen position information is used to determine the position of the changed text image, and the changed character shape data is the character shape data corresponding to the changed text data in the character conversion library. Combined with the current display requirements, if the original text image is a normal image, it is necessary to read the attribute information from the changed text data, and fill the pixel value of the changed character shape data based on the attribute information, and then store it in the corresponding position of the memory in combination with the screen position information. If the original text image is a compressed image, the read changed character shape data is the compressed character shape data. Whether it is necessary to read the attribute information from the changed text data is determined based on whether the black and white image is displayed or the normal image. If it is the former, it is directly stored in the corresponding position of the memory based on the screen position information. If it is a normal image, it is necessary to use the attribute information to fill the pixel value of the changed text data.

[0086] As can be seen from the above, this embodiment can recognize text images and only modify the changed local text images for processing and transmission, which is beneficial to improving the image data transmission efficiency and display efficiency during remote operation.

[0087] The above embodiment does not limit how to construct the text character conversion library. Based on the above embodiment, the present invention also provides an exemplary construction method of the text character conversion library, which may include the following contents:

[0088] Obtain each text character to be converted in sequence; each text character to be converted includes content information represented by an ASIIC code; based on the ASIIC code of the text character to be converted, use m×n pixels, and the pixel value of each pixel is a first pixel value or a second pixel value to represent the text character to be converted, and obtain the character shape data of the text character to be converted; wherein m and n represent the horizontal and vertical dimensions of the image corresponding to the text character to be converted, the first pixel value is a font color identification value, and the second pixel value is a background color identification value; according to the first preset text character storage method, the character shape data of all text characters to be converted are stored in the corresponding positions of the normal character library to obtain the constructed normal character library. The character shape data of each text character to be converted is obtained from the normal character library to obtain a normal character text image restored to pixel representation; according to the image format of the normal character text image, the compressed image size corresponding to the minimum compression unit is determined; according to the preset compression ratio and the compressed image size, the normal character text image is compressed; according to the second preset text character storage method, the compressed image data of all text characters to be converted are stored in the corresponding positions of the compressed character library to obtain a constructed compressed character library, and based on the normal character library and the compressed character library, the text character conversion library of the present invention is obtained.

[0089] In this embodiment, a text character in the video memory is represented by two bytes, one byte represents the attribute, such as whether it is flashing, background color, foreground color, and one byte represents the font code, such as using the ASCII code to indicate which text character it is. This embodiment uses pixels to represent each text character, and the size of the text character is m and n. For example, m=16, n=8, that is, 16 pixels high and 8 pixels wide are used to represent a text character. Figure 3 and Figure 4 For example, Figure 3The black area represents the foreground color, that is, the color of the font, and 1 is used to represent the foreground color; the white area represents the background color, that is, the background color used for the entire display, and 0 is used to represent the background color. It can be seen that a text character can be represented by 16x8 bits, and the area at position 1 is represented by the pixel value of the foreground color, and the area at position 0 is represented by the pixel value of the background color. In the process of generating text images, it can be represented according to the 3-bit background color and 4-bit foreground color obtained from the video memory, where there can be 8 background colors and 16 foreground colors. This embodiment uses ASCII code to represent text characters. Based on Table 1, it can be seen that the ASCII code is represented by 8 bits, and a maximum of 256 characters can be represented. That is, the storage space required to store a normal text character is 256x16x8 bits, which is 4KB of storage space. Furthermore, in order to improve the utilization of storage space, the remaining blank lines can be removed except for the number of lines occupied by font display. Figure 3 As shown in the figure, the top row and the bottom 5 rows can be removed, leaving the middle 10 rows. For byte alignment and ease of processing, spaces are no longer deleted on the left and right, and 8 columns are still used. In this way, the actual space used by each text character is 256x10x8bit, that is, 2.5KB. The normal storage method of the font library is to arrange them in sequence, that is, 00, 01, 02, 03, 04, 05, 06, 07, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22...

[0090] After reading data from a normal font, the read character shape data will be restored to an image represented by pixels according to the foreground and background colors in the attribute information, and then compressed. Therefore, the compressed font stores compressed image data. Taking the text image in JPEG format as an example, the minimum compression unit is compressed as a block in the form of 8x8 pixels. Therefore, the compressed font can split the image formed by a character into two blocks, and then store the compressed image data. By calculation, according to the compression ratio of 1:10, a compressed character image is about 16x8x32bit / 10=51B, and a total of 256x51B=12.75KB of space is required.

[0091] It can be seen that this embodiment achieves the use of the smallest storage space to store the most abundant character shape data of text characters by separately constructing a normal character library and a compressed character library and adjusting the storage space occupied by character shape data, which is beneficial to reducing the amount of image data processing during remote operation.

[0092] It is understandable that when using the Legacy mode, since older protocols and security standards may be involved, there may be certain risks in the remote operation process. In order to improve the security of remote operation, based on the above embodiment, the present invention may also include the following contents:

[0093] When in the settings or configuration files of the software or system, find the relevant options for the remote console and choose to enable Legacy mode. According to the requirements of Legacy mode, set specific ports on the firewall or router and ensure that there are appropriate permissions to access the remote console. Use appropriate remote access tools or client software to connect to the remote console, such as Remote Desktop Client, SSH (Secure Shell) client or other dedicated remote access software. During the connection process, enter the necessary login credentials, such as user name and password. Once the connection is established, test the functions of the remote console to ensure that Legacy mode is working properly. On this basis, this embodiment can also ensure that appropriate security measures are taken in the following ways:

[0094] Choose a reliable VPN (Virtual Private Network) service provider with a good privacy policy and security record, install the VPN client on the slave device, and configure it according to the provider's guide. Before trying to access the remote console, make sure you are connected to the VPN. When the master and slave devices are connected, use a password that contains uppercase and lowercase letters, numbers, and special characters, such as a password length of at least 12 characters, to increase the complexity of the password. If the remote console supports two-factor authentication, register and enable two-factor authentication at the same time, and use the authenticator application to generate a one-time password to prevent password leakage and intrusion. Regularly check and install all security updates and patches for the remote console software, and use protocols that support encryption, such as SSH. Further, access restrictions can be implemented by setting up IP whitelists and port restrictions. Among them, IP whitelists only allow specific IP addresses to access the remote console; port restrictions only open the ports required by the remote console when necessary. Regularly check the activity log of the remote console to detect any abnormal behavior. Ensure that the audit log of the remote console is enabled for post-analysis.

[0095] As can be seen from the above, this embodiment can effectively improve security when using the remote console in Legacy mode by taking the above security measures.

[0096] In order to make those skilled in the art understand the technical solution provided by the present invention, the present invention also provides an exemplary embodiment, which may include the following contents:

[0097] like Figure 5As shown, an image processing device is set in the basic management controller, the VGA display module stores the text data in the video memory, the image processing device directly obtains the text data from the video memory, and performs text processing on the text data to obtain the corresponding text image represented by pixels, stores the generated text image in the memory, and outputs the text image through the network control module.

[0098] like Figure 6 As shown, the image processing device includes an APB interface, a control module, a data acquisition module, an index module, an image generation module, a normal character library storage module, a compressed character library storage module and a data output module, wherein the data processing flow between the modules is as follows Figure 7 As shown. The APB interface receives software configuration, as a slave device interface, and receives register read and write operations from the host. The control module implements register operations, receives read and write operations from the APB bus, and returns the corresponding register value. At the same time, control signals of the data acquisition module, index module, image generation module, normal character library storage module, compressed character library storage module and data output module are generated through the register, and sent to the corresponding functional modules, thereby realizing the control and monitoring of the data acquisition module, index module, image generation module, normal character library storage module, compressed character library storage module and data output module. The data acquisition module obtains the original text data from the video memory through the AXI (Advanced eXtensible Interface, bus protocol) bus. The normal character library storage module is used to store the normal character library, that is, each ASIIC code corresponds to a character shape data, in other words, the display form corresponding to the ASIIC code is stored. The compressed character library storage module is used to store the display form corresponding to the compressed ASIIC code. The index module is used to search for relevant pixel value data from the normal character library or the compressed character library according to the ASIIC code obtained from the video memory, and send the index address to the corresponding sub-library storage module. The image generation module generates an image according to a certain rule based on the character shape data output from the normal character library or the compressed character library, and outputs it through the data output module. For example, the data in the first line currently displayed is: touch 123.txt, then the index address generated by the index module is sent to the normal character library storage module, the normal character library storage module outputs the data of the corresponding character, and the image generation module writes the pixel value to the corresponding area based on the attribute information.

[0099] Based on the above-mentioned image processing device, the generation process of the entire image data can be as follows: the data acquisition module obtains the attribute information and ASIIC code of the text data from the video memory, and sends it to the index module; the index module sends the attribute information to the image generation module, and generates an index value corresponding to the text data according to the ASIIC code value, and sends it to the normal character library storage module; the normal character library storage module outputs the character shape data according to the index value, and sends it to the image generation module; the image generation module fills in different pixel values ​​in the RAM according to the attribute information and character shape data, and finally writes them to different locations of the memory through the data output module. At this time, a corresponding text image represented by a pixel value is stored in the memory, and the text image can be used for JPEG compression or other processing later.

[0100] Based on the above-mentioned image processing device, the process of generating compressed image data can be as follows: the data acquisition module obtains the ASIIC code of the text data from the video memory and sends it to the index module; the index module generates an index value corresponding to the text data according to the ASIIC code value, and sends it to the compressed character library storage module; the compressed character library storage module outputs the character shape data according to the index value, and sends it to the image generation module; the image generation module writes the character shape data directly to different locations of the memory, and at this time, a corresponding compressed text image is stored in the memory.

[0101] From the above, it can be seen that this embodiment can be used in the remote control function in the baseboard management controller to realize the generation, compression and transmission of images using remote control in the Legacy mode, which can improve the transmission efficiency and image display efficiency of image data in the Legacy mode and effectively reduce the power consumption of image data processing.

[0102] It should be noted that there is no strict order of execution between the steps in the present invention. As long as they comply with the logical order, these steps can be executed simultaneously or in a preset order. The above drawings are only a schematic diagram and do not mean that this is the only execution order.

[0103] The present invention also provides a corresponding device for the image data processing method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The image data processing device provided by the present invention is introduced below. The device is used to implement the image data processing method provided by the present invention. In this embodiment, the image data processing device may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the image data processing method disclosed in Example 1. The program module referred to in this embodiment refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of the image data processing device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The image data processing device described below and the image data processing method described above can be referred to in correspondence with each other.

[0104] From the perspective of functional modules, see Figure 8 , Figure 8 The structure diagram of the image data processing device provided in this embodiment under a specific implementation manner, the device may include:

[0105] The character library construction module 801 is used to construct a text character conversion library; the text character conversion library is used to represent each text character in an image pixel format and store the corresponding character shape data;

[0106] The data acquisition module 802 is used to acquire corresponding target text data from the corresponding position of the video memory based on the display position of the content to be processed on the host screen; the target text data includes attribute information and content information;

[0107] An index module 803, used to generate index information according to the content information and the text character storage method in the text character conversion library, so as to read the corresponding target character shape data from the text character conversion library according to the display requirements based on the index information;

[0108] The image generation module 804 is used to generate a text image represented by pixel values ​​based on the attribute information and the target character shape data according to display requirements.

[0109] Exemplarily, in some implementations of this embodiment, the image generation module 804 may also be used to:

[0110] The display requirement is a normal image display requirement. Based on the pixel size and resolution of the text characters in the text character conversion library, an image storage space is constructed.

[0111] Based on the color identification value of each position of the target character shape data, the corresponding pixel value is read from the attribute information;

[0112] According to the target character shape data and the pixel values ​​at different positions, the corresponding pixel values ​​are filled in the corresponding positions of the image storage space to obtain a text image represented by the pixel values, and the text image is written to the corresponding position of the memory.

[0113] As an exemplary implementation of the above embodiment, the above image generation module 804 may be further used for:

[0114] If the image storage space includes a space background attribute value, then fill the pixel value of the font color position corresponding to the target character shape data according to the foreground color of the attribute information;

[0115] If the image storage space does not include the space background attribute value, the pixel value of the font color position corresponding to the target character shape data is filled according to the foreground color of the attribute information, and the pixel value of the background color position corresponding to the target character shape data is filled according to the background color of the attribute information.

[0116] Exemplarily, in some other implementations of this embodiment, the image generation module 804 may also be used for:

[0117] The display requirement is a compressed image display requirement, and the text character conversion library also includes compressed image data, where the compressed image data is image data obtained by compressing a character shape having a pixel value;

[0118] If the display requirement is a black and white image, the target character shape data after character shape compression with pixel values ​​is directly written into the corresponding position of the memory;

[0119] If the display requirement is an original image, the pixel value at the corresponding position of the target character shape data is updated according to the foreground color pixel value and the background color pixel value of the attribute information.

[0120] Exemplarily, in some other implementations of this embodiment, the image generation module 804 may also be used for:

[0121] Monitor changes in the content displayed on the host screen;

[0122] According to the changes in the content displayed on the host screen, the corresponding changed text data and screen position information are obtained from the channel of the host operating system writing video memory;

[0123] Generate change data index information according to the change text data and the text character storage method in the text character conversion library, and read corresponding change character shape data from the text character conversion library based on the change data index information;

[0124] Based on the changing character shape data, the screen position information and the changing text data, a changing text image is generated.

[0125] Exemplarily, in some other implementations of this embodiment, the above-mentioned device may further include a control module and an interface configuration module;

[0126] The interface configuration module is used to: pre-configure the APB interface and configure display requirements through the APB interface;

[0127] The control module is used to return the corresponding register value and generate a control signal when receiving a register read and write operation instruction from the host.

[0128] Illustratively, in some other implementations of this embodiment, the above-mentioned character library construction module 801 may also be used for:

[0129] Obtaining text characters to be converted; the text characters to be converted include content information represented by ASCII codes;

[0130] Based on the ASIIC code of the text character to be converted, the text character to be converted is represented by using m×n pixels, and the pixel value of each pixel is the first pixel value or the second pixel value, to obtain the character shape data of the text character to be converted; wherein m and n represent the horizontal and vertical sizes of the image corresponding to the text character to be converted, the first pixel value is the font color identification value, and the second pixel value is the background color identification value;

[0131] According to the first preset text character storage method, the character shape data of all the text characters to be converted are stored in the corresponding positions of the normal character library to obtain a constructed normal character library;

[0132] Acquire character shape data of the text character to be converted from a normal character library, and obtain a normal character text image restored to pixel representation;

[0133] Determine the compressed image size corresponding to the minimum compression unit according to the image format of the normal character text image;

[0134] Compressing the normal character text image according to the preset compression ratio and compressed image size;

[0135] According to the second preset text character storage method, the compressed image data of all the text characters to be converted are stored in the corresponding positions of the compressed character library to obtain a constructed compressed character library.

[0136] The functions of the functional modules of the image data processing device of this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.

[0137] It can be seen from the above that this embodiment can improve the transmission efficiency and image display efficiency of image data in the Legacy mode, and effectively reduce the power consumption of image data processing.

[0138] The image data processing device mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Fig. 9 The following is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention in one implementation manner. Fig. 9 As shown, the electronic device includes a memory 90 for storing computer programs; and a processor 91 for implementing the steps of the image data processing method mentioned in any of the above embodiments when executing the computer program.

[0139] Among them, the processor 91 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 91 may also be a controller, a microcontroller, a microprocessor or other data processing chip. The processor 91 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 91 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 91 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 91 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0140] The memory 90 may include one or more computer non-volatile storage media, which may be non-transitory. The memory 90 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the memory 90 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 90 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 90 may also include both an internal storage unit of an electronic device and an external storage device. The memory 90 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the image data processing method, but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 90 is at least used to store the following computer program 901, wherein, after the computer program is loaded and executed by the processor 91, the relevant steps of the image data processing method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 90 may also include an operating system 902 and data 903, and the storage method may be temporary storage or permanent storage. The operating system 902 may include Windows, Unix, Linux, etc. The data 903 may include, but is not limited to, data corresponding to the image data processing result.

[0141] In some embodiments, the electronic device may further include a display screen 92, an input / output interface 93, a communication interface 94 or a network interface, a power supply 95 and a communication bus 96. Among them, the display screen 92 and the input / output interface 93 such as a keyboard belong to the user interface, and exemplary user interfaces may also include standard wired interfaces, wireless interfaces, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 94 may exemplarily include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which are generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 96 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0142] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, for example, it may also include a sensor 97 for realizing various functions.

[0143] The functions of the functional modules of the electronic device described in this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.

[0144] It can be seen from the above that this embodiment can improve the transmission efficiency and image display efficiency of image data in the Legacy mode, and effectively reduce the power consumption of image data processing.

[0145] It is understandable that if the image data processing in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes but is not limited to: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes. Based on this, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of image data processing recorded in any of the above embodiments are performed.

[0146] It is understandable that if the image data processing in the above-mentioned embodiments is implemented in the form of a software functional unit and sold or used as an independent product, the computer software product does not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities through a wired network or a wireless network to perform all or part of the steps of the methods of various embodiments of the present invention. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product storing a computer program, which, when executed by a processor, performs the steps of image data processing as described in any of the above embodiments.

[0147] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the hardware disclosed in the embodiments, including devices and electronic devices, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.

[0148] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0149] The above is a detailed introduction to an image data processing method, device, electronic device and non-volatile storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that based on the embodiments of the present invention, for ordinary technicians in this technical field, all other embodiments obtained without creative work are within the scope of protection of the present invention. Without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A method for processing image data, characterized in that: include: Pre-built text character conversion library; The text character conversion library is used to represent each text character in an image pixel format and store corresponding character shape data; Based on the display position of the content to be processed on the host screen, the corresponding target text data is obtained from the corresponding position of the video memory; the target text data includes attribute information and content information; Generate index information according to the content information and the text character storage method in the text character conversion library, so as to read corresponding target character shape data from the text character conversion library according to display requirements based on the index information; According to the display requirement, a text image represented by pixel values ​​is generated based on the attribute information and the target character shape data.

2. The image data processing method according to claim 1, characterized in that: The display requirement is a normal image display requirement. According to the display requirement, a text image represented by pixel values ​​is generated based on the attribute information and the target character shape data, including: constructing an image storage space based on the pixel size and resolution of the text characters in the text character conversion library; Based on the color identification value of each position of the target character shape data, reading the corresponding pixel value from the attribute information; According to the target character shape data and the pixel values ​​at different positions, the corresponding pixel values ​​are filled in the corresponding positions of the image storage space to obtain a text image represented by the pixel values, and the text image is written into the corresponding position of the memory.

3. The image data processing method according to claim 2, characterized in that: The step of filling corresponding pixel values ​​at corresponding positions in the image storage space according to the target character shape data and pixel values ​​at different positions includes: If the image storage space includes a space background attribute value, then fill the pixel value of the font color position corresponding to the target character shape data according to the foreground color of the attribute information; If the image storage space does not include a space background attribute value, the pixel value of the font color position corresponding to the target character shape data is filled according to the foreground color of the attribute information, and the pixel value of the background color position corresponding to the target character shape data is filled according to the background color of the attribute information.

4. The image data processing method according to claim 1, characterized in that: The display requirement is a compressed image display requirement. According to the display requirement, a text image represented by pixel values ​​is generated based on the attribute information and the target character shape data, including: The text character conversion library also includes compressed image data, wherein the compressed image data is image data obtained by compressing a character shape having a pixel value; If the display requirement is a black and white image, the target character shape data after character shape compression with pixel values ​​is directly written into the corresponding position of the memory; If the display requirement is an original image, the pixel value at the corresponding position of the target character shape data is updated according to the foreground color pixel value and the background color pixel value of the attribute information.

5. The image data processing method according to claim 1, characterized in that: After generating a text image represented by pixel values ​​based on the attribute information and the target character shape data according to the display requirement, the method further includes: Monitor changes in the content displayed on the host screen; According to the changes in the content displayed on the host screen, the corresponding changed text data and screen position information are obtained from the channel of the host operating system writing video memory; Generate change data index information according to the change text data and the text character storage method in the text character conversion library, and read corresponding change character shape data from the text character conversion library based on the change data index information; A changing text image is generated based on the changing character shape data, the screen position information, and the changing text data.

6. The image data processing method according to claim 1, characterized in that: Before obtaining corresponding target text data from a corresponding position of a video memory based on the display position of the content to be processed on the host screen, the method further includes: Pre-configure an APB interface, and configure display requirements through the APB interface; When receiving the register read and write operation instructions from the host, the corresponding register value is returned and a control signal is generated at the same time.

7. The image data processing method according to any one of claims 1 to 6, characterized in that: The text character conversion library includes a normal character library and a compressed character library. The construction process of the text character conversion library includes: Acquire text characters to be converted; the text characters to be converted include content information represented by ASIIC codes; Based on the ASIIC code of the text character to be converted, the text character to be converted is represented by m×n pixels, and the pixel value of each pixel is a first pixel value or a second pixel value, to obtain character shape data of the text character to be converted; wherein m and n represent the horizontal and vertical sizes of the image corresponding to the text character to be converted, the first pixel value is a font color identification value, and the second pixel value is a background color identification value; According to the first preset text character storage method, the character shape data of all the text characters to be converted are stored in the corresponding positions of the normal character library to obtain a constructed normal character library; Acquire the character shape data of the text character to be converted from the normal character library to obtain a normal character text image restored to pixel representation; Determining a compressed image size corresponding to a minimum compression unit according to an image format of the normal character text image; Compressing the normal character text image according to a preset compression ratio and the compressed image size; According to the second preset text character storage method, the compressed image data of all the text characters to be converted are stored in the corresponding positions of the compressed character library to obtain a constructed compressed character library.

8. An image data processing device, characterized in that: include: Font building module, used to build text character conversion library; The text character conversion library is used to represent each text character in an image pixel format and store corresponding character shape data; A data acquisition module, used to acquire corresponding target text data from a corresponding position of a video memory based on the display position of the content to be processed on the host screen; the target text data includes attribute information and content information; An index module, used for generating index information according to the content information and the text character storage method in the text character conversion library, so as to read corresponding target character shape data from the text character conversion library according to display requirements based on the index information; The image generation module is used to generate a text image represented by pixel values ​​based on the attribute information and the target character shape data according to the display requirements.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor is used to implement the steps of the image data processing method according to any one of claims 1 to 7 when executing a computer program stored in the memory.

10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image data processing method according to any one of claims 1 to 7 are implemented.