Data display method, device and system based on single-core architecture, medium and program

By initializing the configuration and data type basis of display devices and hardware devices of single-core architecture, the resource waste and coupling problems of traditional multi-core and single-core architectures in data display are solved, and high-quality single-core data is achieved show.

CN119225674APending Publication Date: 2024-12-31GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411341378.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Traditional multi-core architectures are prone to waste of resources in data display, and the module coupling requirements of single-core architectures are high, resulting in high complexity and error rates.

Method used

By initializing the display devices and hardware devices of a single-core architecture, the data to be displayed is collected and displayed accordingly according to the data type, including processing of pictures, text and curved data, the display method is optimized to reduce resource waste and coupling.

Benefits of technology

It realizes high-quality data display in a single-core architecture, reduces resource waste and module coupling, improves image drawing efficiency and accuracy, and ensures the stability and clarity of the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225674A_ABST
    Figure CN119225674A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data display, and discloses a data display method, device and system based on a single-core architecture, a medium and a program.The method comprises the steps that initialization configuration is conducted on display equipment based on the single-core architecture and hardware equipment, and the hardware equipment is controlled to collect to-be-displayed data; processing the to-be-displayed data to obtain target display data; and controlling a display device to correspondingly display the target display data according to the data type of the target display data. According to the method, the display device and the hardware device based on the single-core architecture are subjected to initialization configuration, it is ensured that the hardware device can work according to expectation and provide a stable operation environment for upper-layer applications, it is ensured that the display device achieves a high-quality display effect in the single-core architecture, the requirements of application scenes are met, and the user experience is improved. Data display is achieved through a single-core architecture, resource waste is reduced, the requirement for the coupling degree is low, and implementation is easy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data display technology, and in particular to a data display method, device, system, medium and program based on a single-core architecture. Background Art

[0002] As the core of embedded systems, processors carry key tasks such as control and drive. Multi-core processors have been widely used in data display. Multi-core frameworks need to deal with issues such as synchronization, communication, and resource sharing between multiple cores, which is highly complex.

[0003] For some simple data display tasks, using a multi-core framework to handle them will cause a waste of resources and a high error rate, but the single-core architecture also has disadvantages such as unclear hierarchy and high module coupling requirements.

[0004] Therefore, how to use single-core architecture devices to display data in order to reduce resource waste and module coupling has become an urgent problem to be solved. Summary of the invention

[0005] In view of this, the present invention provides a data display method, device, system, medium and program based on a single-core architecture to solve the problems that traditional multi-core architecture display methods easily cause resource waste and traditional single-core architecture display methods have high module coupling requirements.

[0006] In a first aspect, the present invention provides a data display method based on a single-core architecture, the method comprising:

[0007] Initialize and configure the display device and hardware device based on the single-core architecture respectively, and control the hardware device to collect the data to be displayed;

[0008] Processing the data to be displayed to obtain target display data;

[0009] According to the data type of the target display data, the display device is controlled to display the target display data accordingly.

[0010] Beneficial effects: The display device and hardware device based on the single-core architecture are initialized and configured respectively to ensure that the hardware device can work as expected and provide a stable operating environment for the upper-layer application, and to ensure that the display device can achieve high-quality display effects in the single-core architecture to meet the needs of the application scenario, and then control the hardware device to collect the data to be displayed, process the data to be displayed, and obtain the target display data. Finally, according to the data type of the target display data, the display device is controlled to display the target display data accordingly, and the single-core architecture is used to realize data display, reduce resource waste, and has low coupling requirements and is easy to implement.

[0011] In an optional implementation, according to the data type of the target display data, controlling the display device to display the target display data accordingly includes:

[0012] Performing type analysis on the target display data to obtain a data type corresponding to the target display data; wherein the data type includes at least one of picture data, text data, and curve data;

[0013] The display device is controlled to display the target display data in a data display mode corresponding to the data type.

[0014] Beneficial effects: According to the data display mode of picture data, text data and curve data, the image is quickly drawn, the color transmission and filling process is accelerated, and the efficiency and accuracy of image drawing are improved.

[0015] In an optional implementation, when the data type is picture data, controlling the display device to display the target display data according to the data display mode corresponding to the data type includes:

[0016] Parse the image data to obtain the image height and image width;

[0017] Perform pixel traversal based on the image height and image width, perform data conversion on each pixel in the image data, and determine the pixel address and color information corresponding to each pixel;

[0018] The display device is controlled to draw a picture based on the pixel data obtained after the data conversion and according to the pixel address and color information corresponding to each pixel.

[0019] Beneficial effects: By traversing each pixel of the image data, performing pixel data conversion, and determining the pixel address and color information of each pixel, it is convenient for the display device to draw pictures, accelerate the color transmission and filling process, and improve the efficiency and accuracy of image drawing.

[0020] In an optional implementation, when the data type is text data, controlling the display device to display the target display data according to the data display mode corresponding to the data type includes:

[0021] Parse the text data to obtain the text height and text width;

[0022] Perform pixel traversal based on the text height and text width to determine the pixel address and color information corresponding to each pixel, and determine the mixed color component corresponding to each pixel based on the color information and the mixed color set by the user;

[0023] The display device is controlled to draw text based on the text transparency set by the user and according to the pixel address corresponding to each pixel and the mixed color component.

[0024] Beneficial effects: By traversing each pixel of the text data, the pixel address and mixed color components corresponding to each pixel are determined, which facilitates the display device to draw the text; the transparency adjustment technology is used to ensure that the text is displayed with appropriate transparency, which is clear and readable without causing abrupt visual conflicts with the background image.

[0025] In an optional implementation, when the data type is curve data, controlling the display device to display the target display data according to the data display mode corresponding to the data type includes:

[0026] Perform coordinate conversion on the curve data to obtain pixel coordinates corresponding to the curve data;

[0027] Fitting the curve data based on the pixel coordinates to obtain multiple continuous coordinate points;

[0028] Smooth multiple continuous coordinate points and draw curves according to the curve colors set by the user.

[0029] Beneficial effect: The quality of curve data drawing is improved by performing coordinate conversion, data fitting, smoothing and color addition on the curve data.

[0030] In an optional implementation, determining the pixel address and color information corresponding to each pixel includes:

[0031] Calculate the pixel address corresponding to each pixel in the display buffer of the display device according to the starting coordinates of the pixel and the offset of each pixel in the image data;

[0032] The three primary color information of each pixel is extracted to obtain the color information corresponding to each pixel.

[0033] Beneficial effect: By determining the pixel address and color information of each pixel, the color transmission and filling process is accelerated, making image drawing easier.

[0034] In an optional implementation, initializing and configuring a hardware device based on a single-core architecture includes:

[0035] Configure clock parameters, general input / output port parameters, communication interface parameters, and sensor parameters of hardware devices based on single-core architecture;

[0036] Among them, the clock parameters include at least one of the clock source and the clock division, the general input / output port parameters include at least one of the input / output mode, the pull-up / pull-down resistor and the interrupt trigger mode, the communication interface parameters of the hardware device include at least one of the synchronous serial communication parameters and the asynchronous serial communication parameters, and the sensor parameters include at least one of the sampling rate and the range.

[0037] Beneficial effects: By initializing the configuration of the underlying hardware devices, it is ensured that the hardware devices can work as expected and provide a stable operating environment for the upper-layer applications.

[0038] In an optional implementation, initializing and configuring a display device based on a single-core architecture includes:

[0039] Configure display parameters, communication interface parameters, and storage parameters of a display device based on a single-core architecture;

[0040] Among them, the display parameters include at least one of display resolution, color depth, refresh rate, display mode, pixel format and scanning mode, the communication interface parameters of the display device include at least one of communication rate, clock polarity and clock phase, and the storage parameters include the memory address of the display buffer.

[0041] Beneficial effect: By initializing and configuring the display device, it can be ensured that the display device can achieve high-quality display effects in a single-core architecture system to meet the needs of application scenarios.

[0042] In a second aspect, the present invention provides a data display device based on a single-core architecture, the device comprising:

[0043] The first processing module is used to initialize and configure the display device and the hardware device based on the single-core architecture respectively, and control the hardware device to collect data to be displayed;

[0044] A second processing module is used to process the data to be displayed to obtain target display data;

[0045] The third processing module is used to control the display device to display the target display data accordingly according to the data type of the target display data.

[0046] In a third aspect, the present invention provides a data display system based on a single-core architecture, comprising: a bottom layer and a display layer;

[0047] The bottom layer is used to initialize and configure the hardware devices based on the single-core architecture, control the hardware devices to collect the data to be displayed, and process the data to be displayed to obtain the target display data;

[0048] The display layer is used to initialize and configure the display device based on the single-core architecture; according to the data type of the target display data, the display device is controlled to display the target display data accordingly.

[0049] In an optional implementation, the display device is a color display screen.

[0050] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data display method based on a single-core architecture according to the first aspect or any corresponding embodiment thereof.

[0051] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data display method based on a single-core architecture according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 is a structural block diagram of a data display system based on a single-core architecture according to an embodiment of the present invention;

[0054] Figure 2 is a structural block diagram of a single-core architecture multi-mode color screen display system according to an embodiment of the present invention;

[0055] Figure 3 is a flow chart of a data display method based on a single-core architecture according to an embodiment of the present invention;

[0056] Figure 4 is a flow chart of another data display method based on a single-core architecture according to an embodiment of the present invention;

[0057] Figure 5 is a flowchart of another data display method based on a single-core architecture according to an embodiment of the present invention;

[0058] Figure 6 is a flowchart of picture drawing according to an embodiment of the present invention;

[0059] Figure 7 is a flowchart of text drawing according to an embodiment of the present invention;

[0060] Figure 8 is a flow chart of curve drawing according to an embodiment of the present invention;

[0061] Fig. 9 is a structural block diagram of a data display device based on a single-core architecture according to an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0063] As the core of embedded systems, processors carry key tasks such as control and drive. Compared with multi-core frameworks, single-core frameworks do not need to deal with issues such as synchronization, communication, and resource sharing between multiple cores, which can significantly reduce the complexity and error rate in software development. They have the advantages of low cost, high integration, and good stability. However, they also have disadvantages such as unclear hierarchy and high module coupling.

[0064] At the same time, as an indispensable part of modern embedded devices, color screen display has advantages such as bright colors and can present rich and vivid visual effects. However, the existing color screen drawing methods have poor processing effects in terms of transparency processing and color mixing, which affects the naturalness and realism of the image.

[0065] Therefore, the embodiment of the present invention provides a data display solution based on a single-core architecture, optimizes the single-core framework structure and the color screen drawing method, reduces the waste of computing resources, and has low requirements on system coupling, is relatively easy to implement, and is of great significance.

[0066] According to an embodiment of the present invention, a data display system based on a single-core architecture is provided. Figure 1 As shown, the data display system includes a bottom layer 101 and a display layer 102 .

[0067] The bottom layer 101 is used to initialize and configure the hardware device based on the single-core architecture, control the hardware device to collect the data to be displayed, and process the data to be displayed to obtain the target display data.

[0068] The display layer 102 is used to initialize and configure the display device based on the single-core architecture, and control the display device to display the target display data accordingly according to the data type of the target display data.

[0069] Exemplarily, the display device is a color display screen.

[0070] The specific working principles of the bottom layer 101 and the display layer 102 can be found in the specific description of the method embodiment below, which will not be repeated here.

[0071] Furthermore, if Figure 2 As shown, an embodiment of the present invention provides a single-core architecture multi-mode color screen display system, which divides the entire system into two parts: a system bottom layer and a color screen display layer. The system bottom layer is specifically divided into three parts: a driving module, a control module, and a data processing module.

[0072] Specifically, the driver module directly interacts with the hardware interface and is responsible for implementing the system's control of the hardware circuit, digital logic, and chip drive, such as SPI read and write drivers, to ensure that the hardware device can work as expected. In addition, the driver module provides an interface for upper-level applications to interact with the hardware, allowing the system to easily control the hardware device and implement the corresponding functions.

[0073] Furthermore, the control module is responsible for the control and decision-making of the overall system process. It accepts instructions from the color screen display layer, performs logical processing, controls the execution of tasks specified by these instructions, and feeds back the monitored system underlying information to the color screen display layer, providing an important basis for the scheduling and decision-making of the color screen display layer.

[0074] Furthermore, the data processing module is mainly responsible for collecting data, such as PM2.5 values, temperature, motor speed and other parameters obtained from sensors, as well as pictures and text data required for display, and processing and analyzing the acquired data to meet the system communication and display requirements, ensuring the stability and performance of the system while simplifying the complexity of software development.

[0075] Specifically, the color screen display layer is mainly responsible for displaying the collected data on the color screen in the form of pictures, texts or curves, providing an intuitive and clear display of sensor information. It will first analyze the received data. Once the data exceeds the preset threshold, it will immediately remind the user to pay attention through intuitive methods such as image changes to ensure that important information can be conveyed in a timely manner. If the data is within the normal range, the module will further judge the data type and display the corresponding content according to different data types, including picture display, text display, and curve display.

[0076] In the embodiments of the present invention, in order to solve the problems of unclear hierarchy and high module coupling of the single-core framework, as well as the shortcomings of color screen display technology in transparency processing and color mixing, a multi-mode color screen real-time display system based on a single-core architecture is proposed by optimizing the single-core framework and the color screen drawing algorithm. The system not only retains the advantages of low cost, high integration and good stability of the single-core framework, but also improves the color screen display effect, and can present accurate display content and rich display effects.

[0077] According to an embodiment of the present invention, a data display method embodiment based on a single-core architecture is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0078] In this embodiment, a data display method based on a single-core architecture is provided, which can be used for electronic devices or computer devices based on a single-core architecture, such as a single-core display, etc. Figure 3 is a flow chart of a data display method based on a single-core architecture according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0079] Step S301 , initializing and configuring the display device and hardware device based on the single-core architecture respectively, and controlling the hardware device to collect data to be displayed.

[0080] Specifically, the clock parameters, general input / output port parameters, communication interface parameters and sensor parameters of the hardware device based on the single-core architecture are configured, wherein the clock parameters include at least one of a clock source and a clock division, the general input / output port parameters include at least one of an input / output mode, a pull-up / pull-down resistor and an interrupt trigger mode, the communication interface parameters of the hardware device include at least one of a synchronous serial communication parameter and an asynchronous serial communication parameter, and the sensor parameters include at least one of a sampling rate and a range.

[0081] In some optional implementations, the system's clock source and clock divider are configured to ensure that various modules such as the CPU and peripherals can run at the correct clock frequency; the input and output modes, pull-up / pull-down resistors, interrupt trigger modes, etc. of the GPIO pins are configured to meet the connection requirements of different peripherals or sensors; the parameters of communication interfaces such as SPI and UART are configured, and these interfaces are enabled to communicate with peripherals; interrupt priorities are configured, and specific interrupt sources are enabled or disabled to ensure that the system can respond to key events in a timely manner; the operating mode, sampling rate, range and other parameters of the sensor are configured; and the system state variables are configured and initialized to record the current state of the system.

[0082] In the embodiment of the present invention, by initializing and configuring the underlying hardware devices, it is ensured that the hardware devices can work as expected and a stable operating environment is provided for upper layer applications.

[0083] Specifically, the display parameters, communication interface parameters and storage parameters of a display device based on a single-core architecture are configured, wherein the display parameters include at least one of display resolution, color depth, refresh rate, display mode, pixel format and scanning mode, the communication interface parameters of the display device include at least one of communication rate, clock polarity and clock phase, and the storage parameters include the memory address of the display buffer.

[0084] In some optional embodiments, the display device is a color display screen, and the color screen display configuration part is mainly responsible for processing all display tasks related to the color screen, including setting the display resolution according to the physical resolution of the color screen; selecting a suitable color depth and a suitable refresh rate according to the hardware support and system requirements of the color screen; configuring corresponding communication interface parameters according to the connection method between the color screen and the processor, including setting the communication rate, clock polarity and phase, etc., to ensure that the processor can correctly send data and instructions to the color screen; setting the display mode, pixel format, and scanning direction of the color screen according to application requirements, and allocating sufficient memory space for the color screen display as a display buffer for storing images or video frame data to be displayed.

[0085] This embodiment can ensure that the color screen can achieve high-quality display effects in a system with a single-core architecture by initializing and configuring the display device, thereby meeting the requirements of application scenarios.

[0086] Specifically, the bottom-level control hardware devices such as sensors collect data, such as obtaining PM2.5 values, temperature, motor speed and other parameters from sensors, as well as pictures and text data required for display.

[0087] Step S302: Process the data to be displayed to obtain target display data.

[0088] Specifically, the underlying layer processes and analyzes the acquired data to meet the system communication and display requirements, ensuring the stability and performance of the system while simplifying the complexity of software development.

[0089] Step S303: controlling the display device to display the target display data accordingly according to the data type of the target display data.

[0090] Specifically, the display layer will first analyze the received data. Once the data exceeds the preset threshold, it will immediately remind the user through intuitive methods such as image changes to ensure that important information can be conveyed in a timely manner. If the data is within the normal range, the module will further determine the data type and display the corresponding content according to different data types, including picture display, text display, and curve display.

[0091] The data display method based on the single-core architecture provided in this embodiment initializes and configures the display device and hardware device based on the single-core architecture respectively, ensures that the hardware device can work as expected and provide a stable operating environment for upper-layer applications, and ensures that the display device achieves high-quality display effects in the single-core architecture to meet the needs of application scenarios, and then controls the hardware device to collect data to be displayed, processes the data to be displayed, and obtains target display data. Finally, according to the data type of the target display data, the display device is controlled to display the target display data accordingly, and the single-core architecture is used to realize data display, reduce resource waste, and has low coupling requirements and is easy to implement.

[0092] In this embodiment, a data display method based on a single-core architecture is provided, which can be used for electronic devices or computer devices based on a single-core architecture, such as a single-core display, etc. Figure 4 is a flow chart of a data display method based on a single-core architecture according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0093] Step S401, initialize and configure the display device and hardware device based on the single-core architecture respectively, and control the hardware device to collect the data to be displayed. Figure 3 Step S301 of the illustrated embodiment will not be described in detail here.

[0094] Step S402: Process the data to be displayed to obtain target display data. Figure 3 Step S302 of the illustrated embodiment will not be described in detail here.

[0095] Step S403: controlling the display device to display the target display data accordingly according to the data type of the target display data.

[0096] Specifically, the above step S403 includes:

[0097] Step S4031, performing type analysis on the target display data to obtain a data type corresponding to the target display data; wherein the data type includes at least one of picture data, text data and curve data.

[0098] Specifically, the image drawing selection part involves the selection of data types, which is mainly responsible for drawing different images according to different needs and application scenarios. In this part, by optimizing related functions, the color transmission and filling process is accelerated to improve the efficiency and accuracy of image drawing.

[0099] Step S4032: Control the display device to display the target display data according to the data display mode corresponding to the data type.

[0100] In some optional implementations, when the data type is picture data, the above step S4032 includes:

[0101] Step a1, parse the image data to obtain the image height and image width.

[0102] Exemplarily, the width and height of the image are parsed from the incoming image data.

[0103] Step a2, performing pixel traversal based on the image height and image width, performing data conversion on each pixel in the image data, and determining the pixel address and color information corresponding to each pixel.

[0104] Specifically, the pixel address corresponding to each pixel in the display buffer of the display device is calculated based on the starting coordinates of the pixel and the offset of each pixel in the picture data. The three primary color information of each pixel is extracted to obtain the color information corresponding to each pixel.

[0105] For example, two layers of nested loops are established based on the image height and image width to traverse each pixel of the image and convert the original data format and layout into a data format and layout suitable for LCD screen display. The offset of the current pixel in the image is calculated and combined with the starting coordinates to obtain the final pixel address in the graphics display buffer, and the color data is written into the graphics display buffer.

[0106] Step a3, controlling the display device to draw a picture based on the pixel data obtained after the data conversion and according to the pixel address and color information corresponding to each pixel.

[0107] Exemplarily, it is determined whether the entire image has been traversed. If the traversal is completed, the image is finally drawn according to the pixel address and color information corresponding to each pixel.

[0108] In an embodiment of the present invention, by traversing each pixel of the image data, performing data conversion on the pixels, and determining the pixel address and color information of each pixel, it is convenient for the display device to draw the image, accelerate the color transmission and filling process, and improve the efficiency and accuracy of image drawing.

[0109] In some optional implementations, when the data type is text data, the above step S4032 includes:

[0110] Step b1, parse the text data to obtain the text height and text width.

[0111] Exemplarily, the width and height of the text are parsed from the incoming text information.

[0112] Step b2, performing pixel traversal based on the text height and text width, determining the pixel address and color information corresponding to each pixel, and determining the mixed color component corresponding to each pixel based on the color information and the mixed color set by the user.

[0113] Specifically, according to the starting coordinates of the pixel and the offset of each pixel in the picture data, the pixel address corresponding to each pixel in the display buffer of the display device is calculated; and the three primary color information of each pixel is extracted to obtain the color information corresponding to each pixel.

[0114] Exemplarily, each pixel of the character image is traversed through two nested loops, and its pixel address in the graphics display buffer is calculated according to its position and starting coordinates in the character image. Then, the color information of the pixel is extracted from the character image data. Next, the mixed R, G, and B color components are calculated using the color information and the specified mixed color.

[0115] Step b3, controlling the display device to draw text based on the text transparency set by the user and according to the pixel address corresponding to each pixel and the mixed color component.

[0116] Exemplarily, considering the transparency of the character image, if the mixed color component meets certain conditions (such as non-zero or significant enough), the color value of the pixel is written to the corresponding address in the graphics display buffer, and finally the display device is controlled to draw the text.

[0117] The embodiment of the present invention traverses each pixel of the text data to determine the pixel address and mixed color component corresponding to each pixel, so as to facilitate the display device to draw the text; and adopts transparency adjustment technology to ensure that the text is displayed with appropriate transparency, which is clear and readable, and does not cause abrupt visual conflict with the background image.

[0118] In some optional implementations, when the data type is curve data, the above step S4032 includes:

[0119] Step c1, performing coordinate conversion on the curve data to obtain pixel coordinates corresponding to the curve data.

[0120] Exemplarily, the data transmitted by the sensor is first stored in a buffer, and then the mathematical coordinates of the curve are converted into pixel coordinates on the screen based on transformations such as scaling and translation.

[0121] Step c2, fitting the curve data based on the pixel coordinates to obtain a plurality of continuous coordinate points.

[0122] Exemplarily, a mathematical algorithm (such as the least squares method) is used to fit the pixel coordinate data to obtain a series of continuous coordinate points.

[0123] Step c3, smoothing multiple continuous coordinate points, and drawing a curve according to the curve color set by the user.

[0124] Exemplarily, a plurality of continuous coordinate points are smoothed to reduce jagged edges or unnecessary fluctuations, and display effects such as gradient colors are added to the curve to enhance the visual experience and perform curve drawing.

[0125] In the embodiment of the present invention, the curve data drawing quality is improved by performing coordinate conversion, data fitting, smoothing processing and color addition on the curve data.

[0126] The data display method based on a single-core architecture provided in this embodiment initializes and configures the display device and hardware device based on the single-core architecture respectively, ensures that the hardware device can work as expected, and ensures that the display device achieves high-quality display effects in the single-core architecture, and then controls the hardware device to collect data to be displayed, processes the data to be displayed, and obtains target display data. Finally, according to the data display method of picture data, text data, and curve data, the image is quickly drawn, and the single-core architecture is used to realize data display, thereby reducing resource waste, and the coupling degree requirement is low, which is easy to implement.

[0127] The following takes a color screen as an example, and describes in detail the data display method based on a single-core architecture of the present invention in combination with a specific application example. Figure 5 As shown, the method comprises the following steps:

[0128] Step 1: Initialize the underlying layer.

[0129] The bottom-level initialization part mainly involves the initialization configuration of hardware devices to ensure that the hardware devices can work as expected and provide a stable operating environment for upper-level applications, including but not limited to configuring the system's clock source and clock divider to ensure that each module such as the CPU and peripherals can run at the correct clock frequency; configuring the input and output modes, pull-up / pull-down resistors, interrupt triggering methods, etc. of GPIO pins to meet the connection requirements of different peripherals or sensors; configuring the parameters of communication interfaces such as SPI and UART, and enabling these interfaces to communicate with peripherals; configuring interrupt priorities, enabling or disabling specific interrupt sources to ensure that the system can respond to key events in a timely manner; configuring the sensor's operating mode, sampling rate, range and other parameters; configuring and initializing system state variables to record the current state of the system.

[0130] Step 2, color screen display configuration.

[0131] The color screen display configuration part is mainly responsible for handling all display tasks related to the color screen, including setting the display resolution according to the physical resolution of the color screen; selecting the appropriate color depth and refresh rate according to the hardware support and system requirements of the color screen; configuring the corresponding communication interface parameters according to the connection method between the color screen and the processor, including setting the communication rate, clock polarity and phase, etc., to ensure that the processor can correctly send data and instructions to the color screen; setting the display mode, pixel format, and scanning direction of the color screen according to application requirements, and allocating enough memory space for the color screen display as a display buffer for storing images or video frame data to be displayed. Through the configuration and optimization of the above steps, it can be ensured that the color screen can achieve high-quality display effects in a single-core architecture system to meet the needs of application scenarios.

[0132] Step 3, image drawing selection.

[0133] The image drawing selection part is mainly responsible for drawing different images according to different needs and application scenarios. In this part, the efficiency and accuracy of image drawing are improved by optimizing related functions, accelerating the color transmission and filling process, as follows:

[0134] (1) Picture drawing: This function can draw pictures on the color screen and also supports editing and adjusting the drawn pictures, such as adjusting the display position.

[0135] like Figure 6 As shown, first the width and height of the image are parsed from the incoming image data, and then two layers of nested loops are used to traverse each pixel of the image, converting the original data format and layout into a data format and layout suitable for LCD screen display, and by calculating the offset of the current pixel in the image and combining it with the starting coordinates, the final address in the graphics display buffer is obtained, the color data is written into the graphics display buffer, and then it is determined whether the entire image has been traversed, and finally the image is drawn.

[0136] (2) Text drawing: This function supports drawing text information such as numbers and Chinese characters on the color screen. Since text content usually needs to be superimposed on the picture, in order not to affect the display effect, transparency adjustment technology is used to ensure that the text is displayed with appropriate transparency, which is clear and readable without causing abrupt visual conflict with the background picture.

[0137] like Figure 7As shown: First, parse the width and height of the text from the incoming text information, then traverse each pixel of the character image through two nested loops, and calculate the address in the graphics display buffer according to its position and starting coordinates in the character image. Then, extract the color information of the pixel from the character image data. Next, use the color information and the specified mixed color to calculate the mixed R, G, and B components, considering the transparency of the character image. If the mixed color component meets certain conditions (such as non-zero or significant enough), the color value of the pixel is written to the corresponding address in the graphics display buffer, and finally the image is drawn.

[0138] (3) Curve drawing: This function supports drawing curves on the color screen, which is convenient for intuitively displaying the changing trend of data over time or other variables.

[0139] like Figure 8 As shown in the figure, the data transmitted by the sensor is first stored in the buffer, and then the mathematical coordinates of the curve are converted into pixel coordinates on the screen based on transformations such as scaling and translation. Then, a mathematical algorithm (such as the least squares method) is used to fit the data to obtain a series of continuous coordinate points, which are smoothed to reduce jagged edges or unnecessary fluctuations, and to provide display effects such as gradient colors for the curve to enhance the visual experience, and finally the image is drawn.

[0140] In this embodiment, a data display device based on a single-core architecture is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0141] This embodiment provides a data display device based on a single-core architecture, such as Fig. 9 As shown, including:

[0142] The first processing module 901 is used to initialize and configure the display device and hardware device based on the single-core architecture respectively, and control the hardware device to collect data to be displayed;

[0143] The second processing module 902 is used to process the data to be displayed to obtain target display data;

[0144] The third processing module 903 is used to control the display device to display the target display data accordingly according to the data type of the target display data.

[0145] In some optional implementations, the first processing module 901 is further configured to:

[0146] Configure clock parameters, general input / output port parameters, communication interface parameters, and sensor parameters of hardware devices based on single-core architecture;

[0147] Among them, the clock parameters include at least one of the clock source and the clock division, the general input / output port parameters include at least one of the input / output mode, the pull-up / pull-down resistor and the interrupt trigger mode, the communication interface parameters of the hardware device include at least one of the synchronous serial communication parameters and the asynchronous serial communication parameters, and the sensor parameters include at least one of the sampling rate and the range.

[0148] In some optional implementations, the first processing module 901 is further configured to:

[0149] Configure display parameters, communication interface parameters, and storage parameters of a display device based on a single-core architecture;

[0150] Among them, the display parameters include at least one of display resolution, color depth, refresh rate, display mode, pixel format and scanning mode, the communication interface parameters of the display device include at least one of communication rate, clock polarity and clock phase, and the storage parameters include the memory address of the display buffer.

[0151] In some optional implementations, the third processing module 903 is further configured to:

[0152] Performing type analysis on the target display data to obtain a data type corresponding to the target display data; wherein the data type includes at least one of picture data, text data, and curve data;

[0153] The display device is controlled to display the target display data in a data display mode corresponding to the data type.

[0154] In some optional implementations, when the data type is picture data, the third processing module 903 is further configured to:

[0155] Parse the image data to obtain the image height and image width;

[0156] Perform pixel traversal based on the image height and image width, perform data conversion on each pixel in the image data, and determine the pixel address and color information corresponding to each pixel;

[0157] The display device is controlled to draw a picture based on the pixel data obtained after the data conversion and according to the pixel address and color information corresponding to each pixel.

[0158] In some optional implementations, when the data type is text data, the third processing module 903 is further configured to:

[0159] Parse the text data to obtain the text height and text width;

[0160] Perform pixel traversal based on the text height and text width to determine the pixel address and color information corresponding to each pixel, and determine the mixed color component corresponding to each pixel based on the color information and the mixed color set by the user;

[0161] The display device is controlled to draw text based on the text transparency set by the user and according to the pixel address corresponding to each pixel and the mixed color component.

[0162] In some optional implementations, the third processing module 903 is further configured to:

[0163] Calculate the pixel address corresponding to each pixel in the display buffer of the display device according to the starting coordinates of the pixel and the offset of each pixel in the image data;

[0164] The three primary color information of each pixel is extracted to obtain the color information corresponding to each pixel.

[0165] In some optional implementations, when the data type is curve data, the third processing module 903 is further configured to:

[0166] Perform coordinate conversion on the curve data to obtain pixel coordinates corresponding to the curve data;

[0167] Fitting the curve data based on the pixel coordinates to obtain multiple continuous coordinate points;

[0168] Smooth multiple continuous coordinate points and draw curves according to the curve colors set by the user.

[0169] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0170] The data display device based on a single-core architecture in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0171] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0172] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0173] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A data display method based on a single-core architecture, characterized in that: The method comprises: Initializing and configuring the display device and hardware device based on the single-core architecture respectively, and controlling the hardware device to collect data to be displayed; Processing the data to be displayed to obtain target display data; According to the data type of the target display data, the display device is controlled to display the target display data accordingly.

2. The method according to claim 1, characterized in that The controlling the display device to display the target display data accordingly according to the data type of the target display data comprises: Performing type analysis on the target display data to obtain a data type corresponding to the target display data; wherein the data type includes at least one of picture data, text data, and curve data; The display device is controlled to display the target display data in a data display mode corresponding to the data type.

3. The method according to claim 2, characterized in that When the data type is picture data, controlling the display device to display the target display data according to the data display mode corresponding to the data type includes: Parse the image data to obtain the image height and image width; Perform pixel traversal based on the image height and image width, perform data conversion on each pixel in the image data, and determine the pixel address and color information corresponding to each pixel; The display device is controlled to draw a picture based on the pixel data obtained after the data conversion and according to the pixel address and color information corresponding to each pixel.

4. The method according to claim 2, characterized in that: When the data type is text data, controlling the display device to display the target display data according to the data display mode corresponding to the data type includes: Parse the text data to obtain the text height and text width; Perform pixel traversal based on the text height and text width to determine the pixel address and color information corresponding to each pixel, and determine the mixed color component corresponding to each pixel according to the color information and the mixed color set by the user; The display device is controlled to draw text based on the text transparency set by the user and according to the pixel address corresponding to each pixel and the mixed color component.

5. The method according to claim 2, characterized in that: When the data type is curve data, controlling the display device to display the target display data according to the data display mode corresponding to the data type includes: Perform coordinate conversion on the curve data to obtain pixel coordinates corresponding to the curve data; Fitting the curve data based on the pixel coordinates to obtain a plurality of continuous coordinate points; The plurality of continuous coordinate points are smoothed, and a curve is drawn according to the curve color set by the user.

6. The method according to claim 3 or 4, characterized in that: The step of determining the pixel address and color information corresponding to each pixel includes: Calculate the pixel address corresponding to each pixel in the display buffer of the display device according to the starting coordinates of the pixel and the offset of each pixel in the image data; The three primary color information of each pixel is extracted to obtain the color information corresponding to each pixel.

7. The method according to any one of claims 1 to 5, characterized in that The initialization configuration of the hardware device based on the single-core architecture includes: Configure clock parameters, general input / output port parameters, communication interface parameters, and sensor parameters of hardware devices based on single-core architecture; Among them, the clock parameters include at least one of the clock source and the clock division, the general input / output port parameters include at least one of the input / output mode, the pull-up / pull-down resistor and the interrupt trigger mode, the communication interface parameters of the hardware device include at least one of the synchronous serial communication parameters and the asynchronous serial communication parameters, and the sensor parameters include at least one of the sampling rate and the range.

8. The method according to any one of claims 1 to 5, characterized in that The initialization configuration of the display device based on the single-core architecture includes: Configure display parameters, communication interface parameters, and storage parameters of a display device based on a single-core architecture; Among them, the display parameters include at least one of display resolution, color depth, refresh rate, display mode, pixel format and scanning mode, the communication interface parameters of the display device include at least one of communication rate, clock polarity and clock phase, and the storage parameters include the memory address of the display buffer.

9. A data display device based on a single-core architecture, characterized in that: The device comprises: A first processing module is used to initialize and configure the display device and the hardware device based on the single-core architecture respectively, and control the hardware device to collect data to be displayed; A second processing module, used for processing the data to be displayed to obtain target display data; The third processing module is used to control the display device to display the target display data accordingly according to the data type of the target display data.

10. A data display system based on a single-core architecture, characterized in that: include: bottom layer and display layer; The bottom layer is used to initialize and configure the hardware device based on the single-core architecture, and control the hardware device to collect data to be displayed; Processing the data to be displayed to obtain target display data; The display layer is used to initialize and configure a display device based on a single-core architecture; and to control the display device to display the target display data accordingly according to the data type of the target display data.

11. The system according to claim 10, characterized in that The display device is a color display.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data display method based on a single-core architecture according to any one of claims 1 to 8.

13. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the data display method based on a single-core architecture according to any one of claims 1 to 8.