Image data playing method and device, equipment and medium
By buffering ultrasonic image data in the ultrasonic device and starting playback when specific conditions are met, the problem of uneven playback of image data and out-synchronization of multi-mode image refresh in the ultrasonic device is solved, and a smoother image display is achieved.
Patent Information
- Application Number
- CN202311168945.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
AI Technical Summary
In ultrasonic devices, there are problems of uneven and out-of-synchronization of the linear-mode image, resulting in uneven image refresh and stuttering.
By starting the real-time data cache operation, the ultrasonic image data is cached in the preset cache area, and the image playback operation is initiated when the real-time target cache information meets the preset conditions, and the data to be played from the cache area based on the preset image refresh rules are retrieved for playback.
It realizes uniform playback of ultrasonic image data and synchronous refresh of multi-mode images, avoids display problems caused by unprocessing of real-time data acquisition, and improves the smoothness of the playback process.
Smart Images

Figure CN119603406A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an image data playing method, device, equipment and medium. Background Art
[0002] The ultrasound image displayed on the screen of the ultrasound device is usually a line mode image, which is displayed as a line or a point on the screen, such as PW (Pulsed-wave Doppler) mode and ECG (electrocardiogram) mode.
[0003] In some cases, images in different line modes need to be displayed synchronously. The timestamps of images in different line modes uploaded are not completely consistent, and there is a sequence. In addition, the number of points or lines displayed on the screen after the amount of data uploaded each time is also inconsistent. Therefore, at a certain refresh moment, some images may have been processed and displayed several lines, while some images may not have been processed yet and cannot be displayed. Since each refresh moment displays a piece of data at a time, there will be a phenomenon that the positions of multiple line mode images displayed on the screen will be out of sync; in addition, for the same line mode image, if it takes a long time to process the image, there will be no image data displayed for multiple consecutive refresh moments, resulting in uneven image refresh and jamming.
[0004] In summary, how to avoid uneven playback of ultrasound image data and asynchronous refresh of multi-mode images is a problem that needs to be solved. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide an image data playback method, device, equipment and medium, which can avoid the problems of uneven playback of ultrasound image data and asynchronous refresh of multi-mode images. The specific scheme is as follows:
[0006] In a first aspect, the present application discloses a method for playing image data, comprising:
[0007] Initiate a real-time data caching operation to send ultrasound image data of several modes currently acquired in real time to a preset cache area for caching;
[0008] Monitoring real-time target cache information of the preset cache area;
[0009] The image playing operation is started after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playing moment from the preset cache based on the preset image refresh rule.
[0010] Optionally, the real-time target cache information is the time when data packets of ultrasonic image data of various modes in the current preset cache area are received;
[0011] Correspondingly, the image playback operation is started after the real-time target cache information meets a preset condition, including:
[0012] After monitoring that the data packet reception time includes the target mode of ultrasound image data, the image playback operation is started; the target mode is the mode that takes the longest time to complete uploading the same number of data packets among the several modes.
[0013] Optionally, the image data playing method further includes:
[0014] The image refresh time interval in the preset image refresh rule is determined based on the data packet receiving time of the ultrasound image data of the target mode.
[0015] Optionally, the real-time target cache information is the cached data volume of ultrasound image data of various modes in the current preset cache area.
[0016] Optionally, starting the image playback operation after the real-time target cache information meets a preset condition includes:
[0017] If the cached data amounts of ultrasound image data of various modes in the current preset cache area are all greater than the data amount threshold pre-configured for each mode, the image playback operation is started.
[0018] Optionally, starting the image playback operation after the real-time target cache information meets a preset condition includes:
[0019] Determining the total amount of cached data in the preset buffer area based on the cached data amount of ultrasound image data of various modes in the preset buffer area;
[0020] The image playback operation is started after the total amount of cached data is greater than a preset total amount of data threshold.
[0021] Optionally, the image data playing method further includes:
[0022] respectively determining an average data volume of a data packet of the historical ultrasound image data of each mode;
[0023] The preset data amount threshold is determined based on the sum of the average data amounts corresponding to various modes.
[0024] Optionally, the retrieving and playing the to-be-played image data of the plurality of modes respectively corresponding to each image playing moment from the preset buffer area cache based on the preset image refresh rule includes:
[0025] If it is monitored that the current moment is any image playback moment in the preset image refresh rule, then determine the first target interval length between any image playback moment and the corresponding next image refresh moment; any image playback moment includes the start playback moment and the image refresh moment in the preset image refresh rule;
[0026] Based on the order of timestamps from front to back, the to-be-played image data corresponding to the playing moment of any image is selected from the current unplayed image data in the preset cache area and played; the duration corresponding to the to-be-played image data is consistent with the first target interval duration.
[0027] Optionally, the retrieving and playing the to-be-played image data of the plurality of modes respectively corresponding to each image playing moment from the preset buffer area cache based on the preset image refresh rule includes:
[0028] If it is monitored that the current moment is any image playback moment in the preset image refresh rule, then determine the second target interval length between the start playback moment in the preset image refresh rule and the next image refresh moment of any image playback moment; the any image playback moment includes the start playback moment and the image refresh moment in the preset image refresh rule;
[0029] Based on the order of timestamps from front to back, the image data to be played corresponding to the playing moment of any image is selected from all the image data in the preset cache area and played; the duration corresponding to the image data to be played is consistent with the second target interval duration.
[0030] In a second aspect, the present application discloses an image data playback device, comprising:
[0031] A data cache module is used to start a real-time data cache operation to send ultrasound image data of several modes currently collected in real time to a preset cache area for caching;
[0032] An information monitoring module, used to monitor the real-time target cache information of the preset cache area;
[0033] The playback module is used to start the image playback operation after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the preset cache area cache based on the preset image refresh rule.
[0034] In a third aspect, the present application discloses an electronic device, comprising:
[0035] Memory, used to store computer programs;
[0036] The processor is used to execute the computer program to implement the steps of the aforementioned disclosed image data playback method.
[0037] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed image data playback method are implemented.
[0038] It can be seen that the present application starts the real-time data caching operation to send the ultrasonic image data of several modes currently collected in real time to the preset cache area for caching; monitors the real-time target cache information of the preset cache area; starts the image playback operation after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the cache of the preset cache area based on the preset image refresh rule. It can be seen that the present application first caches the ultrasonic image data of several modes collected in real time in the preset cache area, and starts the image playback operation after monitoring that the real-time target cache information in the preset cache area meets the preset conditions, so that when the ultrasonic image data in different modes needs to be played at each image playback moment, the corresponding data to be played is directly retrieved from the preset cache area based on the preset image refresh rule and can be directly displayed, thus making the entire playback process smoother. That is to say, since the present application pre-caches ultrasound image data in several modes in a preset cache area, and starts the image playback operation only when the real-time target cache information meets the preset conditions, when the image data is officially played, the image data to be played corresponding to each mode can be directly retrieved from the preset buffer for playback, thereby avoiding the phenomenon that the image data collected in real time cannot be displayed due to unprocessed processing, thereby solving the problems of uneven playback of ultrasound image data and asynchronous refresh of multi-mode images. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 A flow chart of an image data playback method disclosed in this application;
[0041] Figure 2 A flowchart of a specific method for playing image data disclosed in this application;
[0042] Figure 3A specific timeline diagram disclosed in this application;
[0043] Figure 4 This is a flow chart of another specific method for playing image data disclosed in this application;
[0044] Figure 5 This is a schematic diagram of the structure of an image data playback device disclosed in this application;
[0045] Figure 6 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] Currently, since each refresh moment displays a segment of data at one time, there will be a phenomenon that the positions of multiple line mode images displayed on the screen will be out of sync; in addition, for the same line mode image, if it takes a long time to process the image, there will be no image data displayed for multiple consecutive refresh moments, resulting in uneven image refresh and freezes. To this end, the embodiments of the present application disclose an image data playback method, device, equipment and medium, which can avoid the problems of uneven playback of ultrasound image data and asynchronous refresh of multi-mode images.
[0048] See also Figure 1 As shown, the embodiment of the present application discloses a method for playing image data, the method comprising:
[0049] Step S11: start the real-time data caching operation to send the ultrasound image data of several modes currently acquired in real time to a preset buffer area for caching.
[0050] In this embodiment, a real-time data caching operation is started by using a caching technology to send the ultrasound image data of several modes currently collected in real time to a preset cache area for caching. It is understandable that the ultrasound image displayed on the screen of the ultrasound device is usually a line mode image, which refers to an image displayed as a line or a point on the screen. The several modes mentioned above may specifically include but are not limited to PW mode, ECG mode, etc.
[0051] Exemplarily, the preset cache area may include different partitions, and ultrasound image data in different modes may be stored in different partitions. The preset cache area may also be unpartitioned, and ultrasound image data in different modes may be stored in the area and distinguished by adding identifiers.
[0052] If the ultrasound image data in different modes are collected simultaneously, they can be stored in a preset buffer area synchronously and in real time. If the ultrasound image data in different modes are not collected simultaneously, the real-time collected ultrasound image data can be stored in the preset buffer area respectively.
[0053] Step S12: monitoring the real-time target cache information of the preset cache area.
[0054] In this embodiment, real-time target cache information in a preset buffer is monitored.
[0055] Among them, the cache information in the preset cache area can be various information related to the storage status of ultrasound image data, which can be the cache time (i.e., the time when the data packet is received), the amount of cache data, etc., and the embodiment of the present application does not make specific limitations here.
[0056] Step S13: starting the image playback operation after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the preset cache based on the preset image refresh rule.
[0057] The preset image refresh rule includes a preset image refresh cycle (ie, including an image refresh time interval), and the playback time of each image can be determined by the preset image refresh rule.
[0058] In this embodiment, the image playback operation is started only after the real-time target cache information in the preset cache area is monitored to meet the preset conditions, so that when the ultrasound image data in different modes needs to be played at each image playback moment, the corresponding data to be played is directly retrieved from the preset cache area based on the preset image refresh rule and can be directly displayed. In this way, it does not completely rely on whether the real-time collected data has completed the image processing, thus making the entire playback process smoother. Through the above technical solution, the phenomenon that the real-time collected image data cannot be displayed due to incomplete processing can be avoided, and the problem of uneven playback of ultrasound image data and asynchronous refresh of multi-mode images is solved.
[0059] In a specific embodiment, the above-mentioned method of retrieving and playing the image data of the several modes to be played corresponding to each image playback moment from the cache of the preset cache area based on the preset image refresh rule includes: if it is monitored that the current moment is any image playback moment in the preset image refresh rule, then determining the first target interval duration between any image playback moment and the corresponding next image refresh moment; any image playback moment includes the starting playback moment and the image refresh moment in the preset image refresh rule; based on the order of timestamps from front to back, selecting and playing the image data to be played corresponding to any image playback moment from the current unplayed image data in the preset cache area; the duration corresponding to the image data to be played is consistent with the first target interval duration. In this embodiment, it is monitored whether the current moment is any image playback moment in the preset image refresh rule. It should be noted that the current moment is the current system time. If the current moment is any image playback moment, the first target interval duration between any image playback moment and the corresponding next image refresh moment is determined, that is, the image refresh time interval between the image playback moment and the next image writing moment is determined, and this image refresh time interval is used as the first target interval duration; wherein any image playback moment includes the start playback moment and the image refresh moment in the preset image refresh rule. Then, based on the order of timestamps from front to back, the image data to be played corresponding to any image playback moment is selected from the current unplayed image data in the preset cache area and played, and the duration corresponding to the image data to be played is consistent with the first target interval duration.
[0060] For example, assuming that the data caching operation is started from the 0th ms of the timestamp, and the ultrasonic image data collected in real time is cached, the 60th ms of the timestamp is the starting playback moment, and it is refreshed every 1ms thereafter, that is, the 61st ms, 62nd ms, etc. thereafter are all image refresh moments. Then at the starting playback moment, the first target interval between it and the next image refresh moment is 1ms, and at this time, the data in the current preset cache area are all unplayed image data, so based on the order of the timestamp from front to back, the data from 0ms to 1ms is selected from the preset cache area to be played at the 60th ms; further, at the 61st ms, the first target interval between it and the next image refresh moment is also 1ms, at this time, because the data from 0ms to 1ms in the preset cache area has been played, the data after 1ms is the currently unplayed image data, so based on the order of the timestamp from front to back, the data from 1ms to 2ms is selected from the preset cache area to be played at the 61st ms, and so on, so that the ultrasonic image data that needs to be played at all image playback moments can be obtained. That is, when the image refresh time interval remains unchanged, at any image playback moment, data of the image refresh time interval length is selected from the preset buffer area in order of timestamps from front to back for playback. It can be understood that in the above process, the ultrasound image data played later will be superimposed on the ultrasound image data that has been played, so as to form a complete image screen.
[0061] In another specific embodiment, the above-mentioned method of retrieving and playing the image data of the several modes to be played corresponding to each image playback moment from the cache of the preset cache area based on the preset image refresh rule includes: if it is monitored that the current moment is any image playback moment in the preset image refresh rule, then determining the second target interval duration between the starting playback moment in the preset image refresh rule and the next image refresh moment of any image playback moment; the any image playback moment includes the starting playback moment and the image refresh moment in the preset image refresh rule; based on the order of timestamps from front to back, the image data to be played corresponding to any image playback moment is selected from all the image data in the preset cache area and played; the duration corresponding to the image data to be played is consistent with the second target interval duration. In this embodiment, it is monitored whether the current moment displayed on the current system time is any image playback moment in the preset image refresh rule. If the current moment is any image playback moment, the second target interval length between the start playback moment in the preset image refresh rule and the next image refresh moment of any image playback moment is determined, that is, the second target interval length between the start playback moment and the next image refresh moment is determined; wherein any image playback moment includes the start playback moment and the image refresh moment in the preset image refresh rule. Then, based on the order of timestamps from front to back, the image data to be played corresponding to any image playback moment is selected from all the image data in the preset cache area and played, and the duration corresponding to the image data to be played is consistent with the second target interval length.
[0062] For example, assuming that the data cache operation is started from the 0th ms of the timestamp, and the ultrasonic image data collected in real time is cached, the 60th ms of the timestamp is the starting playback moment, and it is refreshed every 1ms thereafter, that is, the 61st ms, the 62nd ms, etc. thereafter are all image refresh moments. Then at the starting playback moment, the first target interval between the starting playback moment and the next image refresh moment, that is, the 61st ms, is 1ms, so based on the order of the timestamps from front to back, the data from 0ms to 1ms is selected from the preset cache area to be played at the 60th ms; further, at the 61st ms, the next image refresh moment of the 61st ms is the 62nd ms, so the first target interval between the starting playback moment and the 62nd ms is 2ms, so based on the order of the timestamps from front to back, the data from 0ms to 2ms is selected from the preset cache area to be played at the 61st ms. Similarly, the ultrasonic image data between 0ms and 3ms should be played at the 62nd ms, and so on, so that the ultrasonic image data that needs to be played at all image playback moments can be obtained.
[0063] It can be seen that the present application starts the real-time data caching operation to send the ultrasonic image data of several modes currently collected in real time to the preset cache area for caching; monitors the real-time target cache information of the preset cache area; starts the image playback operation after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the cache of the preset cache area based on the preset image refresh rule. It can be seen that the present application first caches the ultrasonic image data of several modes collected in real time in the preset cache area, and starts the image playback operation after monitoring that the real-time target cache information in the preset cache area meets the preset conditions, so that when the ultrasonic image data in different modes needs to be played at each image playback moment, the corresponding data to be played is directly retrieved from the preset cache area based on the preset image refresh rule and can be directly displayed, thus making the entire playback process smoother. That is to say, since the present application pre-caches ultrasound image data in several modes in a preset cache area, and starts the image playback operation only when the real-time target cache information meets the preset conditions, when the image data is officially played, the image data to be played corresponding to each mode can be directly retrieved from the preset buffer for playback, thereby avoiding the phenomenon that the image data collected in real time cannot be displayed due to unprocessed processing, thereby solving the problems of uneven playback of ultrasound image data and asynchronous refresh of multi-mode images.
[0064] See also Figure 2 As shown, the embodiment of the present application discloses a specific method for playing image data. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:
[0065] Step S21: start the real-time data caching operation to send the ultrasound image data of several modes currently acquired in real time to a preset buffer area for caching.
[0066] Step S22: monitoring the real-time target cache information of the preset cache area; the real-time target cache information is the data packet receiving time of the ultrasonic image data of various modes in the current preset cache area.
[0067] In this embodiment, the real-time target cache information may specifically be the packet receiving time of the ultrasound image data of various modes in the current preset cache area, and the packet receiving time of the ultrasound image data of various modes is monitored. In addition, it should be pointed out that in a specific implementation, the ultrasound image data cached in the preset cache area is collected and uploaded in real time by FPGA (Field Programmable Gate Array), and FPGA uploads the collected ultrasound image data packets according to the packet upload interval under different ultrasound modes.
[0068] Step S23: After monitoring that the data packet receiving moment includes the ultrasound image data of the target mode, start the image playback operation to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the preset buffer area cache based on the preset image refresh rule; the target mode is the mode that takes the longest time to complete uploading the same number of data packets among the several modes.
[0069] In this embodiment, after the data packet receiving moment of the target mode ultrasound image data is monitored, the image playback operation is started, wherein the target mode refers to the mode that takes the longest time to complete the upload of the same number of data packets among several modes. It can be understood that the timestamps of the data packet uploads of ultrasound image data in different modes are not completely consistent, and this embodiment needs to ensure that at least one data packet is uploaded in each mode before the image playback operation is started. Therefore, the embodiment of the present application monitors the data packet receiving moment of ultrasound image data in various modes in the preset buffer area, and takes the mode that takes the longest time to complete the upload of the same number of data packets among several modes as the target mode. If the image playback operation is started after the data packet receiving moment of the target mode ultrasound image data is monitored, it can also be explained that the data packets of other modes have also completed the caching of at least one data packet. For example, taking uploading a packet of data as an example, assuming that it takes 50ms to upload a packet of data in mode A, 60ms to upload a packet of data in mode B, and 25ms to upload a packet of data in mode C, and assuming that modes A, B, and C all start caching from the 0th ms, then mode B takes the longest time to complete uploading a packet of data. Therefore, if it is monitored that the data packet reception time of the ultrasound image data of various modes in the preset cache area already includes the data packet reception time of the ultrasound image data of mode B, the image playback operation is started. At this time, for mode A and mode C, 1 and 2 complete data packets have been cached in the preset cache area, respectively.
[0070] For details, please refer to Figure 3 As shown in Figure 3 Among them, t0, t1, t2, and t3 respectively represent the time point when a packet of data is uploaded in the target mode, that is, the time when the data packet of the ultrasound image data of the target mode in the preset buffer is received; T0, T1, T2, and T3 respectively represent the image playback time, where T0 is the start playback time, and T1, T2, and T3 are the image refresh times. In terms of the timestamp sequence, T0 must be after t1 to ensure that the image playback operation is started after at least one data packet is cached in each mode. At the start playback time, T0-t1 is the current total cached data volume.
[0071] Furthermore, the above method also includes: determining the image refresh time interval in the preset image refresh rule based on the packet reception time of the ultrasonic image data of the target mode. It can be understood that the image refresh time interval cannot be greater than the packet reception time of the ultrasonic image data of the target mode. It can be seen from the above content that when selecting the image data to be played from the preset cache area, the minimum time length corresponding to the image data to be played is the length of an image refresh time interval. Therefore, the image refresh time interval in this embodiment needs to be less than the packet reception time of the ultrasonic image data of the target mode, otherwise when selecting the data to be played, there will be insufficient playback data, resulting in a situation where there is no data to be played. For example, assuming that the packet reception time of the ultrasonic image data of the target mode is the 20th ms, and the image refresh time interval in the preset image refresh rule is 25ms, but only 20ms of ultrasonic image data is cached in the preset cache area, then due to insufficient cached data, it is also impossible to play.
[0072] For a more specific processing procedure of the above step S21, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.
[0073] It can be seen that in the embodiment of the present application, the real-time target cache information can specifically be the packet receiving time of the ultrasonic image data of various modes in the current preset cache area, and the packet receiving time of the ultrasonic image data of various modes is monitored. After monitoring that the packet receiving time includes the packet receiving time of the ultrasonic image data of the target mode, the image playback operation is started, wherein the target mode refers to the mode that takes the longest time to complete the upload of the same number of data packets among several modes. In this way, it can be ensured that the image playback operation is started only after the cache of at least one data packet is completed in each mode, so as to solve the problem of uneven playback of ultrasonic image data and asynchronous refresh of multi-mode images. In addition, the image refresh time interval in this embodiment needs to be less than the packet receiving time of the ultrasonic image data of the target mode, so as to avoid the problem of insufficient playback data causing the inability to play when selecting the data to be played from the preset cache area.
[0074] See also Figure 4 As shown, the embodiment of the present application discloses a specific method for playing image data. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:
[0075] Step S31: start the real-time data caching operation to send the ultrasound image data of several modes currently acquired in real time to a preset buffer area for caching.
[0076] Step S32: monitoring the real-time target cache information of the preset cache area; the real-time target cache information is the cached data volume of ultrasound image data of various modes currently in the preset cache area.
[0077] In this embodiment, the real-time target cache information may specifically be the cached data volume of ultrasound image data of various modes in the current preset cache area, and the cached data volume of ultrasound image data of various modes is monitored.
[0078] Step S33: If the cached data volume of ultrasound image data of various modes in the current preset cache area is greater than the data volume threshold configured in advance for each mode, the image playback operation is started to retrieve and play the image data of the several modes corresponding to each image playback moment from the cache of the preset cache area based on the preset image refresh rule.
[0079] In a specific embodiment, if the cached data amount of ultrasound image data of various modes in the current preset cache area is greater than the data amount threshold configured in advance for each mode, the image playback operation is started. It can be understood that the uploaded data amount and timestamp of ultrasound image data in different modes are not necessarily the same. Therefore, this embodiment needs to ensure that the ultrasound image data in each mode is cached to a certain threshold before the image playback operation is started. Otherwise, it is easy to happen that the ultrasound image data of one mode has been cached, but the ultrasound image data of another mode has not been cached, resulting in the inability to play the ultrasound image data in each mode when playing the image data. Therefore, when the cached data amount of ultrasound image data in various modes is greater than the data amount threshold configured in advance for each mode, the image playback operation is started.
[0080] In another specific implementation, the image playback operation is started after the real-time target cache information meets the preset conditions, including: determining the total amount of cached data in the current preset cache area based on the cached data amount of ultrasound image data of various modes in the current preset cache area; and starting the image playback operation after the total amount of cached data is greater than the preset data total amount threshold. That is, the present application can also monitor the total amount of cached data of ultrasound image data of various modes, and start the image playback operation when the total amount of cached data is greater than the preset data total amount threshold.
[0081] Furthermore, when determining the preset data volume threshold, it may specifically include: determining the average data volume of a data packet of historical ultrasound image data of each mode respectively; and determining the preset data volume threshold based on the sum of the average data volumes corresponding to various modes. That is, the embodiment of the present application determines the preset data volume threshold by the sum of the average data volumes of a data packet of historical ultrasound image data of various modes.
[0082] For a more specific processing procedure of the above step S31, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.
[0083] It can be seen that in the embodiment of the present application, the real-time target cache information can specifically be the cached data amount of ultrasound image data of various modes in the current preset cache area, and the cached data amount of ultrasound image data of various modes is monitored. In a specific embodiment, if the cached data amount of ultrasound image data of various modes in the current preset cache area is greater than the data amount threshold configured in advance for each mode, the image playback operation is started. In another specific embodiment, the total amount of cached data of ultrasound image data of various modes can also be monitored, and the image playback operation can be started when the total amount of cached data is greater than the preset data amount threshold. In this way, it can be ensured that the image playback operation is started only after a certain amount of data is cached in each mode, so as to solve the problems of uneven playback of ultrasound image data and asynchronous refresh of multi-mode images.
[0084] See also Figure 5 As shown, the embodiment of the present application discloses an image data playback device, the device comprising:
[0085] The data cache module 11 is used to start the real-time data cache operation to send the ultrasound image data of several modes currently collected in real time to a preset cache area for caching;
[0086] An information monitoring module 12, used to monitor the real-time target cache information of the preset cache area;
[0087] The playback module 13 is used to start the image playback operation after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the preset cache area cache based on the preset image refresh rule.
[0088] It can be seen that the present application starts the real-time data caching operation to send the ultrasonic image data of several modes currently collected in real time to the preset cache area for caching; monitors the real-time target cache information of the preset cache area; starts the image playback operation after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the cache of the preset cache area based on the preset image refresh rule. It can be seen that the present application first caches the ultrasonic image data of several modes collected in real time in the preset cache area, and starts the image playback operation after monitoring that the real-time target cache information in the preset cache area meets the preset conditions, so that when the ultrasonic image data in different modes needs to be played at each image playback moment, the corresponding data to be played is directly retrieved from the preset cache area based on the preset image refresh rule and can be directly displayed, thus making the entire playback process smoother. That is to say, since the present application pre-caches ultrasound image data in several modes in a preset cache area, and starts the image playback operation only when the real-time target cache information meets the preset conditions, when the image data is officially played, the image data to be played corresponding to each mode can be directly retrieved from the preset buffer for playback, thereby avoiding the phenomenon that the image data collected in real time cannot be displayed due to unprocessed processing, thereby solving the problems of uneven playback of ultrasound image data and asynchronous refresh of multi-mode images.
[0089] In some specific embodiments, the real-time target cache information is the data packet receiving time of the ultrasound image data of various modes in the current preset cache area;
[0090] Correspondingly, the playback module 13 can be specifically used to start the image playback operation after monitoring the data packet reception moment that contains ultrasound image data of the target mode; the target mode is the mode that takes the longest time to complete uploading the same number of data packets among the several modes.
[0091] In some specific embodiments, the image data playback device further includes:
[0092] A refresh interval determining unit is used to determine the image refresh time interval in the preset image refresh rule based on the data packet receiving time of the ultrasound image data of the target mode.
[0093] In some specific embodiments, the real-time target cache information is the cached data volume of ultrasound image data of various modes currently in the preset cache area.
[0094] In some specific embodiments, the playing module 13 may specifically include:
[0095] The first threshold judgment unit is used to start the image playback operation if the cached data volume of the ultrasound image data of various modes in the current preset cache area is greater than the data volume threshold configured in advance for each mode.
[0096] In some specific embodiments, the playing module 13 may specifically include:
[0097] a data total amount determination unit, configured to determine the total amount of cached data in the preset cache area based on the cached data amount of ultrasound image data of various modes in the preset cache area;
[0098] The second threshold judgment unit is used to start the image playback operation after the total amount of cached data is greater than a preset total amount of data threshold.
[0099] In some specific embodiments, the image data playback device further includes:
[0100] an average data volume determination unit, used to respectively determine the average data volume of a data packet of historical ultrasound image data of each mode;
[0101] The total amount threshold determination unit is used to determine the preset data total amount threshold based on the sum of the average data amounts corresponding to various modes.
[0102] In some specific embodiments, the playing module 13 may specifically include:
[0103] A first interval duration determination unit is used to determine a first target interval duration between any image playback moment and a corresponding next image refresh moment if it is monitored that the current moment is any image playback moment in the preset image refresh rule; the any image playback moment includes a start playback moment and an image refresh moment in the preset image refresh rule;
[0104] The first data selection unit is used to select and play the to-be-played image data corresponding to the playback moment of any image from the current unplayed image data in the preset cache area based on the order of timestamps from front to back; the duration corresponding to the to-be-played image data is consistent with the first target interval duration.
[0105] In some specific embodiments, the playing module 13 may specifically include:
[0106] A second interval duration determination unit is used to determine a second target interval duration between a start playback moment in the preset image refresh rule and a next image refresh moment of any image playback moment if it is monitored that the current moment is any image playback moment in the preset image refresh rule; the any image playback moment includes the start playback moment and the image refresh moment in the preset image refresh rule;
[0107] The second data selection unit is used to select and play the image data to be played corresponding to the playback moment of any image from all the image data in the preset cache area based on the order of timestamps from front to back; the duration corresponding to the image data to be played is consistent with the second target interval duration.
[0108] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the image data playback method performed by the electronic device disclosed in any of the aforementioned embodiments.
[0109] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0110] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that needs to be played on the playback screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0111] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0112] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the image data playback method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to data transmitted from an external device received by the electronic device, the data 223 can also include data collected by its own input and output interface 25, etc.
[0113] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the image data playback method disclosed in any of the aforementioned embodiments are implemented.
[0114] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0115] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0116] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0117] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0118] The above is a detailed introduction to an image data playback method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for playing image data, characterized in that: include: Initiate a real-time data caching operation to send ultrasound image data of several modes currently acquired in real time to a preset cache area for caching; Monitoring real-time target cache information of the preset cache area; The image playing operation is started after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playing moment from the preset cache based on the preset image refresh rule.
2. The method for playing image data according to claim 1, characterized in that: The real-time target buffer information is the data packet receiving time of the ultrasonic image data of various modes in the current preset buffer area; Correspondingly, the image playback operation is started after the real-time target cache information meets a preset condition, including: After monitoring that the data packet receiving time contains the target mode ultrasound image data, starting the image playback operation; The target mode is the mode that takes the longest time to upload the same number of data packets among the several modes.
3. The method for playing image data according to claim 2, characterized in that: Also includes: The image refresh time interval in the preset image refresh rule is determined based on the data packet receiving time of the ultrasound image data of the target mode.
4. The method for playing image data according to claim 1, characterized in that: The real-time target cache information is the cached data volume of ultrasound image data of various modes in the current preset cache area.
5. The method for playing image data according to claim 4, characterized in that: The starting of the image playback operation after the real-time target cache information meets a preset condition includes: If the cached data amounts of ultrasound image data of various modes in the current preset cache area are all greater than the data amount threshold pre-configured for each mode, the image playback operation is started.
6. The method for playing image data according to claim 4, characterized in that: The starting of the image playback operation after the real-time target cache information meets a preset condition includes: Determining the total amount of cached data in the preset buffer area based on the cached data amount of ultrasound image data of various modes in the preset buffer area; The image playback operation is started after the total amount of cached data is greater than a preset total amount of data threshold.
7. The image data playback method according to claim 6, characterized in that: Also includes: respectively determining an average data volume of a data packet of the historical ultrasound image data of each mode; The preset data volume threshold is determined based on the sum of the average data volumes corresponding to various modes.
8. The method for playing image data according to any one of claims 1 to 7, characterized in that: The method of retrieving and playing the image data of the plurality of modes to be played corresponding to each image playing moment from the preset buffer area buffer based on the preset image refresh rule comprises: If it is monitored that the current moment is any image playback moment in the preset image refresh rule, then determine the first target interval length between any image playback moment and the corresponding next image refresh moment; any image playback moment includes the start playback moment and the image refresh moment in the preset image refresh rule; Based on the order of timestamps from front to back, the to-be-played image data corresponding to the playing moment of any image is selected from the current unplayed image data in the preset cache area and played; the duration corresponding to the to-be-played image data is consistent with the first target interval duration.
9. The method for playing image data according to any one of claims 1 to 7, characterized in that: The method of retrieving and playing the image data of the plurality of modes to be played corresponding to each image playing moment from the preset buffer area buffer based on the preset image refresh rule comprises: If it is monitored that the current moment is any image playback moment in the preset image refresh rule, then determine the second target interval length between the start playback moment in the preset image refresh rule and the next image refresh moment of any image playback moment; the any image playback moment includes the start playback moment and the image refresh moment in the preset image refresh rule; Based on the order of timestamps from front to back, the image data to be played corresponding to the playing moment of any image is selected from all the image data in the preset cache area and played; the duration corresponding to the image data to be played is consistent with the second target interval duration.
10. An image data playback device, characterized in that: include: A data cache module is used to start a real-time data cache operation to send ultrasound image data of several modes currently collected in real time to a preset cache area for caching; An information monitoring module, used to monitor the real-time target cache information of the preset cache area; The playback module is used to start the image playback operation after the real-time target cache information meets the preset conditions, so as to retrieve and play the image data of the several modes to be played corresponding to each image playback moment from the preset cache area cache based on the preset image refresh rule.
11. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the image data playing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the image data playback method as described in any one of claims 1 to 9 are implemented.