Clinical test data acquisition system based on cloud computing

By constructing a symbiosis matrix to optimize LZW encoding, dynamically determine the grayscale string to be added to the dictionary, solving the problem of LZW encoding relying on dictionary length, and improving the transmission and storage efficiency of face videos.

CN120452644AActive Publication Date: 2025-08-08YIDIXI PHARM TECH (JIAXING) CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510941779.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-08-08
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

The existing LZW encoding compression efficiency is highly dependent on the dictionary length, resulting in low transmission and storage efficiency of face videos, especially in multi-center, large-scale clinical trials, and high demand for network bandwidth and cloud storage.

Method used

By constructing a symbiosis matrix of the coding sequence, dynamically decide whether to add the target grayscale string to the dictionary, shorten the dictionary length, optimize the coding process, and improve compression efficiency.

Benefits of technology

It reduces the amount of compressed data, improves the transmission efficiency and storage efficiency of facial videos, and reduces network bandwidth and cloud storage requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120452644A_ABST
    Figure CN120452644A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image communication, and particularly relates to a clinical test data acquisition system based on cloud computing, which comprises an acquisition module, a compression module, a transmission module, a decompression module and a heart rate data extraction module, and is characterized in that a coding sequence is acquired according to a human face video of a subject, a co-occurrence matrix and an initial dictionary are constructed, and the coding sequence is acquired; according to the sequence of the lengths of the elements in the dictionary from large to small, the coding sequence and the elements in the dictionary are matched to obtain a coding object, and according to the coding frequency of each substring in a target gray scale string formed by the coding object and the next gray scale value in the coding sequence and the difference between the corresponding elements of the substrings in the co-occurrence matrix, the coding time of each substring in the target gray scale string is calculated. Determining whether to add the target gray scale string into the dictionary; and transmitting and decompressing the compressed data, and extracting a heart rate curve of the subject according to a face video obtained by decompression. According to the invention, the length of the LZW dictionary is reduced, and the compression efficiency and transmission efficiency of the face video are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image communication technology, and more particularly to a clinical trial data acquisition system based on cloud computing. Background Art

[0002] In traditional clinical trial data collection, key physiological parameters such as heart rate typically require subjects to visit a medical facility in person and be measured using specialized equipment such as an electrocardiograph and pulse oximeter. This approach not only increases the time and financial burden on subjects, but also poses significant obstacles, particularly for patients with limited mobility or those living in remote areas. Furthermore, continuous monitoring is difficult to achieve, potentially leading to the omission of important physiological trends.

[0003] The emergence of remote photoplethysmography (rPPG) technology has provided a new method for collecting clinical trial data. Using an ordinary camera, rPPG captures subtle changes in blood flow on a subject's facial skin surface, extracting physiological parameters such as heart rate and respiratory rate without contact.

[0004] However, rPPG technology relies on high-definition video as a data source, and the amount of uncompressed video data is very large. In multi-center, large-scale clinical trials, video data accumulates extremely quickly, placing extremely high demands on network bandwidth and cloud storage.

[0005] LZW coding is a dictionary-based compression method used to compress facial videos of subjects. During the compression process, LZW coding dynamically constructs a dictionary, adding the shortest substring that first appears in the coded sequence to the dictionary. This allows the substring to be encoded again using its sequence number in the dictionary, thus achieving compression. However, LZW coding's compression efficiency is highly dependent on the length of the dictionary. Longer dictionary lengths result in poorer compression, impacting the transmission and storage efficiency of the subject's facial videos. Summary of the Invention

[0006] To address the technical problem that the compression efficiency of the LZW encoding is highly dependent on the dictionary length, which affects the transmission and storage efficiency of the subject's facial video, the present invention provides a clinical trial data acquisition system based on cloud computing, which includes the following modules: The acquisition module collects the face video of the subject; the compression module, S1: expands the channel data of each image frame of the face video into a coding sequence; S2: constructs the co-occurrence matrix of the coding sequence and the initial dictionary; S3: matches the coding sequence with the elements in the dictionary in descending order of the length of the elements in the dictionary, obtains the coding object, and takes the sequence number of the element matched by the coding object in the dictionary as the coding result of the coding object; the coding object and the next grayscale value in the coding sequence constitute the target grayscale string, and the substrings of length 2 in the target grayscale string are matched. The difference between the number of occurrences of the encoded grayscale value and the corresponding elements of each substring of length 2 in the co-occurrence matrix determines whether to add the target grayscale string to the end of the dictionary; S4: repeat S3 until all grayscale values in the encoding sequence have been encoded and the iteration is stopped; S5: the binary numbers corresponding to all the obtained encoding results are concatenated to obtain compressed data; the transmission module uploads the compressed data to the cloud platform; the decompression module decompresses the compressed data and restores the face video according to the decompression result; the heart rate data extraction module extracts the heart rate curve of the subject based on the face video.

[0007] The present invention converts any channel of each image frame of a face video into a coding sequence for compression, constructs a co-occurrence matrix of the coding sequence, saves the number of times a grayscale value combination composed of any two grayscale values appears in the coding sequence, and when compressing the coding sequence, dynamically determines whether to add the target grayscale string to the dictionary based on the difference between the number of times a substring with a length of 2 in the target grayscale string appears in the encoded grayscale value and the number corresponding to the co-occurrence matrix. This ensures that the grayscale values that have not been encoded in the coding sequence can be smoothly encoded using the grayscale strings in the dictionary, shortens the length of the dictionary, reduces the amount of final compressed data, and improves the transmission efficiency of the face video.

[0008] Preferably, the step of expanding each channel data of each image frame of the facial video into a coding sequence includes: treating each channel data of any image frame in the facial video as an independent image to be compressed, and expanding the grayscale values of the pixels in the image to be compressed into a one-dimensional sequence in the order of S-type scanning as a coding sequence.

[0009] Preferably, the construction of the co-occurrence matrix of the coding sequence comprises: constructing a An empty matrix of size , where Represents the number of types of grayscale values appearing in the coding sequence, and uses each grayscale value appearing in the coding sequence as the row index of the matrix, and uses each grayscale value appearing in the coding sequence as the column index of the matrix; the grayscale value corresponding to any row index of the matrix and the grayscale value corresponding to any column index form a grayscale value combination, and the number of times the grayscale value combination appears in the coding sequence is counted, and the corresponding position in the matrix is located by the row index and the column index, and the counted number of times is filled into the position; the final matrix is used as the co-occurrence matrix of the coding sequence.

[0010] The present invention saves the occurrence rules of grayscale value combinations composed of any two grayscale values in the coding sequence by constructing a co-occurrence matrix. In this way, during the compression of the coding sequence, it is possible to dynamically decide whether to add the target grayscale string to the dictionary based on the occurrence rules saved in the co-occurrence matrix, thereby shortening the length of the dictionary and improving the compression efficiency.

[0011] Preferably, the method for constructing the initial dictionary includes: adding each grayscale value appearing in the coding sequence into an empty dictionary in ascending order as the initial dictionary.

[0012] Preferably, the method of matching the coding sequence with the elements in the dictionary in descending order of the length of the elements in the dictionary to obtain the coding object includes: obtaining the length of the longest element in the dictionary, recorded as D, and taking a grayscale string of length D consisting of D uncoded grayscale values in the coding sequence as a judgment object; matching the elements in the dictionary with the judgment object, and in response to the absence of an element in the dictionary that is identical to the judgment object, removing the grayscale value at the end of the judgment object and taking the grayscale string after the removal as a new judgment object; and in response to the presence of an element in the dictionary that is identical to the judgment object, taking the judgment object as the coding object.

[0013] Preferably, the decision of whether to add the target grayscale string to the end of the dictionary includes: obtaining all substrings of length 2 in the target grayscale string, taking the last substring therein as the first target grayscale value combination, and taking the remaining substrings as a second target grayscale value combination; for any target grayscale value combination, taking the element corresponding to the target grayscale value combination in the co-occurrence dictionary as the target number of the target grayscale value combination, obtaining the number of occurrences of the target grayscale value combination in the encoded sequence as the number of occurrences of the target grayscale value combination; in response to the number of occurrences of the first target grayscale value combination plus one being less than the target number, and the number of occurrences of all second target grayscale value combinations being less than the target number, adding the target grayscale string to the end of the dictionary.

[0014] The present invention determines whether the target grayscale value combination will appear again in the next encoding process by comparing the number of times the target grayscale value combination has appeared with the target number of times. When any target grayscale value combination will not appear again, the target grayscale string containing the target grayscale value combination will not appear again. Therefore, the present invention dynamically determines whether to add the target grayscale string to the dictionary based on the number of times the target grayscale value combination has appeared and the target number of times. This ensures that the grayscale values that have not yet been encoded in the encoding sequence can be smoothly encoded using the grayscale strings in the dictionary, and shortens the length of the dictionary.

[0015] Preferably, the compression module also includes: in response to the number of occurrences of the first target grayscale value combination plus one being equal to the target number, the first target grayscale value combination is used as a grayscale value combination to be eliminated; in response to the number of occurrences of any second target grayscale value combination being equal to the target number, the second target grayscale value combination is used as a grayscale value combination to be eliminated; all elements in the dictionary that contain the grayscale value combination to be eliminated are eliminated from the dictionary.

[0016] When the target gray value combination will not appear again, the element containing the target gray value combination in the dictionary will not appear again in the coding sequence. Therefore, the present invention dynamically determines whether to delete the element containing the target gray value combination from the dictionary based on the number of times the target gray value combination has appeared and the target number of times. This further shortens the length of the dictionary without affecting the gray value encoding in the coding sequence.

[0017] Preferably, the compression module further comprises: in response to adding the target grayscale string to the end of the dictionary, recording the length of the encoding object as , the length of the dictionary is not less than , and before All elements of the encoding object with gray values are taken as a target element; for any target element, the first grayscale values as the grayscale values to be judged; the last grayscale value in the coding object is used as the index grayscale value, and the number of non-zero elements in the row whose row index is the index grayscale value in the co-occurrence matrix is obtained, which is represented by W; in response to the number of types of grayscale values to be judged being equal to W, the elements that match the coding object in the dictionary are removed from the dictionary.

[0018] The present invention further shortens the dictionary length by determining the number of grayscale value types to be determined and dynamically eliminating elements that match the coding object in the dictionary. The present invention matches the coding sequence with the elements in the dictionary in descending order of length to obtain the coding object. This ensures that after the elements that match the coding object in the dictionary are eliminated from the dictionary, the coding sequence can still be longest matched in the dictionary.

[0019] Preferably, the method for obtaining the binary number corresponding to the encoding result is: converting each encoding result into a binary number with a length of A binary number, where is the maximum value among all encoding results, The round-up character.

[0020] Preferably, the extracting the subject's heart rate curve based on the face video includes: extracting the subject's heart rate curve from the subject's face video using remote photoplethysmography technology.

[0021] The beneficial effects of the present invention are: The present invention converts any channel of each image frame of a face video into a coding sequence for compression, constructs a co-occurrence matrix of the coding sequence, saves the number of times a grayscale value combination composed of any two grayscale values appears in the coding sequence, and when compressing the coding sequence, dynamically determines whether to add the target grayscale string to the dictionary based on the difference between the number of times a substring with a length of 2 in the target grayscale string appears in the encoded grayscale value and the number corresponding to the co-occurrence matrix. This ensures that the grayscale values that have not been encoded in the coding sequence can be smoothly encoded using the grayscale strings in the dictionary, shortens the length of the dictionary, reduces the amount of final compressed data, and improves the transmission efficiency of the face video.

[0022] At the same time, the present invention determines whether the target grayscale value combination will appear again in the next encoding process by comparing the number of times the target grayscale value combination has appeared with the target number of times. For the target grayscale value combination that will not appear again, the target grayscale string containing the target grayscale value combination will not be added to the dictionary, and the element containing the target grayscale value combination will be deleted from the dictionary, which further shortens the length of the dictionary and reduces the amount of compressed data.

[0023] Furthermore, the present invention determines the number of types of gray values to be determined and dynamically eliminates elements that match the coding object in the dictionary, thereby further shortening the length of the dictionary and improving the transmission efficiency of the face video. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a system block diagram schematically illustrating the clinical trial data acquisition system based on cloud computing in the present invention. DETAILED DESCRIPTION

[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0026] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0027] The present invention provides a clinical trial data acquisition system based on cloud computing. Figure 1 As shown, the clinical trial data acquisition system based on cloud computing includes an acquisition module 100, a compression module 200, a transmission module 300, a decompression module 400 and a heartbeat signal extraction module 500, which are described in detail below.

[0028] The acquisition module 100 is used to acquire a face video of a subject.

[0029] Specifically, the subject uses the front-facing camera of a smartphone to record a face video, which should be at least 20 seconds long. During the recording process, the subject must keep their face fully visible and clear without obvious obstruction.

[0030] The compression module 200 is used to compress the face video.

[0031] The compression module includes a coding sequence acquisition unit, a co-occurrence matrix construction unit, and a coding unit, which are described in detail below.

[0032] The coding sequence acquisition unit is used to expand the image to be compressed in the face video into a coding sequence.

[0033] It should be noted that a face video is composed of multiple image frames. The present invention regards each channel data of any image frame in the face video as an independent image and performs compression processing.

[0034] Specifically, the grayscale values of the pixels in the image to be compressed are calculated according to The order of the type scan is expanded into a one-dimensional sequence as the encoding sequence. In other embodiments, the implementer can customize the order of expanding the pixel gray value, for example Font scanning, circular scanning, etc.

[0035] The co-occurrence matrix construction unit is used to construct the co-occurrence matrix of the coding sequence.

[0036] Specifically, build a An empty matrix of size , where Indicates the number of grayscale values that appear in the coding sequence. Each grayscale value that appears in the coding sequence is used as the row index of the matrix, and each grayscale value that appears in the coding sequence is used as the column index of the matrix.

[0037] The grayscale value corresponding to any row index of the matrix and the grayscale value corresponding to any column index form a grayscale value combination, count the number of times this grayscale value combination appears in the coding sequence, locate the corresponding position in the matrix through the row index and the column index, and fill the counted number of times into the position.

[0038] The final matrix is used as the co-occurrence matrix of the coding sequence. Each element in the matrix represents the number of times the grayscale value combination consisting of the grayscale value corresponding to the row index of the row where the element is located and the grayscale value corresponding to the column index of the column where the element is located appears in the coding sequence.

[0039] For example, when the coding sequence is {3,2,2,3,1,1,2,5,2,1,2,1,5,3,5,4,3,5,2,2,3,5,1,3,5,2,4,1,5,2,3,4,2,4,3,5,1,2,3,4,4,3,1,3,5,2,1,4,5,4,3,3,3,1,4,2,2,4,5,2,4,4,4,3,1,5,4,1,1,1,3,5,5,3,4,5,1,5,1,3,5,1,5,4,2,5,5,1,5,4,1,1,3,5,2,5,4,3,5,5,2,4}, the corresponding co-occurrence matrix is shown in Table 1.

[0040] Table 1

[0041] The coding unit is used to encode the coding sequence.

[0042] It should be noted that in the process of constructing the LZW encoding dictionary, each shortest substring that appears for the first time in the encoding sequence must be added to the dictionary, resulting in a longer dictionary length and a larger numerical value for each encoding result. When transmitting or storing, the encoding result needs to be converted to binary. If the numerical value of each encoding result is large, the length of the corresponding binary data is long, resulting in low transmission efficiency and an increase in the amount of stored data. However, not all substrings added to the dictionary will appear again in the encoding sequence. Therefore, the present invention dynamically determines whether to add the shortest substring that appears for the first time to the dictionary based on the number of occurrences of the grayscale value combination recorded in the co-occurrence matrix, and at the same time dynamically removes the substrings already in the dictionary based on the number of occurrences of the grayscale value combination recorded in the co-occurrence matrix to shorten the dictionary length, making the numerical value of each encoding result smaller, thereby reducing the length of the encoding result after being converted to binary data, improving transmission efficiency, and reducing the amount of stored data.

[0043] Specifically, the process of encoding the coding sequence is as follows: 1. Add each grayscale value appearing in the encoding sequence to the empty dictionary in ascending order as the initial dictionary.

[0044] 2. Construct an empty sequence, recorded as the encoded sequence, to store the encoded grayscale values.

[0045] 3. Take the first grayscale value in the encoding sequence as the target grayscale value.

[0046] 4. Get the length of the longest element in the dictionary, record it as D, and use the grayscale string of length D consisting of the target grayscale value and D-1 grayscale values after the target grayscale value in the encoding sequence as the judgment object.

[0047] 5. Match the elements in the dictionary with the judgment object.

[0048] 6. In response to the absence of an element in the dictionary that is identical to the judgment object, remove the grayscale value at the end of the judgment object, use the grayscale string after removal as a new judgment object, and jump to step 5.

[0049] 7. In response to the existence of an element in the dictionary that is the same as the judgment object, the judgment object is used as the encoding object, the serial number of the element matched by the encoding object in the dictionary is used as the encoding result of the encoding object, and each grayscale value in the encoding object is added to the end of the encoded sequence in sequence.

[0050] 8. The coding object and the next grayscale value of the coding object in the coding sequence constitute a target grayscale string.

[0051] 9. Obtain all substrings of length 2 in the target grayscale string, use the last substring as the first target grayscale value combination, and use the remaining substrings as a second target grayscale value combination.

[0052] For example, when the target grayscale string is {4,3,2,5}, all substrings of length 2 in the target grayscale string are {4,3}, {3,2}, and {2,5}, respectively. The last substring {2,5} is the first target grayscale value combination, and {4,3} and {3,2} are the second target grayscale value combination.

[0053] Furthermore, for any target grayscale value combination, the element corresponding to the target grayscale value combination in the co-occurrence dictionary is used as the target number of the target grayscale value combination, and the number of times the target grayscale value combination appears in the encoded sequence is obtained as the number of times the target grayscale value combination has appeared.

[0054] In response to the number of occurrences of the first target grayscale value combination plus one being equal to the target number, or the number of occurrences of any second target grayscale value combination being equal to the target number, jump to step 10; in response to the number of occurrences of the first target grayscale value combination plus one being less than the target number, and the number of occurrences of all second target grayscale value combinations being less than the target number, add the target grayscale string to the end of the dictionary and jump to step 11.

[0055] It should be noted that in step 9, the target number of times is the total number of times the target gray value combination appears in the sequence to be encoded, so the target number of times must be greater than or equal to the number of times it has appeared. Since the target gray string is composed of the coded object and its next gray value in the coded sequence, and the coded object has been added to the coded sequence, the next gray value of the coded object in the coded sequence has not yet been added to the coded sequence. The first target gray value combination is the gray value combination composed of the last two gray values in the target gray string, so the first gray value in the first target gray value combination is added to the coded sequence, and the second gray value is not added to the coded sequence. Therefore, the number of times the first target gray value combination has appeared does not include the number of times in the current target gray string, so it is necessary to add one to the number of times it has appeared and then compare it with the target number of times.

[0056] It should be further explained that when the number of occurrences of the first target grayscale value combination plus one is less than the target number, it means that the first target grayscale value combination will appear again in the next encoding process; when the number of occurrences of the second target grayscale value combination is less than the target number, it means that the second target grayscale value combination will appear again in the next encoding process. When all target grayscale value combinations will appear again, these target grayscale value combinations may appear in the form of target grayscale strings when they appear again. Therefore, it is necessary to add the target grayscale strings to the dictionary so that when the target grayscale strings appear again, they can be encoded using the sequence number of the element corresponding to the dictionary target grayscale string; conversely, when the number of occurrences of the first target grayscale value combination plus one is equal to the target number, it means that the first target grayscale value combination will not appear again in the next encoding process; when the number of occurrences of the second target grayscale value combination is equal to the target number, it means that the second target grayscale value combination will not appear again in the next encoding process. When any target grayscale value combination will not appear again, the target grayscale string containing the target grayscale value combination will not appear again. The serial number of the element corresponding to the target grayscale string in the dictionary will not be used to encode the new encoding object subsequently. At this time, there is no need to add the target grayscale string to the dictionary.

[0057] 10. If the number of occurrences of the first target grayscale value combination plus one equals the target number, the first target grayscale value combination is considered a grayscale value combination to be eliminated. If the number of occurrences of the second target grayscale value combination equals the target number, the second target grayscale value combination is considered a grayscale value combination to be eliminated. All elements in the dictionary that contain the grayscale value combination to be eliminated are removed from the dictionary. Jump to step 12.

[0058] It should be noted that in the subsequent encoding process, the grayscale value combination to be eliminated will not appear again, and all grayscale strings containing the grayscale value combination to be eliminated will not appear again. The sequence numbers of the elements in the dictionary containing the grayscale value combination to be eliminated will not be used for subsequent encoding. Therefore, the elements in the dictionary containing the grayscale value combination to be eliminated will be removed from the dictionary to shorten the length of the dictionary, so that the encoding results of each subsequent encoding object are as small as possible.

[0059] 11. Record the length of the encoded object as , get the dictionary with a length not less than , and before All elements of the object whose grayscale values are encoded are taken as target elements.

[0060] For any target element, Grayscale values are used as grayscale values to be determined. The last grayscale value in the coded object is used as the index grayscale value, and the number of non-zero elements in the row whose row index is the index grayscale value in the co-occurrence matrix is obtained, which is recorded as W. In response to the number of types of grayscale values to be determined being equal to the number W of non-zero elements in the row whose row index is the index grayscale value in the co-occurrence matrix, the element corresponding to the coded object in the dictionary is removed from the dictionary.

[0061] It should be noted that in the coding sequence, there are W combinations of grayscale values starting with the index grayscale value. The grayscale value is the index grayscale value, If a grayscale value is used as the grayscale value to be judged, the number of grayscale value combinations consisting of the index grayscale value and the grayscale value to be judged depends on the number of grayscale values to be judged and will not exceed W. Therefore, when the number of grayscale values to be judged is equal to W, it means that all possible substrings starting with the encoding object and containing the grayscale value combination corresponding to the index grayscale value already exist in the dictionary. Then, when the encoding object appears again in the encoding sequence, it will definitely appear as a target element. In this case, it needs to be encoded using the sequence number of the corresponding target element, rather than using the index of the element corresponding to the encoding object in the dictionary. Therefore, the element corresponding to the encoding object in the dictionary can be removed from the dictionary to shorten the length of the dictionary. Conversely, when the number of grayscale values to be judged is less than W, it means that all possible substrings starting with the encoding object and containing the grayscale value combination corresponding to the index grayscale value have not been added to the dictionary. When the encoding object appears again in the encoding sequence, it may need to be encoded using the sequence number of the element corresponding to the encoding object in the dictionary. Therefore, the element corresponding to the encoding object in the dictionary cannot be removed from the dictionary.

[0062] For example, if the encoding object is {4,3,2}, the dictionary length is no less than 4, and the first three grayscale values are all elements of the encoding object: {4,3,2,5}, {4,3,2,7}, {4,3,2,1}, and {4,3,2,1,1}. Then, the target elements are {4,3,2,5}, {4,3,2,7}, {4,3,2,1}, and {4,3,2,1,1}. The grayscale values to be determined are 5, 7, and 1, and the index grayscale value is 2. The number of grayscale values to be determined is 3.

[0063] If the non-zero elements in the row with the index gray value 2 in the co-occurrence matrix are 1, 5, and 7 respectively, W=3, which means that when the coding object {4,3,2} appears again in the coding sequence, the gray value after it must be one of 1, 5, and 7. Therefore, the coding object {4,3,2} and the gray value after it can be directly encoded using the sequence number of the corresponding target element in the dictionary. Therefore, the element corresponding to the coding object {4,3,2} in the dictionary can be removed from the dictionary to shorten the length of the dictionary.

[0064] If the non-zero elements in the row with index gray value 2 in the co-occurrence matrix are 1, 5, 6, and 7 respectively, W=4, which means that when the coded object {4,3,2} appears again in the coding sequence, the gray value after it must be one of 1, 5, 6, and 7. In this case, {4,3,2,5}, {4,3,2,7}, {4,3,2,1}, and {4,3,2,1,1} in the dictionary cannot be used to encode {4,3,2}. Instead, {4,3,2} can only be encoded first using the sequence number of the element corresponding to the encoding object in the dictionary, and then {6} can be encoded. At this time, the element corresponding to the encoding object in the dictionary cannot be removed from the dictionary.

[0065] 12. The next grayscale value of the encoded object in the encoding sequence is used as the new target grayscale value.

[0066] 13. Repeat steps 4 to 12 until all grayscale values in the encoding sequence have been encoded and then stop the iteration.

[0067] 14. Convert all the obtained encoding results into a length of Binary numbers are obtained by splicing all the binary numbers together in the order in which the encoding results are obtained to obtain compressed data. is the maximum value among all encoding results, The round-up character.

[0068] At this point, the individual compression of each channel data of each image frame in the face video is achieved, and compressed data is obtained.

[0069] For example, when the encoding sequence is {3,2,2,3,1,1,2,5,2,1,2,1,5,3,5,4,3,5,2,2,3,5,1,3,5,2,4,1,5,2,3,4,2,4,3,5,1,2,3,4,4,3,1,3,5,2,1,4,5,4,3,3,3,1,4,2,2,4,5,2,4,4,3,1,5,4,1,1,1,3,5,5,3,4,5,1,5,1,3,5,1,5,4,2,5,5,1,5,4,1,1,3,5,2,5,4,3,5,5,2,4}, the initial dictionary is shown in Table 2.

[0070] Table 2

[0071] The encoding process of the coding sequence is as follows: Construct the encoded sequence {}. The first grayscale value 3 in the encoded sequence is used as the target grayscale value. The longest element in the dictionary has a length of 1, so the judgment object is 3. The element with sequence number 3 in the dictionary is the same as the judgment object. Therefore, judgment object 3 is used as the encoding object, and sequence number 3 is used as the encoding result of encoding object 3. Encoding object 3 is added to the encoded sequence, and the encoded sequence is {3}. The encoding object 3 and the next grayscale value 2 of the encoding object in the encoding sequence constitute the target grayscale string {3,2}. The substring of length 2 in the target grayscale string {3,2} is {3,2}, so the first target grayscale value combination is {3,2}. {3,2} corresponds to element 1 in the 3rd row and 2nd column in the co-occurrence dictionary, so the target number of {3,2} is 1. {3,2} does not appear in the encoded sequence, so the number of occurrences of {3,2} is 0, and the number of occurrences plus one is 1, which is the same as the target number. Then the target grayscale string is not added to the dictionary, and {3,2} is used as a grayscale value combination to be eliminated. Since there is no element containing the grayscale value combination to be eliminated in the dictionary, the dictionary is not changed.

[0072] The next grayscale value 2 in the encoding sequence is used as the target grayscale value. The longest element in the dictionary has a length of 1, so the judgment object is 2. The element with sequence number 2 in the dictionary is the same as the judgment object. In this case, the judgment object 2 is used as the encoding object, and sequence number 2 is used as the encoding result of encoding object 2. Encoding object 2 is added to the encoded sequence, and the encoded sequence is {2}. Encoding object 2 and the next grayscale value 2 of the encoding object in the encoding sequence form the target grayscale string {2,2}. The substring of length 2 in the target grayscale string {2,2} is {2,2}, so the first target grayscale value combination is {2,2}. {2,2} corresponds to element 3 in the 2nd row and 2nd column in the co-occurrence dictionary, so the target number of {2,2} is 3. Since {2,2} does not appear in the encoded sequence, the number of occurrences of {2,2} is 0. The number of occurrences plus one is 1, which is less than the target number 3. Therefore, the target grayscale string {2,2} is added to the dictionary. The length of encoding object 2 is 1, the length in the dictionary is not less than 1+1=2, and the element with the first gray value as the encoding object does not exist, so the dictionary is not removed. The dictionary at this time is shown in Table 3.

[0073] Table 3

[0074] Similarly, the next grayscale value in the coding sequence {2,3,1,1,2,5,2,1,2,1,5,3,5,4,3,5,2,2,3,5,1,3,5,2,4,1,5,2,3,4,2,4,3,5,1,2,3,4,4,3,1,3,5,2,1,4,5,4,3,3,3,1,4,2,2,4,5} is encoded and the resulting coding result is {2,3,1,1,2,5,2,10,1,5,3,5,4,17,6,17,1,20,4 ,15,7,4,2,18,4,9,2,3,15,18,9,1,3,12,2,31,28,4,27}, the encoded sequence is {3,2,2,3,1,1,2,5,2,1,2,1,5,3,5,4,3,5,2,2,3,5,1,3,5,2,4,1,5,2,3,4,2,4,3,5,1,2,3,4,4,3,1,3,5,2,1,4,5,4,3,3,3,1,4,2,2,4,5}, and the corresponding dictionary can be found in Table 4.

[0075] Table 4

[0076] The next grayscale value 2 in the coding sequence is used as the target grayscale value. The length of the longest element in the dictionary is 4, so the judgment object is {2,4,4,4}. There is no element in the dictionary that is the same as the judgment object {2,4,4,4}, so {2,4,4} is used as the new judgment object. There is no element in the dictionary that is the same as the judgment object {2,4,4}, so {2,4} is used as the new judgment object. The element with serial number 20 in the dictionary is the same as the judgment object {2,4}, so the judgment object {2,4} is used as the coding object, and the serial number 20 is taken as the encoding result of the encoding object {2,4}, then each grayscale value in the encoding object {2,4} is added to the encoded sequence, and the encoded sequence is {3,2,2,3,1,1,2,5,2,1,2,1,5,3,5,4,3,5,2,2,3,5,1,3,5,2,4,1,5,2,3,4,2,4,3,5,1,2,3,4,4,3,1,3,5,2,1,4,5,4,3,3,3,1,4,2,2,4,5,2,4}. The target grayscale string {2,4,4} is constructed from the encoding object {2,4} and its next grayscale value 4 in the encoding sequence. The substrings of length 2 in the target grayscale string {2,4,4} are {2,4} and {4,4}. Therefore, the first target grayscale value combination is {4,4}, and the second target grayscale value combination is {2,4}. {4,4} corresponds to element 3 in the 4th row and 4th column in the co-occurrence dictionary, so the target count for {4,4} is 3. Since {4,4} appears once in the encoded sequence, the number of occurrences of {4,4} is 1, which is 2 after adding one, less than the target count of 3. {2,4} corresponds to element 6 in the 2nd row and 4th column in the co-occurrence dictionary, so the target count for {2,4} is 6. Since {2,4} appears 4 times in the encoded sequence, the number of occurrences of {2,4} is 4, which is less than the target count of 6. Therefore, the target grayscale string {2,4,4} is added to the dictionary. The length of the encoding object {2,4} is 2, then , the length of the dictionary is not less than 3, and the elements whose first two grayscale values are the encoding object {2,4} do not exist, so the dictionary is not removed. The dictionary at this time is shown in Table 5.

[0077] Table 5

[0078] The next grayscale value 4 in the coding sequence is used as the target grayscale value. The length of the longest element in the dictionary is 4, so the judgment object is {4,4,3,1}. There is no element in the dictionary that is the same as the judgment object {4,4,3,1}, so {4,4,3} is used as the new judgment object. There is no element in the dictionary that is the same as the judgment object {4,4,3}, so {4,4} is used as the new judgment object. The element with sequence number 24 in the dictionary is the same as the judgment object {4,4}, so the judgment object {4,4} is used as the coding object, and sequence number 24 is used as the new judgment object. As the encoding result of the encoding object {4,4}, each grayscale value in the encoding object {4,4} is added to the encoded sequence, and the encoded sequence is {3,2,2,3,1,1,2,5,2,1,2,1,5,3,5,4,3,5,2,2,3,5,1,3,5,2,4,1,5,2,3,4,2,4,3,5,1,2,3,4,4,3,1,3,5,2,1,4,5,4,3,3,3,1,4,2,2,4,5,2,4,4,4}. The encoding object {4,4} and the next grayscale value 3 of the encoding object in the encoding sequence constitute the target grayscale string {4,4,3}. The substrings of length 2 in the target grayscale string {4,4,3} are {4,4} and {4,3}. Therefore, the first target grayscale value combination is {4,3}, and the second target grayscale value combination is {4,4}. {4,3} corresponds to element 7 in the 4th row and 3rd column in the co-occurrence dictionary, so the target number of {4,3} is 7. In the encoded sequence, {4,3} appears 4 times, so the number of occurrences of {4,3} is 4, and the number of occurrences plus one is 5, which is less than the target number 7; {4,4} corresponds to element 3 in the 4th row and 4th column in the co-occurrence dictionary, so the target number of {4,4} is 3. In the encoded sequence, {4,4} appears 3 times, so the number of occurrences of {4,4} is 3, which is equal to the target number 3; then the target grayscale string {4,4,3} is not added to the dictionary, and {4,4} is used as a grayscale value combination to be eliminated. The element {4,4} with sequence number 20 and the element {2,4,4} with sequence number 30 in the dictionary contain the grayscale value combination {4,4} to be eliminated. Therefore, the dictionary elements {4,4} and {2,4,4} are eliminated. The dictionary at this time is shown in Table 6.

[0079] Table 6

[0080] Similarly, the remaining grayscale values in the encoding sequence are encoded. The encoding results of all grayscale values in the encoding sequence are {3,2,2,3,1,1,2,5,2,10,1,5,3,5,4,17,6,17,1,20,4,15,7,4,2,18,4,9,2,3,15,18,9,1,3,12,2,31,28,4,27,20,24,4,10,4,23,8,22,7,21,7,17,3,19,18,14,4,10,4,12,6}. The final dictionary is shown in Table 7.

[0081] Table 7

[0082] For example, when the encoding sequence is {3,2,2,3,1,1,2,5,2,1,2,1,5,3,5,4,3,5,2,2,3,5,1,3,5,2,4,1,5,2,3,4,2,4,3,5,1,2,3,4,4,3,1,3,5,2,1,4,5,4,3,3,3,1,4,2,2,4,5,2,4,4,4,3,1,5,4,1,1,1,3,5,5,3,4,5,1,5,1,3,5,1,5,4,2,5,5,1,5,4,1,1,3,5,2,5,4, When the encoding sequence is {3,5,5,2,4,3,5,5,5,2,4}, traditional LZW encoding is used for the encoding sequence, and the resulting encoding result is {3,2,2,3,1,1,2,5,2,11,1,5,3,5,4,18,7,18,1,21,4,16,8,4,2,20,5,11,3,4,20,24,13,1,4,19,3,42,39,7,40,30,35,9,19,10,37,17,40,16,37,16,29,5,32,50,37,12,31,13,64,65}. The corresponding LZW encoding dictionary is shown in Table 8.

[0083] Table 8

[0084] It can be seen that the maximum value of the encoding results obtained by the method of the present invention is 31, so each encoding result needs to be converted into a length of The number of binary numbers, the number of encoding results is 62, then the length of the final compressed data is The maximum value of the encoding result obtained by using traditional LZW encoding is 65, so each encoding result needs to be converted to a length of The number of binary numbers, the number of encoding results is 62, then the length of the final compressed data is Therefore, compared with the traditional LZW encoding, the method of the present invention can reduce the compression rate and improve the transmission efficiency.

[0085] The transmission module 300 is used to upload the compressed data to the cloud platform.

[0086] When transmitting compressed data to the cloud platform, in order to ensure that the compressed data can be decompressed, the symbiosis matrix needs to be transmitted to the cloud platform together. Since the row index and column index of the symbiosis matrix are consistent, when transmitting the symbiosis matrix, only one of the row index and column index needs to be transmitted.

[0087] Implementers may also compress the co-occurrence matrix before transmission to further reduce the amount of transmitted data, such as by using Huffman coding to compress the co-occurrence matrix.

[0088] The decompression module 400 is used to decompress the compressed data and restore the face video according to the decompression result.

[0089] Specifically, after the cloud platform receives the compressed data, the process of decompressing the compressed data is as follows: 1. Compress data The method divides a binary number into bits, converts all the obtained binary numbers into decimal numbers, and uses all the obtained decimal numbers as a coding result, and constructs all the coding results into a coding result sequence.

[0090] 2. Construct an empty dictionary and add all the grayscale values corresponding to the row index of the co-occurrence matrix into the empty dictionary in ascending order as the initial dictionary.

[0091] 3. Construct an empty sequence, recorded as the decoded sequence, to store the decoded grayscale values.

[0092] 4. Use the first encoding result in the encoding result sequence as the element to be decoded.

[0093] 5. Get the element in the dictionary whose serial number is the element to be decoded as the decoding result of the element to be decoded, and add each grayscale value in the decoding result to the end of the decoded sequence in order.

[0094] 6. Take the next encoding result of the element to be decoded in the encoding result sequence as the target encoding result, determine whether there is an element with the serial number of the target encoding result in the dictionary, and in response to the existence of an element with the serial number of the target encoding result in the dictionary, splice the first grayscale value in the element to the end of the decoding result of the element to be decoded, and use the grayscale string obtained after splicing as the target grayscale string; in response to the absence of an element with the serial number of the target encoding result in the dictionary, splice the first grayscale value in the decoding result of the element to be decoded to the end of the decoding result of the element to be decoded, and use the grayscale string obtained after splicing as the target grayscale string.

[0095] 7. Obtain all substrings of length 2 in the target grayscale string, use the last substring as the first target grayscale value combination, and use the remaining substrings as a second target grayscale value combination.

[0096] For any target grayscale value combination, the element corresponding to the target grayscale value combination in the co-occurrence dictionary is used as the target number of the target grayscale value combination, and the number of times the target grayscale value combination appears in the encoded sequence is obtained as the number of times the target grayscale value combination has appeared.

[0097] In response to the number of occurrences of the first target grayscale value combination plus one being equal to the target number, or the number of occurrences of any second target grayscale value combination being equal to the target number, jump to step 8; in response to the number of occurrences of the first target grayscale value combination plus one being less than the target number, and the number of occurrences of all second target grayscale value combinations being less than the target number, add the target grayscale string to the end of the dictionary and jump to step 9.

[0098] 8. If the number of occurrences of the first target grayscale value combination plus one equals the target number, the first target grayscale value combination is considered a grayscale value combination to be eliminated. If the number of occurrences of the second target grayscale value combination equals the target number, the second target grayscale value combination is considered a grayscale value combination to be eliminated. All elements in the dictionary that contain the grayscale value combination to be eliminated are removed from the dictionary. Jump to step 10.

[0099] 9. Record the length of the decoded result of the element to be decoded as , get the dictionary with a length not less than , and before All elements of the decoding results whose grayscale values are the elements to be decoded are used as target elements.

[0100] For any target element, grayscale value as the grayscale value to be judged.

[0101] The last grayscale value in the decoding result of the element to be decoded is used as the index grayscale value, and the number of non-zero elements in the row whose row index in the co-occurrence matrix is the index grayscale value is obtained.

[0102] In response to the number of types of gray values to be determined being equal to the number of non-zero elements in the row whose row index is the index gray value in the co-occurrence matrix, the element corresponding to the decoding result of the element to be decoded in the dictionary is removed from the dictionary.

[0103] 10. The next encoding result of the element to be decoded in the encoding result sequence is used as a new element to be decoded.

[0104] 11. Repeat steps 5 to 10 until all encoding results in the encoding result sequence have been decoded and then stop the iteration.

[0105] 12. All the decoding results are formed into a sequence according to the order in which the decoding results are obtained, as a gray value sequence. The gray value sequence is filled into a In the empty matrix of size, the image to be compressed in the compression module 200 is restored. is the number of rows of the image corresponding to each channel data of each image frame in the face video, It is the number of columns of images corresponding to each channel data of each image frame in the face video.

[0106] Furthermore, restoring the face video according to the decompression result includes: According to the restored images corresponding to the channel data of the same image frame in the face video, the image frame is restored, and the restored results of all image frames constitute the face video.

[0107] At this point, the restoration of facial video has been achieved.

[0108] The heart rate data extraction module 500 is used to extract the heart rate curve of the subject based on the face video.

[0109] Specifically, the subject's heart rate curve is extracted from the subject's face video using rPPG technology.

[0110] It should be noted that rPPG technology is a non-contact physiological monitoring technology that uses a camera to capture microvascular changes on the surface of the human skin. Its core principle is to analyze the optical signal of the periodic changes in the intensity of light reflected from the skin caused by blood flow during heartbeat, thereby extracting physiological indicators such as heart rate and respiratory rate. The specific steps of rPPG are well-known and will not be detailed here.

Claims

1. A clinical trial data acquisition system based on cloud computing, characterized by: include: An acquisition module collects the face video of the subject; Compression module, S1: Expands the channel data of each image frame of the face video into a coding sequence; S2: Construct the co-occurrence matrix of the coding sequence and the initial dictionary; S3: Match the coding sequence with the elements in the dictionary in descending order of the length of the elements in the dictionary to obtain the coding object, and use the sequence number of the element matched by the coding object in the dictionary as the coding result of the coding object; The coding object and the next grayscale value in the coding sequence constitute the target grayscale string, and decide whether to add the target grayscale string to the end of the dictionary based on the number of times each substring of length 2 in the target grayscale string appears in the encoded grayscale value and the difference between the number of times each substring of length 2 in the target grayscale string appears in the encoded grayscale value and the corresponding element of each substring of length 2 in the co-occurrence matrix; S4: Repeat S3 until all grayscale values in the coding sequence have been encoded and the iteration is stopped; S5: Concatenate the binary numbers corresponding to all the obtained coding results to obtain compressed data; Transmission module, uploads compressed data to the cloud platform; The decompression module decompresses the compressed data and restores the face video based on the decompression result; The heart rate data extraction module extracts the subject's heart rate curve based on the face video.

2. The cloud computing-based clinical trial data acquisition system according to claim 1, characterized in that: Expanding the channel data of each image frame of the face video into a coding sequence includes: Each channel data of any image frame in the face video is regarded as an independent image to be compressed, and the grayscale values of the pixels in the image to be compressed are expanded into a one-dimensional sequence according to the order of S-type scanning as the encoding sequence.

3. The clinical trial data acquisition system based on cloud computing according to claim 1, characterized in that: The co-occurrence matrix of the coding sequence is constructed, comprising: Build a An empty matrix of size , where Indicates the number of types of grayscale values appearing in the coding sequence, taking each grayscale value appearing in the coding sequence as the row index of the matrix, and taking each grayscale value appearing in the coding sequence as the column index of the matrix; The grayscale value corresponding to any row index of the matrix and the grayscale value corresponding to any column index form a grayscale value combination, and the number of times the grayscale value combination appears in the coding sequence is counted. The corresponding position in the matrix is located by the row index and the column index, and the counted number of times is filled into the position; The final matrix is used as the co-occurrence matrix of the coding sequence.

4. The clinical trial data acquisition system based on cloud computing according to claim 1, characterized in that: The initial dictionary construction method includes: Each grayscale value appearing in the encoding sequence is added to the empty dictionary in ascending order as the initial dictionary.

5. The clinical trial data acquisition system based on cloud computing according to claim 1, characterized in that: The step of matching the encoding sequence with the elements in the dictionary in descending order of length to obtain the encoding object includes: Get the length of the longest element in the dictionary, record it as D, and use the grayscale string of length D composed of D uncoded grayscale values in the coding sequence as the judgment object; Match the elements in the dictionary with the judgment object. In response to the absence of an element in the dictionary that is identical to the judgment object, remove the grayscale value at the end of the judgment object and use the grayscale string after removal as the new judgment object. In response to the presence of an element in the dictionary that is identical to the judgment object, use the judgment object as the encoding object.

6. The cloud computing-based clinical trial data acquisition system according to claim 1, characterized in that: The decision of whether to add the target grayscale string to the end of the dictionary includes: Get all substrings of length 2 in the target grayscale string, take the last substring as the first target grayscale value combination, and take the remaining substrings as the second target grayscale value combination; For any target grayscale value combination, the element corresponding to the target grayscale value combination in the co-occurrence dictionary is used as the target number of the target grayscale value combination, and the number of times the target grayscale value combination appears in the encoded sequence is obtained as the number of times the target grayscale value combination has appeared; in response to the number of times the first target grayscale value combination has appeared plus one being less than the target number, and the number of times all second target grayscale value combinations have appeared being less than the target number, the target grayscale string is added to the end of the dictionary.

7. The cloud computing-based clinical trial data acquisition system according to claim 6, characterized in that: The compression module also includes: In response to the number of occurrences of the first target grayscale value combination plus one being equal to the target number, the first target grayscale value combination is used as a grayscale value combination to be eliminated; in response to the number of occurrences of any second target grayscale value combination being equal to the target number, the second target grayscale value combination is used as a grayscale value combination to be eliminated; Remove from the dictionary all elements that contain the grayscale value combination to be removed.

8. The cloud computing-based clinical trial data acquisition system according to claim 6, characterized in that: The compression module also includes: In response to adding the target grayscale string to the end of the dictionary, the length of the encoded object is recorded as , the length of the dictionary is not less than , and before All elements of the encoding object with gray values are regarded as a target element respectively; For any target element, grayscale values as the grayscale values to be judged; the last grayscale value in the coding object is used as the index grayscale value, and the number of non-zero elements in the row whose row index is the index grayscale value in the co-occurrence matrix is obtained, which is represented by W; in response to the number of types of grayscale values to be judged being equal to W, the elements that match the coding object in the dictionary are removed from the dictionary.

9. The cloud computing-based clinical trial data acquisition system according to claim 1, characterized in that: The method for obtaining the binary number corresponding to the encoding result is: Convert each encoding result into a length of A binary number, where is the maximum value among all encoding results, The round-up character.

10. The clinical trial data acquisition system based on cloud computing according to claim 1, characterized in that: The step of extracting a heart rate curve of a subject based on a face video includes: The remote photoplethysmography technology is used to extract the subject's heart rate curve from the subject's face video.

Citation Information

Patent Citations

  • Satellite-borne remote sensing image compression method based on self-adaptive block compressed sensing

    CN110401839A

  • Efficient data transmission method for smart campus management platform

    CN115866287A

  • Smart community face data storage method and system

    CN116521093A

  • Intelligent AR polarization data transmission method

    CN117177100A

  • Coding processing method and device, equipment and storage medium

    CN118555396A