Ultrasonic image transmission method for heart auxiliary detection
By deduplication of cardiac ultrasound image data, the data volume and computational complexity are reduced, and the problems of low compression efficiency and high computational complexity in the prior art are solved, thereby achieving more efficient data transmission.
Patent Information
- Application Number
- CN202311664014.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-06
- Publication Date
- 2025-04-15
AI Technical Summary
When compressing cardiac ultrasound images, the compression efficiency is not high, and the calculation complexity is high, and high computing resources and time are required.
By deduplication operation on the cardiac ultrasound image data sequence, the deduplication data sequence is obtained, and the deduplication necessity is determined based on the frequency and segment data volume after deduplication, the deduplication of data type sequence is performed, reducing the data volume and calculation complexity.
It improves the compression efficiency of arithmetic coding, reduces computational complexity and resource requirements, and makes the transmission of cardiac ultrasound images more efficient.
Smart Images

Figure CN119818086A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image communication, and in particular to an ultrasonic image transmission method for auxiliary cardiac detection. Background Art
[0002] Cardiac ultrasound imaging is a commonly used non-invasive examination method that can provide detailed information about the structure and function of the heart, including the size of the heart chamber, the thickness of the chamber wall, or the partition between the atrium and ventricle, etc., to facilitate doctors to evaluate the patient's heart condition. Transmission of cardiac ultrasound images can facilitate doctors to monitor the patient's heart condition in real time. Therefore, the acquired cardiac ultrasound images need to be compressed before transmission, which can reduce the image storage space and improve the image transmission efficiency.
[0003] Arithmetic coding is a lossless data compression algorithm that divides the data into intervals based on the frequency of characters in the data. The data is compressed into a decimal in the final target interval by continuously iteratively dividing the initial target interval. The compression efficiency depends on the range of the final target interval obtained. Due to the large amount of data in cardiac ultrasound images, the range of the final target interval obtained is small, and the compression efficiency is not high. In addition, when the initial target interval is continuously iteratively divided into the final target interval according to the frequency of characters in the data, a large number of floating-point calculations and probability models are involved, which leads to high computational complexity and requires higher computing resources and time. Summary of the invention
[0004] In order to solve the above problems, the present invention provides an ultrasonic image transmission method for auxiliary cardiac detection.
[0005] The ultrasonic image transmission method for auxiliary cardiac detection of the present invention adopts the following technical solution:
[0006] An embodiment of the present invention provides a method for transmitting ultrasound images for auxiliary cardiac detection, the method comprising the following steps:
[0007] Acquire cardiac ultrasound images; obtain ultrasound image data sequences based on the cardiac ultrasound images;
[0008] Acquire each data type according to the ultrasound image data sequence; acquire the number of segments of each data type in the ultrasound image data sequence and the number of data in each segment; perform deduplication operation on the ultrasound image data sequence according to each data type to acquire the deduplicated data sequence of each data type; acquire the deduplicated frequency of each data type according to the deduplicated data sequence of each data type; acquire the necessity of deduplication of each data type according to the number of segments of each data type in the ultrasound image data sequence and the number of data in each segment and the deduplicated frequency of each data type; acquire the deduplication data type sequence according to the necessity of deduplication of each data type; acquire the repetition number sequence of each data type in the deduplication data type sequence according to the number of data in each segment of each data type in the ultrasound image data sequence; acquire the deduplication ultrasound image data sequence according to the deduplication data type sequence;
[0009] Compressing the deduplicated ultrasound image data sequence and the repetition number sequence of each data type in the deduplicated data type sequence respectively to obtain compressed data;
[0010] Transmit compressed data.
[0011] Preferably, the step of acquiring the ultrasound image data sequence according to the cardiac ultrasound image comprises the following specific steps:
[0012] Starting from the first line of the cardiac ultrasound image, the pixels in the cardiac ultrasound image are scanned line by line, and the gray value of each pixel is added to the sequence until all lines are scanned, and the obtained sequence is used as the ultrasound image data sequence.
[0013] Preferably, the step of obtaining the number of segments of each data type in the ultrasound image data sequence and the number of data in each segment includes the following specific steps:
[0014] Different types of data are obtained from the ultrasound image data sequence, and the obtained different types of data are used to form a data type sequence, which is recorded as X = {x1, x2, x3, ..., x a , …}, where x a Indicates the ath data type;
[0015] The data in the ultrasonic image data sequence are traversed in sequence, and when the traversed data is of the ath data type, it is marked, and then the next data after the data is traversed, if the next data is not of the ath data type, the marking is stopped, and the marked data is recorded as a segment of the ath data type in the ultrasonic image data sequence, and if the next data is of the ath data type, it is marked, and the marking is stopped until the traversed data is not of the ath data type, and the marked data segment is recorded as a segment of the ath data type in the ultrasonic image data sequence, and so on until the data in the ultrasonic image sequence is traversed, and all segments of the ath data type in the ultrasonic image data sequence are obtained, and the number of segments of the ath data type in the ultrasonic image data sequence and the number of data of each segment of the ath data type in the ultrasonic image data sequence are obtained.
[0016] Preferably, the deduplication operation is performed on the ultrasound image data sequence according to each data type to obtain the deduplication data sequence of each data type, including the following specific steps:
[0017] By deduplicating each segment of the a-th data type in the ultrasound image data sequence, a deduplicated data sequence of the a-th data type can be obtained.
[0018] Preferably, the step of obtaining the frequency of each data type after deduplication based on the deduplication data sequence of each data type includes the following specific steps:
[0019] The ratio of the number of the a-th data type in the data sequence after the a-th data type is deduplicated to the total number of data in the data sequence after the a-th data type is deduplicated is taken as the frequency of the a-th data after deduplication.
[0020] Preferably, the step of obtaining the necessity of deduplication of each data type according to the number of segments of each data type in the ultrasound image data sequence, the number of data in each segment, and the frequency of each data type after deduplication includes the following specific steps:
[0021]
[0022] In the formula, A a represents the necessity of deduplication of the a-th data type; M a,i represents the number of data of the ath data type in the i-th segment in the ultrasound image data sequence; I a represents the number of segments of the ath data type in the ultrasound image data sequence; I max Represents the number of most segments of all data types in the ultrasound image data sequence; p′ a represents the frequency of the ath data type after deduplication; p arepresents the frequency of the ath data type in the ultrasound image data sequence; exp() represents an exponential function with a natural constant as the base.
[0023] Preferably, the step of obtaining a deduplicated data type sequence according to the necessity of deduplication of each data type includes the following specific steps:
[0024] A necessity threshold β is preset, and all data types whose deduplication necessity is greater than the necessity threshold β are obtained to form a deduplication data type sequence.
[0025] Preferably, the step of obtaining a sequence of the number of repetitions of each data type in the deduplicated data type sequence according to the number of data of each data type in each segment in the ultrasound image data sequence comprises the following specific steps:
[0026] The number of data of all segments of each data type in the deduplicated data type sequence in the ultrasound image data sequence is used to form a sequence as a sequence of the number of repetitions of each data type in the deduplicated data type sequence.
[0027] Preferably, the step of obtaining the deduplicated ultrasound image data sequence according to the deduplicated data type sequence includes the following specific steps:
[0028] Deduplication is performed on the ultrasound image data sequence according to the first data type in the deduplication data type sequence to obtain a data sequence after deduplication of the first data type in the deduplication data type sequence; deduplication is performed on the data sequence after deduplication of the first data type in the deduplication data type sequence according to the second data type in the deduplication data type sequence to obtain a data sequence after deduplication of the second data type in the deduplication data type sequence; and so on, until all the data types in the deduplication data type sequence are traversed, and the data sequence after deduplication of the last data type in the deduplication data type sequence is used as the deduplication ultrasound image data sequence.
[0029] Preferably, the deduplicated ultrasound image data sequence and the sequence of the number of repetitions of each data type in the deduplicated data type sequence are respectively compressed to obtain compressed data, and the specific steps include the following:
[0030] Arithmetic coding is used to compress the deduplicated ultrasound image data sequence and the repetition number sequence of each data type in the deduplicated data type sequence to obtain compressed data.
[0031] The technical solution of the present invention has the following beneficial effects: obtaining an ultrasonic image data sequence according to a cardiac ultrasonic image; obtaining each data type according to the ultrasonic image data sequence; performing a deduplication operation on the ultrasonic image data sequence according to each data type, obtaining a data sequence after deduplication of each data type, and obtaining a frequency of each data type after deduplication; obtaining the necessity of deduplication of each data type according to the number of segments of each data type in the ultrasonic image data sequence, the number of data in each segment, and the frequency of each data type after deduplication; obtaining a deduplication data type sequence according to the necessity of deduplication of each data type; obtaining a sequence of repeated numbers of each data type in the deduplication data type sequence; obtaining a deduplication ultrasonic image data sequence according to the sequence of deduplication data types; respectively compressing the deduplication ultrasonic image data sequence and the sequence of repeated numbers of each data type in the deduplication data type sequence to obtain compressed data; the present invention determines the data type that needs to be deduplicated by obtaining the necessity of deduplication of each data type in the ultrasonic image data sequence, completes the deduplication operation on the data in the ultrasonic image data sequence, reduces the amount of data in the ultrasonic image data sequence, reduces the number of iterations of the target interval, makes the range of the final target interval larger, and improves the compression efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 The present invention is a flowchart of the steps of an ultrasonic image transmission method for auxiliary cardiac detection. DETAILED DESCRIPTION
[0034] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of an equipment training simulator data efficient transmission method proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0035] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0036] The specific scheme of the ultrasonic image transmission method for auxiliary cardiac detection provided by the present invention is described in detail below with reference to the accompanying drawings.
[0037] See also Figure 1 , which shows a flowchart of a method for transmitting ultrasound images for auxiliary cardiac detection provided by an embodiment of the present invention, the method comprising the following steps:
[0038] S001. Acquire ultrasound image data sequence.
[0039] It should be noted that medical staff apply gel on the patient's chest and then use an ultrasound probe to gently move across the chest to obtain images of the heart. For ease of analysis, the images of the heart are converted into grayscale images and recorded as cardiac ultrasound images.
[0040] To compress the cardiac ultrasound image is to compress the grayscale value of each pixel in the cardiac ultrasound image. Therefore, it is necessary to first convert the grayscale values of all pixels in the cardiac ultrasound image into a sequence, which can more conveniently analyze, compress and process the grayscale values in the sequence. Therefore, in an embodiment of the present invention, starting from the first line of the cardiac ultrasound image, the pixels in the cardiac ultrasound image are scanned line by line, and the grayscale value of each pixel is added to the sequence until all lines are scanned. The obtained sequence is recorded as an ultrasound image data sequence, and each data in the ultrasound image data sequence is the grayscale value of each pixel.
[0041] S002. De-duplicate the ultrasound image data sequence to obtain a de-duplicate ultrasound image data sequence and a sequence of the number of repetitions of each data type in the de-duplicate data type sequence.
[0042] It should be noted that arithmetic coding is a lossless data compression algorithm, which divides the target interval based on the frequency of different data in the ultrasound image data sequence, and compresses all the data in the ultrasound image data sequence into a decimal in the final target interval by continuously iteratively dividing the initial target interval. Therefore, the compression efficiency of arithmetic coding depends on the range of the target interval. However, due to the large amount of data in the cardiac ultrasound image and the small range of the obtained final target interval, the compression efficiency of arithmetic coding is not high. In addition, when the initial target interval is continuously iteratively divided into the final target interval according to the frequency of different data in the ultrasound image data sequence, a large number of floating-point number calculations and probability model calculations are involved, which increases the complexity of the calculation. In addition, the process of encoding and decoding the cardiac ultrasound image will be very slow, requiring higher computing resources and time. Therefore, the implementation of the present invention proposes a method for deduplicating the data in the ultrasound image data sequence according to the repeatability of the data in the ultrasound image data sequence, reducing the amount of data in the ultrasound image data sequence, reducing the number of iterations of the target interval, making the range of the final target interval larger and reducing the complexity of the calculation.
[0043] It should be further explained that when any data in the ultrasound image data sequence is repeated continuously, the repeated data segment is called the repeated data segment of the current data. For the repeated data segment of the current data, the frequency is multiplied according to the number of repetitions of the current data to obtain the range of the target interval of the repeated data segment of the current data. Therefore, the size of the range of the target interval depends on the frequency of the current data in the ultrasound image data sequence and the number of repetitions of the repeated data segment. When the frequency is higher and the number of repetitions is smaller, the range of the target interval of the repeated data segment of the current data is larger. When the frequency is smaller and the number of repetitions is larger, the range of the target interval of the repeated data segment of the current data is larger. The smaller the range of the target interval, if the repeated data segments of the current data in the ultrasonic image data sequence are deduplicated, the frequency of the current data in the ultrasonic image data sequence will become smaller. If the reduction in the range of the target interval caused by the reduction in the frequency of the current data is less than the reduction in the target range caused by the number of repetitions of the repeated data segments of the current data before the frequency reduction, it means that the range of the target interval obtained after deduplication of the repeated data segments of the current data is smaller than the range of the target interval before deduplication. Therefore, deduplication of the repeated data segments of the current data can reduce the amount of calculation in the subsequent arithmetic coding, while improving the compression efficiency of the arithmetic coding. On the contrary, if the reduction in the range of the target interval caused by the reduction in the frequency of the current data is greater than the reduction in the target range caused by the number of repetitions of the repeated data segments of the current data before the frequency reduction, deduplication of the repeated data segments of the current data reduces the compression efficiency of the arithmetic coding. Therefore, in an embodiment of the present invention, when deduplicating each data type in an ultrasound image data sequence, it is necessary to analyze the degree of reduction of the frequency of each data type before and after deduplication with respect to the target interval range, obtain the necessity of deduplication of each data type, and ensure that the compression efficiency of arithmetic coding can be improved after deduplication of this type of data. Therefore, it is first necessary to obtain the data sequence after deduplication of each data type based on the ultrasound image data sequence, and then obtain the frequency of each data type after deduplication.
[0044] In the embodiment of the present invention, different types of data are obtained from the ultrasound image data sequence, and the obtained different types of data are used to form a data type sequence, which is recorded as X={x1, x2, x3, ..., x a}, where x a Represents the ath data type in the data type sequence.
[0045] According to the a-th data type in the data type sequence, the ultrasound image data sequence is deduplicated to obtain a data sequence after deduplicating the a-th data type, specifically:
[0046] The data in the ultrasonic image data sequence are traversed in sequence, and when the traversed data is the a-th data type, it is marked. Then, the next data after the data is traversed. If the next data is not the a-th data type, the marked data is recorded as a segment of the a-th data type in the ultrasonic image data sequence. If the next data is the a-th data type, it is marked. The process stops when the traversed data is not the a-th data type, and the marked data segment is recorded as a segment of the a-th data type in the ultrasonic image data sequence. This process is repeated until the data in the ultrasonic image sequence is traversed and the process ends. All segments of the a-th data type in the ultrasonic image data sequence are obtained, and the number of segments of the a-th data type in the ultrasonic image data sequence and the number of data of each segment of the a-th data type in the ultrasonic image data sequence are obtained. Each segment of the a-th data type in the ultrasonic image data sequence is deduplicated to obtain a data sequence after deduplication of the a-th data type. For example, the ultrasound image sequence is bbbccddbbbccbb, and its data type sequence is X={b, c, d}. A deduplication operation is performed on the first data type b, and the data sequence after deduplication of the first data type is bccddbccb.
[0047] The ratio of the number of the a-th data type in the data sequence after the a-th data type is deduplicated to the total number of data in the data sequence after the a-th data type is deduplicated is obtained as the frequency of the a-th data after deduplication.
[0048] It should be noted that when it is known that any type of data is repeated in the ultrasound image data sequence, the frequency of the current type of data in the ultrasound image data sequence is multiplied according to the number of repetitions to obtain the range of the target interval of the current type of data. Therefore, the value obtained by multiplying the frequency of the current data type according to the number of repetitions represents the degree of reduction of the range of the target interval of the current data type before deduplication. After deduplication of the current type of data, the current data type is a single discrete distribution in the data sequence after deduplication. Therefore, the frequency of the current data type after deduplication represents the degree of reduction of the range of the target interval of the current data type after deduplication. Therefore, the frequency of the current data type after deduplication is obtained. The difference between the values obtained by multiplying the frequency by the number of repetitions before and after the current data type. When the difference is a negative number, it means that the range of the target interval obtained by the current data type after deduplication is smaller than the range of the target interval before deduplication. At this time, there is no need for deduplication for this type of data. Conversely, the more repetitions of the current type of data before deduplication, the smaller the range of the target interval of the current type of data before deduplication will be, and the range of the target interval before deduplication is more likely to be smaller than the range of the target interval after deduplication. Therefore, deduplication is more needed for the current data type. Therefore, the necessity of deduplication for each data type is obtained according to the degree of reduction of the target interval for each data type before and after deduplication and the difference in the number of each type of data before and after deduplication.
[0049] It needs to be further explained that, it is known that each type of data will have multiple segments in the ultrasound image data sequence, and each segment contains one or more data. When deduplicating each type of data in the ultrasound image data sequence, it is necessary to obtain the number of data in each segment of each type of data in the ultrasound image data sequence in turn and store them. In order to be able to restore the ultrasound image data sequence after subsequent decoding, this operation also needs to occupy additional storage space. The more segments of each data type, the less necessary it is to deduplicate. In the embodiment of the present invention, the necessity of deduplicating each data type is adjusted in combination with the number of segments of each data type in the ultrasound image data sequence.
[0050] In an embodiment of the present invention, the necessity of deduplication of the ath data type is obtained:
[0051]
[0052] In the formula, A a represents the necessity of deduplication of the a-th data type; M a,i represents the number of data of the ath data type in the i-th segment in the ultrasound image data sequence; I a represents the number of segments of the ath data type in the ultrasound image data sequence; exp() represents an exponential function with a natural constant as the base; I max The maximum number of segments representing all data types in the ultrasound image data sequence. When the number of segments of the a-th data type is greater, more storage space is occupied when storing the number of data of each segment of the a-th data type, and it is less necessary to deduplicate the a-th data type. represents the average number of repetitions of the a-th data type in each segment of the ultrasound image sequence; represents the difference between the average number of repeated data of the ath data type in each segment of the ultrasound image sequence and the corresponding number of data in each segment after deduplication. The greater the difference in number, the more deduplication is needed; p′ a represents the frequency of the a-th data type after deduplication; p a represents the frequency of the ath data type in the ultrasound image data sequence; represents the value obtained by multiplying the frequency of the a-th type of data in the ultrasound image data sequence by the average number of repetitions of the a-th data type in each segment of the ultrasound image sequence; It represents the difference between the reduction degree of the target range of the a-th data type after deduplication and the reduction degree of the target range before deduplication. When the difference is less than 0, it means that the range of the target range obtained by the a-th data type after deduplication is smaller than the range of the target range obtained by the a-th data type before deduplication. At this time, there is no need to deduplicate this type of data. When the difference is greater than 0 and is small, it means that the range of the target range obtained by the a-th data type after deduplication is not much different from the range of the target range obtained by the a-th data type before deduplication. At this time, deduplication of this type of data is not very meaningful. When the difference is greater than 0 and is larger, it means that the range of the target range obtained by the a-th data type after deduplication is much larger than the range of the target range obtained by the a-th data type before deduplication. At this time, deduplication of this type of data can make the final target range larger, thereby improving the compression efficiency. a The smaller the value of , the less deduplication is needed for the a-th data type.
[0053] Suppose a necessity threshold β. When the necessity of deduplication of any data type is greater than β, it is considered that the data type needs to be deduplicated. In the embodiment of the present invention, β is set to 0.1×p, where p represents the frequency of any data type before deduplication. In other embodiments, the implementer can set the value of β according to the specific implementation situation, and obtain the data types whose deduplication necessity is greater than the necessity threshold β to form a deduplication data type sequence.
[0054] It should be noted that after obtaining the deduplicated data type sequence, it is necessary to perform deduplication operation on the ultrasound image data sequence for each data type in the deduplicated data type sequence to obtain the deduplicated ultrasound image data sequence, and obtain the repetition number sequence of each data type in the deduplicated data type sequence.
[0055] In the embodiment of the present invention, deduplication operations are performed on the data types in the deduplication data type sequence in turn to obtain a deduplication ultrasound image data sequence, specifically:
[0056] Deduplication is performed on the ultrasound image data sequence according to the first data type in the deduplication data type sequence to obtain a data sequence after deduplication of the first data type in the deduplication data type sequence, and the number of data of all segments of the first data type in the deduplication data type sequence in the ultrasound image data sequence is sequentially used to form a sequence of the number of repetitions of the first data type in the deduplication data type sequence;
[0057] Performing a deduplication operation on the data sequence after deduplication of the first data type in the deduplication data type sequence according to the second data type in the deduplication data type sequence, obtaining a data sequence after deduplication of the second data type in the deduplication data type sequence, and sequentially forming a sequence of the number of repetitions of the second data type in the deduplication data type sequence by sequentially taking the number of data of all segments of the second data type in the deduplication data type sequence in the data sequence after deduplication of the first data type in the deduplication data type sequence;
[0058] The same process is repeated until all data types in the deduplicated data type sequence are traversed, and the data sequence after deduplication of the last data type in the deduplicated data type sequence is the deduplicated ultrasound image data sequence, thereby obtaining a sequence of the number of repetitions of each data type in the deduplicated data type sequence. For example, the ultrasound image sequence is bbbccddbbbccbb, and the deduplicated data type sequence is {b, d}. The first data type b in the deduplicated data type sequence is deduplicated, and the data sequence after deduplication of the first data type in the deduplicated data type sequence is bccddbccb, and the sequence of the number of repetitions of the first data type b in the deduplicated data type sequence is {3, 3, 2}. The deduplication operation is performed on the data sequence after deduplication of the first data type in the deduplicated data type sequence according to the second data type d in the deduplicated data type sequence, and the data sequence after deduplication of the second data type d in the deduplicated data type sequence is bccdbccb, and the sequence of the number of repetitions of the second data type d in the deduplicated data type sequence is {2}. After the data types in the deduplicated data type sequence are traversed, the ultrasound image data sequence after deduplication is bccdbccb.
[0059] At this point, the ultrasound image data sequence is deduplicated to obtain a deduplicated ultrasound image data sequence and a sequence of the number of repetitions of each data type in the deduplicated data type sequence.
[0060] S003. Compress and transmit the deduplicated ultrasound image data sequence and the sequence of the number of repetitions of each data type in the deduplicated data type sequence.
[0061] It should be noted that in order to facilitate doctors to monitor the patient's heart condition in real time, the deduplicated ultrasound image data sequence needs to be compressed and transmitted, and in order to ensure the correct subsequent decoding, the repetition number sequence of each data type in the deduplicated data type sequence needs to be compressed and transmitted at the same time.
[0062] In an embodiment of the present invention, the deduplicated ultrasound image data sequence and the repetition number sequence of each data type are compressed separately using arithmetic coding to obtain compressed data of the deduplicated ultrasound image data sequence and compressed data of the repetition number sequence of each data type in the deduplicated data type sequence.
[0063] S004. Decompress the compressed data, and obtain an ultrasound image data sequence based on the decompression result to reconstruct a cardiac ultrasound image.
[0064] It should be noted that the doctor needs to decompress the received compressed data to detect the patient's heart condition. After decompressing each compressed data according to the decompression process of the arithmetic coding algorithm, the result is a deduplicated ultrasound image data sequence and a sequence of the number of repetitions of each data type. Therefore, it is necessary to obtain the ultrasound image data sequence based on the sequence of the number of repetitions of each data type and the deduplicated ultrasound image data sequence to reconstruct the cardiac ultrasound image.
[0065] In an embodiment of the present invention, arithmetic coding is used to decode the compressed data of the deduplicated ultrasound image data sequence and the compressed data of the repetition number sequence of each data type respectively to obtain the deduplicated ultrasound image data sequence and the repetition number sequence of each data type.
[0066] The specific process of obtaining ultrasound image data sequence is as follows:
[0067] Traverse the repetition number sequence of the first data type in the deduplicated data type sequence, traverse the data in the deduplicated ultrasound image data sequence in turn, and when the traversed data is the first data type in the deduplicated data type sequence, obtain the first number in the repetition number sequence of the first data type, increase the number of the traversed data to the size of the first number in the repetition number sequence of the first data type, and so on until the data in the deduplicated ultrasound image data sequence is traversed and terminated, and the first sequence is obtained;
[0068] Traverse the repetition number sequence of the second data type in the deduplication data type sequence, and traverse the data in the first sequence in sequence. When the traversed data is the second data type in the deduplication data type sequence, obtain the first number in the repetition number sequence of the second data type, increase the number of the traversed data to the size of the first number in the repetition number sequence of the second data type, and so on until the data in the first sequence is traversed and terminated, and the second sequence is obtained;
[0069] The same process is repeated until all the data types in the deduplicated data type sequence are traversed, and the last sequence corresponding to the last data type in the deduplicated data type sequence is obtained as the ultrasound image data sequence.
[0070] According to the size of the cardiac ultrasound image, an empty image matrix is created, and the data in the cardiac ultrasound image data sequence is added to the image matrix row by row in sequence to reconstruct the cardiac ultrasound image.
[0071] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for transmitting ultrasonic images for auxiliary cardiac detection, characterized in that: The method comprises the following steps: Acquire cardiac ultrasound images; obtain ultrasound image data sequences based on the cardiac ultrasound images; Acquire each data type according to the ultrasound image data sequence; acquire the number of segments of each data type in the ultrasound image data sequence and the number of data in each segment; perform deduplication operation on the ultrasound image data sequence according to each data type to acquire the deduplicated data sequence of each data type; acquire the deduplicated frequency of each data type according to the deduplicated data sequence of each data type; acquire the necessity of deduplication of each data type according to the number of segments of each data type in the ultrasound image data sequence and the number of data in each segment and the deduplicated frequency of each data type; acquire the deduplication data type sequence according to the necessity of deduplication of each data type; acquire the repetition number sequence of each data type in the deduplication data type sequence according to the number of data in each segment of each data type in the ultrasound image data sequence; acquire the deduplication ultrasound image data sequence according to the deduplication data type sequence; Compressing the deduplicated ultrasound image data sequence and the repetition number sequence of each data type in the deduplicated data type sequence respectively to obtain compressed data; Transmit compressed data.
2. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The specific steps of obtaining the ultrasound image data sequence according to the cardiac ultrasound image are as follows: Starting from the first line of the cardiac ultrasound image, the pixels in the cardiac ultrasound image are scanned line by line, and the gray value of each pixel is added to the sequence until all lines are scanned, and the obtained sequence is used as the ultrasound image data sequence.
3. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The specific steps of obtaining the number of segments of each data type in the ultrasound image data sequence and the number of data in each segment are as follows: Different types of data are obtained from the ultrasound image data sequence, and the obtained different types of data are used to form a data type sequence, which is recorded as X = {x1, x2, x3, ..., x a ,…}, where x a Indicates the ath data type; The data in the ultrasonic image data sequence are traversed in sequence, and when the traversed data is of the ath data type, it is marked, and then the next data after the data is traversed, if the next data is not of the ath data type, the marking is stopped, and the marked data is recorded as a segment of the ath data type in the ultrasonic image data sequence, and if the next data is of the ath data type, it is marked, and the marking is stopped until the traversed data is not of the ath data type, and the marked data segment is recorded as a segment of the ath data type in the ultrasonic image data sequence, and so on until the data in the ultrasonic image sequence is traversed, and all segments of the ath data type in the ultrasonic image data sequence are obtained, and the number of segments of the ath data type in the ultrasonic image data sequence and the number of data of each segment of the ath data type in the ultrasonic image data sequence are obtained.
4. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 3, characterized in that: The method of performing a deduplication operation on the ultrasound image data sequence according to each data type to obtain a deduplicated data sequence for each data type includes the following specific steps: By deduplicating each segment of the a-th data type in the ultrasound image data sequence, a data sequence after deduplication of the a-th data type can be obtained.
5. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The specific steps of obtaining the frequency of each data type after deduplication according to the data sequence after deduplication of each data type are as follows: The ratio of the number of the a-th data type in the data sequence after the a-th data type is deduplicated to the total number of data in the data sequence after the a-th data type is deduplicated is taken as the frequency of the a-th data after deduplication.
6. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The necessity of deduplication of each data type is obtained according to the number of segments of each data type in the ultrasound image data sequence, the number of data in each segment, and the frequency of each data type after deduplication, and the specific steps include the following: In the formula, A a represents the necessity of deduplication of the a-th data type; M a,i represents the number of data of the ath data type in the i-th segment in the ultrasound image data sequence; I a represents the number of segments of the ath data type in the ultrasound image data sequence; I max Represents the number of most segments of all data types in the ultrasound image data sequence; p′ a represents the frequency of the ath data type after deduplication; p a represents the frequency of the ath data type in the ultrasound image data sequence; exp() represents an exponential function with a natural constant as the base.
7. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The specific steps of obtaining a deduplicated data type sequence according to the necessity of deduplication of each data type are as follows: A necessity threshold β is preset, and all data types whose deduplication necessity is greater than the necessity threshold β are obtained to form a deduplication data type sequence.
8. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The specific steps of obtaining the sequence of the number of repetitions of each data type in the deduplicated data type sequence according to the number of data of each segment of each data type in the ultrasound image data sequence are as follows: The number of data of all segments of each data type in the deduplicated data type sequence in the ultrasound image data sequence is used to form a sequence as a sequence of the number of repetitions of each data type in the deduplicated data type sequence.
9. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The specific steps of obtaining the deduplicated ultrasound image data sequence according to the deduplicated data type sequence are as follows: Deduplication is performed on the ultrasound image data sequence according to the first data type in the deduplication data type sequence to obtain a data sequence after deduplication of the first data type in the deduplication data type sequence; deduplication is performed on the data sequence after deduplication of the first data type in the deduplication data type sequence according to the second data type in the deduplication data type sequence to obtain a data sequence after deduplication of the second data type in the deduplication data type sequence; and so on, until all the data types in the deduplication data type sequence are traversed, and the data sequence after deduplication of the last data type in the deduplication data type sequence is used as the deduplication ultrasound image data sequence.
10. The method for transmitting ultrasonic images for auxiliary cardiac detection according to claim 1, characterized in that: The deduplicated ultrasound image data sequence and the sequence of the number of repetitions of each data type in the deduplicated data type sequence are respectively compressed to obtain compressed data, and the specific steps include the following: Arithmetic coding is used to compress the deduplicated ultrasound image data sequence and the repetition number sequence of each data type in the deduplicated data type sequence to obtain compressed data.