Image display method, apparatus and electronic device

CN116820368BActive Publication Date: 2026-09-04CONTEC MEDICAL SYST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210287670.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2026-09-04
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

[0004]本发明提供一种图像显示方法、装置和电子设备,用以解决现有技术中有多个显示区域要显示同一时刻数据时,不同显示区域的数据逐个更新耗费的时间较长,有时出现卡顿现象,用户体验较差的缺陷

Benefits of technology

[0058] The image display method, apparatus, and electronic device provided by this invention, because the size of the memory canvas is the same as the size of the display canvas, the memory canvas itself can contain the currently drawn area that needs to be redrawn during the current cycle update. By synchronously drawing the currently drawn area of ​​the previous cycle image in the memory canvas, the current cycle image can be obtained, and then the current cycle image is displayed based on the display canvas. Compared with the prior art, which sequentially draws and displays updated data in each display area of ​​the display canvas, this avoids the stuttering phenomenon caused by excessive time consumption, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116820368B_ABST
    Figure CN116820368B_ABST
Patent Text Reader

Abstract

The application provides an image display method, device and electronic equipment, wherein the method comprises: acquiring update data of a current period; determining a current drawing area based on the current period; drawing the current drawing area in a previous period image in a memory canvas based on the update data; determining a current period image based on the memory canvas after drawing is completed; and displaying the current period image based on a display canvas, wherein the memory canvas is consistent in size with the display canvas. The image display method, device and electronic equipment provided by the embodiment of the application avoid the lag phenomenon caused by too long time consumption by sequentially drawing and displaying the update data in each display area of the display canvas compared with the prior art, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more particularly to an image display method, apparatus, and electronic device. Background Technology

[0002] With the rapid development of the internet, various electronic devices are widely used. In daily life and work, users often need to observe different categories of data in real time on multiple display areas of the electronic device's screen to meet their reference needs for multiple categories of data.

[0003] In the Android system's view display mechanism, one display area is locked at a time. When multiple display areas in a view need to display data at the same time, updating the data in different display areas one by one takes a long time, sometimes resulting in lag and a poor user experience. Summary of the Invention

[0004] This invention provides an image display method, apparatus, and electronic device to solve the shortcomings of existing technologies where multiple display areas need to display data at the same time, resulting in long update times for data in different display areas, occasional stuttering, and poor user experience.

[0005] This invention provides an image display method, comprising:

[0006] Get the updated data for the current period;

[0007] The current drawing area is determined based on the current cycle;

[0008] Based on the updated data, the current drawing area in the previous period image is drawn in the memory canvas;

[0009] Based on the completed memory canvas, determine the current period image;

[0010] The current period image is displayed on a display canvas, and the memory canvas has the same size as the display canvas.

[0011] According to an image display method provided by the present invention, the step of drawing the current drawing area in the memory canvas based on the updated data includes:

[0012] In the memory canvas that was drawn in the previous cycle, the image content of the currently drawn area is erased. The memory canvas that was drawn in the previous cycle carries the image content of the image from the previous cycle.

[0013] The image content of the updated data is drawn on the current drawing area of ​​the memory canvas after erasure.

[0014] According to an image display method provided by the present invention, the step of drawing the image content of the updated data at the current drawing area of ​​the memory canvas after erasure includes:

[0015] The image content of each type of data in the updated data is drawn on the target sub-region of the memory canvas after erasure, and the target sub-region corresponds to each type of data in the current drawing area.

[0016] According to an image display method provided by the present invention, determining the current drawing area based on the current period includes:

[0017] Based on the current period and the data types of various types of data in the updated data, the target sub-regions corresponding to each type of data are determined, and the target sub-regions corresponding to each type of data constitute the current drawing area.

[0018] According to an image display method provided by the present invention, the step of determining the current periodic image based on the completed memory canvas further includes:

[0019] Based on the current cycle, determine the identification area of ​​the previous cycle and the identification area of ​​the current cycle;

[0020] Erase the update flag of the previous cycle flag region in the memory canvas, and draw an update flag in the current cycle flag region of the memory canvas.

[0021] According to an image display method provided by the present invention, the currently drawn area is located within the previous cycle identifier area;

[0022] The current cycle identifier region is located outside the current drawing region, and the next drawing region determined based on the next cycle is located within the current cycle identifier region.

[0023] According to an image display method provided by the present invention, the update identifier is a rectangular bar, the width of which is greater than or equal to the width of the currently drawn area.

[0024] According to an image display method provided by the present invention, the step of displaying the current period image based on a display canvas includes:

[0025] Lock the display canvas;

[0026] Update the current periodic image within the display canvas;

[0027] Unlock the display canvas to show the current cycle image.

[0028] According to an image display method provided by the present invention, the step of obtaining the update data for the current period includes:

[0029] Data is continuously received within the current period, and the received data is cached until the end of the current period. The cached data is then determined as the updated data for the current period.

[0030] The present invention also provides an image display device, comprising:

[0031] The data acquisition module is used to acquire updated data for the current period.

[0032] The region determination module is used to determine the currently drawn region based on the current cycle.

[0033] An image drawing module is used to draw the current drawing area in the memory canvas of the previous period image based on the updated data.

[0034] The image determination module is used to determine the current period image based on the completed memory canvas;

[0035] An image display module is used to display the current period image based on a display canvas, wherein the memory canvas has the same size as the display canvas.

[0036] According to the image display device provided by the present invention, the drawing module includes:

[0037] An image erasing unit is used to erase the image content of the currently drawn area in the memory canvas that was drawn in the previous cycle, wherein the memory canvas that was drawn in the previous cycle carries the image content of the image in the previous cycle.

[0038] An image drawing unit is used to draw the image content of the updated data on the current drawing area of ​​the memory canvas after erasure.

[0039] According to the image display apparatus provided by the present invention, the image rendering unit includes:

[0040] The image drawing subunit is used to draw the image content of various types of data in the updated data at the target sub-regions corresponding to each type of data in the current drawing area of ​​the memory canvas after erasure.

[0041] According to the image display device provided by the present invention, the region determination module includes:

[0042] The sub-region determination unit is used to determine the target sub-regions corresponding to the various types of data based on the current period and the data types of the updated data. The target sub-regions corresponding to the various types of data constitute the current drawing area.

[0043] The image display device provided by the present invention further includes an update identifier drawing module, the update identifier drawing module comprising:

[0044] The identification area determination unit is used to determine the identification area of ​​the previous period and the identification area of ​​the current period based on the current period;

[0045] An update marker drawing unit is used to erase the update marker of the previous cycle marker region in the memory canvas and draw an update marker at the current cycle marker region in the memory canvas.

[0046] According to the image display device provided by the present invention, the currently drawn area is located within the previous cycle identifier area;

[0047] The current cycle identifier region is located outside the current drawing region, and the next drawing region determined based on the next cycle is located within the current cycle identifier region.

[0048] According to the image display device provided by the present invention, the update identifier is a rectangular bar, the width of which is greater than or equal to the width of the currently drawn area.

[0049] According to the image display device provided by the present invention, the image display module includes:

[0050] Display canvas locking unit, used to lock the display canvas;

[0051] An image update unit is used to update the current period image within the display canvas;

[0052] An image display unit is used to unlock the display canvas to display the current period image.

[0053] According to the image display device provided by the present invention, the data acquisition module includes:

[0054] The data update determination unit is used to continuously receive data within the current period, cache the received data until the end of the current period, and determine the cached data as the update data for the current period.

[0055] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described image display methods.

[0056] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described image display methods.

[0057] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described image display methods.

[0058] The image display method, apparatus, and electronic device provided by this invention, because the size of the memory canvas is the same as the size of the display canvas, the memory canvas itself can contain the currently drawn area that needs to be redrawn during the current cycle update. By synchronously drawing the currently drawn area of ​​the previous cycle image in the memory canvas, the current cycle image can be obtained, and then the current cycle image is displayed based on the display canvas. Compared with the prior art, which sequentially draws and displays updated data in each display area of ​​the display canvas, this avoids the stuttering phenomenon caused by excessive time consumption, thereby improving the user experience. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0060] Figure 1 This is one of the flowcharts illustrating the image display method provided by the present invention;

[0061] Figure 2 This is a schematic diagram of the image display screen provided by the present invention;

[0062] Figure 3 This is a flowchart illustrating step 130 in the image display method provided by the present invention;

[0063] Figure 4 This is a flowchart illustrating the updated identifier drawing method provided by the present invention;

[0064] Figure 5 This is a schematic diagram illustrating the update process of the update identifier provided by the present invention;

[0065] Figure 6 This is a schematic diagram of a display canvas with an update indicator provided by the present invention;

[0066] Figure 7 This is a flowchart illustrating step 150 in the image display method provided by the present invention;

[0067] Figure 8 This is the second flowchart illustrating the image display method provided by the present invention;

[0068] Figure 9 This is a schematic diagram of the structure of the image display device provided by the present invention;

[0069] Figure 10 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0071] Electrocardiographs, used to measure, acquire, display, and record patients' electrocardiogram signals, sometimes need to display the data from the chest leads and limb leads in different areas of the same display canvas to facilitate clinical judgment by users. For example, the left side displays the data from the chest leads, and the right side displays the data from the limb leads.

[0072] However, in the Android system's View display mechanism, only one display area can be locked at a time. For example: first, display area 1 is locked, data from display area 1 is drawn on the canvas to obtain image 1, and then the drawn image 1 is displayed through the View; then display area 2 is locked, data from display area 2 is drawn on the canvas to obtain image 2, and then the drawn image 2 is displayed through the View. And so on. When multiple display areas in a View need to display data at the same time, updating the data in different display areas one by one takes a long time, sometimes resulting in lag and a poor user experience.

[0073] To address the aforementioned issues, embodiments of the present invention provide an image display method applicable to any terminal device or server based on the Android system that requires data display.

[0074] For ease of understanding, this embodiment of the invention uses an electrocardiograph (ECG) machine as an example to describe in detail the image display method provided by this embodiment. It should be understood that the terminal device executing this method is not limited to an ECG machine.

[0075] Figure 1 This is one of the flowcharts illustrating the image display method provided by the present invention, such as... Figure 1 As shown, the method includes:

[0076] Step 110: Obtain the update data for the current period.

[0077] Specifically, the period refers to the update frequency of the image displayed on the device's display canvas. The image content is updated once every period. For example, if a period indicates a duration of 3 milliseconds, then the image content on the display canvas is updated every 3 milliseconds. Here, the duration of the period can be set according to actual conditions, and this embodiment of the invention does not impose a specific limitation on it.

[0078] The update data for the current period refers to the data collected within the current period that needs to be updated. This can be obtained through data acquisition devices, such as electrocardiogram (ECG) data acquisition devices.

[0079] Updated data can include data categories and corresponding values ​​for each data category. There can be one or more data categories. When the data acquisition device has multiple signal acquisition channels, the updated data will have multiple data categories. For example, a 12-channel electrocardiograph (ECG) will have 12 different data categories for its updated data.

[0080] Step 120: Determine the current drawing area based on the current cycle.

[0081] Specifically, Figure 2 This is a schematic diagram of the image display screen provided by the present invention, such as... Figure 2 As shown, the display canvas is located in the lower right corner of the screen, and its size can be flexibly set according to user needs. The display canvas contains three display areas, each capable of displaying multiple periods of update data. The specific size can be determined based on the width of the display area and the width of the corresponding image content. A wider display area can display more update periods, while a narrower area can display fewer. Within each display area, the width represents time, and the height represents numerical values. The display canvas can then display an image derived from the collected data.

[0082] For example, display area 3 can be set to display updated data for 15 cycles. The data update direction is as follows: when the operator faces the display canvas, the image updates sequentially from left to right as seen by the human eye. Since the electrocardiograph continuously receives and displays data, after 15 cycles of data updates, it can be understood that the data has completed one cycle in display area 3. The 16th cycle begins a new cycle, with the updated data still updating sequentially from left to right until the data acquisition ends.

[0083] For example, display area 1 can display update data for 7 cycles, and a new cycle begins from the 8th cycle; display area 2 can display update data for 6 cycles, and a new cycle begins from the 7th cycle.

[0084] Understandably, for each display area, updating data completes one cycle from left to right, and after one cycle ends, the next cycle begins from left to right.

[0085] The current drawing area is the region where the image needs to be drawn in the current cycle. The image is updated once every cycle. The dirty rectangle algorithm can be used to calculate the area of ​​the image that has changed compared to the previous cycle, which is the redraw area, or the current drawing area.

[0086] The current drawing area can specifically include the current drawing area corresponding to each display area. In other words, the current drawing area is the collection of the current drawing areas corresponding to each display area.

[0087] Furthermore, such as Figure 2 As shown, each display area can be divided into multiple target sub-regions, and the number of target sub-regions in each display area is the same as the number of update data cycles that the display area can display. It can be understood that for any given display area, each target sub-region can display an update data image for one cycle.

[0088] For example, if the current cycle is the 23rd cycle, then the current drawing area corresponding to display area 1 is target sub-region 2; the current drawing area corresponding to display area 2 is target sub-region 5; and the current drawing area corresponding to display area 3 is target sub-region 8.

[0089] Therefore, it can be determined that the current drawing area of ​​the display canvas includes target sub-region 2 in display area 1, target sub-region 5 in display area 2, and target sub-region 8 in display area 3.

[0090] If there is only one display area in the display canvas, then the currently drawn area is the target sub-area corresponding to that display area.

[0091] It should be noted that the position and size of each target sub-region contained in each display area can be preset, and the current drawing area can be determined according to the current data update cycle.

[0092] Step 130: Based on the updated data, draw the current drawing area in the memory canvas from the previous period's image.

[0093] Specifically, at the beginning of the image display method execution, a canvas can be created in memory, i.e., a memory canvas. Unlike the display canvas, which is used for display, the memory canvas is invisible to the user; updates are only performed in memory. To facilitate the simultaneous rendering and updating of all updated data within a single cycle, the size of the memory canvas is the same as the size of the display canvas.

[0094] like Figure 2 As shown, the size of the display canvas can be determined based on the size of the display screen of the image display device. If full-screen display is required, the size of the display canvas is the same as the size of the display screen, and correspondingly, the size of the memory canvas is also the same as the size of the display screen; if only the image needs to be displayed on the right half of the display screen, the size of the display canvas is half the size of the display screen, and correspondingly, the size of the memory canvas is also half the size of the display screen.

[0095] Once the memory canvas is created, it can draw on the currently drawn area of ​​the previous image in the memory canvas based on the received updated data.

[0096] Here, the previous cycle image displays the previous cycle image shown on the canvas, which includes the images displayed in each display area.

[0097] Each drawing is based on the image from the previous cycle. For example, if the current cycle is cycle 23, the image drawn in cycle 22 is retained in the memory canvas, and cycle 23 is drawn based on the image from cycle 22. Furthermore, the image content of the drawing area in cycle 22, except for the currently drawn area, remains unchanged; only the image content corresponding to the updated data of cycle 23 is drawn in the currently drawn area determined in cycle 23.

[0098] Furthermore, if the current cycle belongs to the first loop cycle, and the display canvas is blank after initialization, the memory canvas is also blank, or only the borders and coordinate axes used to indicate the display area are initialized, then the current drawing area in the memory canvas is blank and has no image content. Drawing can then be performed directly at the current drawing area in the memory canvas. If the current cycle belongs to the second or subsequent loop cycles, then the current drawing area contains image content drawn in the previous cycle. The image content in the current drawing area can be erased first, and then drawing can be performed on the current drawing area from the previous cycle's image.

[0099] For example, for display area 3, one cycle can display 15 cycles of updated data, that is, the 1st to 15th cycles belong to the first cycle, and the 16th cycle and subsequent cycles belong to the second cycle and above.

[0100] During this process, since the size of the memory canvas is the same as the display canvas, any area that needs to be updated on the display canvas can be covered within the memory canvas. This means that all currently drawing areas that need to be updated and redrawn in the current cycle can be located in the memory canvas. As a result, all image content of the current cycle's update data can be drawn in the memory canvas at once, eliminating the need to lock and draw the display areas one by one on the display canvas. This transforms drawing one by one into parallel drawing of all image content within the current drawing area, greatly shortening the image content update and drawing time.

[0101] Step 140: Determine the current periodic image based on the completed memory canvas.

[0102] Specifically, once the drawing of the current drawing area in the previous image cycle is completed, a completed memory canvas is obtained. The current image cycle is then generated based on the image content in the memory canvas. For example, the image content in the memory canvas can be cached in a bitmap in memory to obtain the bitmap image corresponding to the current cycle.

[0103] Step 150: Display the current period image based on the display canvas, with the memory canvas having the same size as the display canvas.

[0104] Specifically, after obtaining the current period image, the current period image is displayed on the display canvas, thus realizing the image update for the current period.

[0105] Meanwhile, the data acquisition device continuously collects data. Once the updated data for the next cycle is obtained, it can draw in the memory canvas based on the updated data for the next cycle, update the image, and then display the image on the display canvas. This enables the drawing of updated data and the display of updated images for each cycle, thereby achieving dynamic changes in the image.

[0106] The image display method provided in this invention, since the size of the memory canvas is the same as the size of the display canvas, can contain the currently drawn area that needs to be redrawn during the current cycle update. By synchronously drawing the currently drawn area of ​​the previous cycle image in the memory canvas, the current cycle image can be obtained, and then the current cycle image is displayed based on the display canvas. Compared with the prior art, which sequentially draws and displays updated data in each display area of ​​the display canvas, this method avoids the stuttering caused by excessive time consumption, thereby improving the user experience.

[0107] Furthermore, each time an image is drawn, the image content in all display areas of the display canvas corresponding to the currently drawn area where the image changes can be drawn at once, which greatly reduces image drawing time and improves image display efficiency.

[0108] Based on the above embodiments, Figure 3 This is a flowchart illustrating step 130 of the image display method provided by the present invention, as shown below. Figure 3 As shown, step 130 specifically includes:

[0109] Step 131: In the memory canvas that was drawn in the previous cycle, erase the image content of the currently drawn area. The memory canvas that was drawn in the previous cycle carries the image content of the previous cycle.

[0110] Step 132: Draw the updated image content on the current drawing area of ​​the memory canvas after erasure.

[0111] Specifically, the memory canvas that is drawn in each cycle is not cleared, but the image content is retained in the memory canvas. Therefore, the image content of the previous cycle is still retained in the memory canvas that was drawn in the previous cycle.

[0112] Drawing in the current drawing area can be done directly on the memory canvas that was drawn in the previous cycle, which carries the image content of the previous cycle.

[0113] If the display device does not initialize the display canvas after startup, or if the current cycle is the second or higher cycle, the image content will still exist in the currently drawn area of ​​the image from the previous cycle.

[0114] Therefore, we can first erase the image content of the currently drawn area in the memory canvas that was drawn in the previous cycle, and then draw the image content with updated data in the current drawing area of ​​the memory canvas after erasure.

[0115] It is understandable that when there are multiple display areas in the display canvas, the image content on each target sub-area corresponding to the multiple display areas is erased synchronously, and then drawn synchronously based on the updated data.

[0116] The method provided in this embodiment of the invention first erases the image content of the current drawing area of ​​the memory canvas that was drawn in the previous cycle, and then draws the image content of the updated data on the current drawing area of ​​the memory canvas after erasure, thereby realizing the image drawing of the current drawing area.

[0117] Based on any of the above embodiments, step 132 specifically includes:

[0118] The image content of each type of data in the updated data is drawn at the target sub-region. The target sub-region is the target sub-region of the memory canvas after the target sub-region is erased. The target sub-region corresponds to each type of data in the current drawing area.

[0119] Specifically, when the updated data includes multiple categories of data, the target display area corresponding to each category of data can be determined first. Taking electrocardiogram (ECG) as an example, the updated data may include chest lead data and limb lead data. To facilitate clinical interpretation, chest lead data can be displayed in display area 1, and limb lead data can be displayed in display area 2.

[0120] The target sub-regions here refer to the target sub-regions corresponding to each target display area. The target sub-regions corresponding to different types of data can be determined based on the target display areas corresponding to each type of data. For example, the target sub-region corresponding to chest lead data is the target sub-region corresponding to display area 1, and the target sub-region corresponding to limb lead data is the target sub-region corresponding to display area 2.

[0121] The target sub-regions corresponding to various types of data in the current drawing area are the target sub-regions that need to be redrawn in the current period image compared to the previous period image.

[0122] Once the target sub-region is determined, the image content of each type of data in the updated data can be drawn in the target sub-region corresponding to each type of data in the current drawing area of ​​the memory canvas after erasure.

[0123] It is understandable that the image content of various types of data here is drawn synchronously in the memory canvas. Compared with locking the display area sequentially and then drawing at the target sub-area of ​​the display area, the image content of all target sub-areas in this embodiment of the invention can be drawn at once, avoiding the complicated process of locking a display area-drawing-unlocking and then locking the next display area, saving drawing time and thus avoiding display lag.

[0124] The method provided in this invention synchronously renders the image content of various types of data at their respective corresponding target sub-regions, thereby enabling the display of different types of data in separate regions while reducing lag and improving user experience.

[0125] Based on any of the above embodiments, step 120 specifically includes:

[0126] Based on the current cycle and the data types of various types of data in the updated data, the target sub-regions corresponding to each type of data are determined, and the target sub-regions corresponding to each type of data constitute the current drawing area.

[0127] Specifically, the display area corresponding to the target sub-region can be determined based on the data type of each type of data in the updated data. For example, the target sub-region corresponding to the chest lead data is the target sub-region corresponding to display area 1, and the target sub-region corresponding to the limb lead data is the target sub-region corresponding to display area 2.

[0128] Furthermore, based on the current cycle and the number of update data cycles that can be displayed in each display area per revolution (i.e., the width of the display area), the target sub-regions corresponding to each type of data in each display area can be determined. For example, if the current cycle is the 23rd cycle, then the target sub-region corresponding to the chest lead data is target sub-region 2 in display area 1; the target sub-region corresponding to the limb lead data is target sub-region 5 in display area 2.

[0129] The position and size of each target sub-region within each display area can be preset.

[0130] For example, the target sub-region can be a rectangle. By setting the coordinates of each vertex of the rectangle representing target sub-region 1 on the display canvas, the position of target sub-region 1 can be determined. Then, based on the image content corresponding to the updated data, the position of the next target sub-region is determined. For example, if the width of the image content corresponding to the updated data in a single cycle is 5 pixels, then target sub-region 2 will be moved 5 pixels to the right compared to target sub-region 1. The target sub-regions corresponding to various types of data constitute the current drawing area.

[0131] The method provided in this invention determines the target sub-regions corresponding to various types of data by updating the current period and data type of the data, thereby enabling the simultaneous drawing of various types of updated data and their simultaneous display according to the display areas corresponding to each type of data.

[0132] Based on any of the above embodiments Figure 4 This is a flowchart illustrating the updated identifier drawing method provided by the present invention, as shown below. Figure 4 As shown, the procedure before performing step 140 also includes:

[0133] Step 410: Based on the current cycle, determine the identification area of ​​the previous cycle and the identification area of ​​the current cycle;

[0134] Step 420: Erase the update marker of the previous cycle marker area in the memory canvas, and draw the update marker in the current cycle marker area in the memory canvas.

[0135] Specifically, before determining the current period image, an update marker can be drawn at the current period marker area in the memory canvas. This step can be performed before step 130, after step 130, or synchronously with step 130; this embodiment of the invention does not specifically limit this.

[0136] Update markers can be used to identify the location of image content being updated in the current period. Using update markers highlights the location of data that is about to be updated, allowing users to easily locate the updated data. The marker area is the area where the update marker is drawn; update markers can be drawn within this area.

[0137] For ease of understanding, this embodiment of the invention uses the example of a canvas containing only one display area to describe the update process of the update identifier. Figure 5 This is a schematic diagram of the update process of the update identifier provided by the present invention, as shown below. Figure 5 As shown in (1), (1) corresponds to the previous cycle image. The starting position on the left side of the previous cycle identifier area is the starting position for drawing the image content of the current cycle update data. The current cycle identifier area is obtained by moving the image content pixel of the previous cycle identifier area to the right by one cycle update data.

[0138] Upon receiving update data for the current period, the update marker for the previous period's marked area in the memory canvas can be erased after drawing is completed or simultaneously with the current drawing area in the previous period's image. Figure 5 As shown in (2) of the text.

[0139] After erasing the update marker of the previous period's marker region in the memory canvas, draw the update marker at the current period's marker region in the memory canvas, such as... Figure 5 As shown in (3) in the figure. Then, based on the completed memory canvas, the current periodic image is obtained.

[0140] Understandably, the image content of the updated data is drawn and updated in one cycle from left to right, and the update marker is also drawn and updated in one cycle from left to right accordingly. Furthermore, the position of the update marker in the current cycle image is shifted to the right by one cycle's worth of image content pixels compared to the position of the update marker in the previous cycle image. The update marker cycles from left to right, then back to right again.

[0141] Therefore, when displaying images drawn from the collected data, there is an update marker in each periodic image, and the update markers cycle from left to right. The human eye perceives the constantly updating images on the display canvas as a dynamic effect; thus, a dynamic display effect is achieved through the continuous updating of static images.

[0142] When there are multiple display areas on the display canvas, an update flag can be added to each display area.

[0143] The update identifier can be any shape, such as a heart or a rectangle. Furthermore, the width of the update identifier can be greater than or equal to the width of the image content corresponding to one update cycle of data, or it can be less than the width of the image content corresponding to one update cycle of data; this embodiment of the invention does not impose any limitation on this.

[0144] The method provided in this embodiment of the invention erases the update marker of the previous cycle marker area in the memory canvas and draws the update marker at the current cycle marker area in the memory canvas to form a current cycle image with the update marker, thereby realizing a dynamic display effect using a static image.

[0145] Based on any of the above embodiments, the currently drawn area is located within the previous cycle's identified area;

[0146] The current cycle identifier area is outside the current drawing area, and the next drawing area determined based on the next cycle is within the current cycle identifier area.

[0147] Specifically, such as Figure 5 As shown, the current drawing area is located within the previous cycle's marked area. The purpose is to ensure that the update marker of the previous cycle can obscure the current drawing area and hide the image content corresponding to the current drawing area, thus indicating to the user the location that will be updated next.

[0148] The current cycle marker area is located outside the current drawing area, while the next drawing area, determined based on the next cycle, is located within the current cycle marker area. The purpose is that the update marker of the current cycle cannot obscure the current drawing area, and the image content of the updated data of the current cycle needs to be displayed; at the same time, the update marker of the current cycle can obscure the next drawing area, which can prompt the user about the update position of the next cycle.

[0149] Based on any of the above embodiments, the updated identifier is a rectangle, and the width of the rectangle is greater than or equal to the width of the currently drawn area.

[0150] Specifically, Figure 6 This is a schematic diagram of a display canvas with an update indicator provided by the present invention, such as... Figure 6 As shown, the update identifier can be a rectangle, and the width of the rectangle is greater than or equal to the width of the currently drawn area.

[0151] For example, if each cycle can update data by 5 pixels, then the current drawing area is 5 pixels wide, and the width of the update marker can be set to 10 pixels. The position of the update marker in the current cycle image is 5 pixels to the right compared to its position in the previous cycle image. The update marker cycles from left to right, then back to right, which better highlights the data to be updated and provides a more dynamic display effect.

[0152] Based on any of the above embodiments Figure 7 This is a flowchart illustrating step 150 of the image display method provided by the present invention, as shown below. Figure 7 As shown, step 150 specifically includes:

[0153] Step 151: Lock the display canvas;

[0154] Step 152: Update the current periodic image within the display canvas;

[0155] Step 153: Unlock the display canvas to show the current cycle image.

[0156] Specifically, when the display canvas includes multiple display areas, existing technology first determines the width and height of the display canvas and directly draws images on it. The specific steps are: locking display area 1, drawing the corresponding updated data on the display canvas to obtain image 1, and then displaying the drawn image 1 through the view (display canvas); then locking display area 2, drawing the corresponding updated data on the display canvas to obtain image 2, and then displaying the drawn image 2 through the view. In other words, the images corresponding to each display area are drawn and displayed sequentially, which can lead to stuttering and negatively impact the user experience.

[0157] The method provided in this embodiment of the invention first determines the width and height of the memory canvas based on the display canvas, then synchronously draws the update data corresponding to each display area in the memory canvas, and generates the current period image based on the completed memory canvas.

[0158] Then the entire display canvas area is locked, meaning that each display area on the display canvas is locked.

[0159] Once the current cycle image is obtained and the display canvas is locked, the current cycle image can be updated within the display canvas by replacing the previous cycle image with the current cycle image. Finally, the display canvas is unlocked to display the current cycle image. Therefore, compared to the existing technology that requires performing a lock-draw-unlock process for multiple display areas on the display canvas each cycle, this invention only requires a single lock update to update the image content of all display areas on the display canvas, thus avoiding display stuttering and improving the user experience.

[0160] The method provided in this invention obtains the current period image by synchronously drawing updated data in a memory canvas, and then displays the image through a display canvas, thereby realizing the synchronous drawing and updating of updated data corresponding to each display area.

[0161] Based on any of the above embodiments, step 110 specifically includes:

[0162] Continuously receive data within the current period and cache the received data until the end of the current period, at which point the cached data is determined as the updated data for the current period.

[0163] Specifically, since the acquisition device continuously collects data, within the time period indicated by the current cycle, such as 3 milliseconds, the processor of the image display device can continuously receive the acquired data sent by the acquisition device and place the received data into a preset cache location in memory until the end of the current cycle. The end of the current cycle can be determined by the duration of the preset cycle. After the current cycle ends, the data cached in memory is determined as the updated data for the current cycle.

[0164] Furthermore, when data acquisition ends and the processor no longer receives the acquired data sent by the acquisition device, it can automatically release the preset cache space in memory to save memory space.

[0165] Based on any of the above embodiments, the multiple display areas included in the display canvas can be determined according to the display mode input by the user. For example, to facilitate clinical observation and judgment by the user, an electrocardiograph can be set with different display modes for the user to choose from. For example, a 6x2 display mode, i.e., a display mode with 6 rows and 2 columns and two display areas, and a 4x3 display mode can be set. Similarly, multiple display modes can be set, and multiple display areas can be set in each display mode.

[0166] Based on any of the above embodiments Figure 8 This is a second schematic flowchart of the image display method provided by the present invention, as shown below. Figure 8 As shown, the method includes:

[0167] (1) Continuously receive data within the current period and cache the received data until the end of the current period, and determine the cached data as the updated data for the current period;

[0168] (2) Based on the current cycle and the data types of various types of data in the updated data, determine the target sub-regions corresponding to various types of data, and the target sub-regions corresponding to various types of data constitute the current drawing area;

[0169] (3) Erase the image content of the current drawing area of ​​the memory canvas that was drawn in the previous cycle. The memory canvas that was drawn in the previous cycle carries the image content of the previous cycle.

[0170] (4) Draw the image content of each type of data in the updated data in the current drawing area of ​​the memory canvas after erasure, at the target sub-regions corresponding to each type of data;

[0171] (5) Based on the current cycle, determine the previous cycle identification area and the current cycle identification area; wherein, the current drawing area is located within the previous cycle identification area; the current cycle identification area is located outside the current drawing area, and the next drawing area determined based on the next cycle is located within the current cycle identification area;

[0172] (6) Erase the update marker of the previous cycle marker region in the memory canvas, and draw the update marker at the current cycle marker region in the memory canvas; wherein, the update marker can be a rectangular bar, and the width of the rectangular bar is greater than or equal to the width of the target sub-region;

[0173] (7) Determine the current periodic image based on the completed memory canvas;

[0174] (8) Lock the display canvas;

[0175] (9) Update the current cycle image within the display canvas;

[0176] (10) Unlock the display canvas to display the current cycle image, and determine whether an end command has been received. If received, end the image display; if not received, return to step (2) until the image display of all cycle update data is completed.

[0177] The method provided in this invention realizes the synchronous drawing and updating of update data in multiple display areas by drawing the image content of various types of data in the update data in the memory canvas. This saves display time and avoids the stuttering phenomenon caused by the long time required to draw and display the update data of multiple display areas in the current period, thus improving the user experience.

[0178] After the updated data for the current cycle is drawn, the update markers of the previous cycle's marker area in the memory canvas are erased. Then, an update marker is drawn in the current cycle's marker area in the memory canvas, resulting in an image that also includes the update markers. As the cycle updates, the update markers move from left to right, cycling sequentially. Therefore, what the human eye perceives as a continuously updating image on the display canvas is a dynamic effect, thus achieving a dynamic display effect using a static image.

[0179] The image display device provided by the present invention will be described below. The image display device described below can be referred to in correspondence with the image display method described above. Figure 9 This is a schematic diagram of the structure of the image display device provided by the present invention, as shown below. Figure 9 As shown, the device includes:

[0180] The data acquisition module 910 is used to acquire the updated data for the current period;

[0181] The region determination module 920 is used to determine the currently drawn region based on the current cycle;

[0182] The image drawing module 930 is used to draw the current drawing area in the memory canvas of the previous period image based on the updated data;

[0183] Image determination module 940 is used to determine the current period image based on the completed memory canvas;

[0184] The image display module 950 is used to display the current period image based on a display canvas, wherein the memory canvas has the same size as the display canvas.

[0185] The image display device provided in this invention, since the size of the memory canvas is the same as the size of the display canvas, obtains the current period image by synchronously drawing the currently drawn area of ​​the previous period image in the memory canvas, and then displays the current period image based on the display canvas. Compared with the prior art, which sequentially draws and displays updated data in each display area of ​​the display canvas, this avoids the stuttering phenomenon caused by excessive time consumption, thereby improving the user experience.

[0186] Based on the above embodiments, the image rendering module 930 includes:

[0187] An image erasing unit is used to erase the image content of the currently drawn area in the memory canvas that was drawn in the previous cycle, wherein the memory canvas that was drawn in the previous cycle carries the image content of the image in the previous cycle.

[0188] An image drawing unit is used to draw the image content of the updated data on the current drawing area of ​​the memory canvas after erasure.

[0189] Based on any of the above embodiments, the image rendering unit includes:

[0190] The image drawing subunit is used to draw the image content of various types of data in the updated data at the target sub-region, which is the target sub-region of the memory canvas after the target sub-region has been erased. The target sub-region corresponds to various types of data in the current drawing area.

[0191] Based on any of the above embodiments, the region determination module 920 includes:

[0192] The sub-region determination unit is used to determine the target sub-regions corresponding to the various types of data based on the current period and the data types of the updated data. The target sub-regions corresponding to the various types of data constitute the current drawing area.

[0193] Based on any of the above embodiments, the image display device provided in this embodiment of the invention further includes an updated identifier drawing module, the updated identifier drawing module comprising:

[0194] The identification area determination unit is used to determine the identification area of ​​the previous period and the identification area of ​​the current period based on the current period;

[0195] The update identifier drawing unit is used to erase the update identifier of the previous cycle identifier area in the memory canvas and draw the update identifier at the current cycle identifier area in the memory canvas.

[0196] Based on any of the above embodiments, the current drawing area is located within the previous cycle identifier area; the current cycle identifier area is located outside the current drawing area, and the next drawing area determined based on the next cycle is located within the current cycle identifier area.

[0197] Based on any of the above embodiments, the update identifier is a rectangular bar, and the width of the rectangular bar is greater than or equal to the width of the currently drawn area.

[0198] Based on any of the above embodiments, the image display module 950 includes:

[0199] Display canvas locking unit, used to lock the display canvas;

[0200] An image update unit is used to update the current period image within the display canvas;

[0201] An image display unit is used to unlock the display canvas to display the current period image.

[0202] Based on any of the above embodiments, the data acquisition module 910 includes:

[0203] The data update determination unit is used to continuously receive data within the current period, cache the received data until the end of the current period, and determine the cached data as the update data for the current period.

[0204] Figure 10 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 10 As shown, the electronic device may include a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040, wherein the processor 1010, the communications interface 1020, and the memory 1030 communicate with each other via the communication bus 1040. The processor 1010 can call logical instructions in the memory 1030 to execute an image display method, which includes: acquiring update data for the current period; determining the current drawing area based on the current period; drawing on the current drawing area in the previous period's image in a memory canvas based on the update data; determining the current period's image based on the drawn memory canvas; and displaying the current period's image on a display canvas, wherein the memory canvas and the display canvas have the same size.

[0205] Furthermore, the logical instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0206] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the image display method provided by the above methods. The method includes: acquiring update data for the current period; determining the current drawing area based on the current period; drawing the current drawing area in the previous period image in a memory canvas based on the update data; determining the current period image based on the completed memory canvas; and displaying the current period image on a display canvas, wherein the size of the memory canvas and the display canvas are the same.

[0207] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program is implemented to perform the image display method provided by the methods described above. The method includes: acquiring update data for the current period; determining a current drawing area based on the current period; drawing the current drawing area in a memory canvas of the previous period's image based on the update data; determining the current period's image based on the completed memory canvas; and displaying the current period's image on a display canvas, wherein the size of the memory canvas and the display canvas are the same.

[0208] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0209] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image display method, characterized in that, include: Get the updated data for the current period; The current drawing area is determined based on the current cycle; Based on the updated data, the current drawing area in the previous period image is drawn in the memory canvas; Based on the completed memory canvas, determine the current period image; The current period image is displayed on a display canvas, and the memory canvas has the same size as the display canvas. The current drawing area is determined based on the current cycle; Based on the updated data, drawing is performed on the current drawing area in the memory canvas from the previous image, including: Based on the current cycle and the data types of various types of data in the updated data, the target sub-regions corresponding to each type of data are determined, and the target sub-regions corresponding to each type of data constitute the current drawing area; The image content of each type of data in the updated data is drawn at the target sub-region of the previous cycle image in the memory canvas.

2. The image display method according to claim 1, characterized in that, The step of drawing the image content of various types of data in the updated data at the target sub-region of the previous period image in the memory canvas includes: In the memory canvas that was drawn in the previous cycle, the image content of the currently drawn area is erased. The memory canvas that was drawn in the previous cycle carries the image content of the image from the previous cycle. The image content of each type of data in the updated data is drawn on the target sub-region of the memory canvas after erasure.

3. The image display method according to claim 2, characterized in that, The target sub-regions correspond to various types of data in the currently drawn region.

4. The image display method according to claim 1, characterized in that, The process of determining the current periodic image based on the completed memory canvas also includes: Based on the current cycle, determine the identification area of ​​the previous cycle and the identification area of ​​the current cycle; Erase the update flag of the previous cycle flag region in the memory canvas, and draw an update flag in the current cycle flag region of the memory canvas.

5. The image display method according to claim 4, characterized in that, The currently drawn area is located within the previous cycle's identifier area; The current cycle identifier region is located outside the current drawing region, and the next drawing region determined based on the next cycle is located within the current cycle identifier region.

6. The image display method according to claim 4, characterized in that, The update identifier is a rectangular bar, and the width of the rectangular bar is greater than or equal to the width of the currently drawn area.

7. The image display method according to any one of claims 1 to 6, characterized in that, The step of obtaining the updated data for the current period includes: Data is continuously received within the current period, and the received data is cached until the end of the current period. The cached data is then determined as the updated data for the current period.

8. An image display device, characterized in that, include: The data acquisition module is used to acquire updated data for the current period. The region determination module is used to determine the currently drawn region based on the current cycle. An image drawing module is used to draw the current drawing area in the memory canvas of the previous period image based on the updated data. The image determination module is used to determine the current period image based on the completed memory canvas; An image display module is used to display the current period image based on a display canvas, wherein the memory canvas has the same size as the display canvas; The current drawing area is determined based on the current cycle; Based on the updated data, drawing is performed on the current drawing area in the memory canvas from the previous image, including: Based on the current cycle and the data types of various types of data in the updated data, the target sub-regions corresponding to the various types of data are determined, and the target sub-regions corresponding to the various types of data constitute the current drawing area; The image content of each type of data in the updated data is drawn at the target sub-region of the previous cycle image in the memory canvas.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the image display method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • A method and device for realizing waveform drawing

    CN109671127A