Subject information optimization storage method for electronic data acquisition system
By acquiring the period and interval of characters in the information data stream in the electronic data acquisition system, an accurate character frequency table is constructed, and the problem of poor compression effect caused by real-time update is solved, and the subject information storage is realized. Efficiency and accuracy.
Patent Information
- Application Number
- CN202411854073.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-01-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has inaccurate character frequency table construction caused by real-time updates in medical data storage, resulting in poor compression effect and unable to effectively improve the efficiency of subject information storage.
By obtaining the period and interval of various characters in the information data stream, the character frequency is corrected, an accurate character frequency table is constructed, and compressed and stored based on this.
The efficiency of subject information storage is improved, and the accuracy of data compression and the saving of storage space are ensured.
Smart Images

Figure CN119314611A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage, and more specifically, to a method for optimizing storage of subject information in an electronic data collection system. Background Art
[0002] Electronic data collection systems in the healthcare industry can be used to collect and manage subject information to support analysis in clinical research, health monitoring, and disease management. In order to ensure the reliability and availability of subject data, regular data storage and backup are required. With the deepening of medical research and the increase in the number of subjects, the amount of data that needs to be stored is growing exponentially. In the face of massive amounts of medical and health data, it is necessary to continuously optimize data storage methods.
[0003] There are many research contents and directions for medical data storage in the prior art. For example, a patent application document with publication number CN115883670A discloses a medical data analysis and collection method and device. The application obtains the average medical data of the target person in the historical period and the monitored medical data of the current period, and determines the target data transmission mode of the current period of the monitored medical data; executes the target data transmission mode to match the corresponding target compression algorithm, compresses the monitored medical data to obtain a collection data packet, and analyzes the average medical data and the monitored medical data, adaptively matches an efficient compression algorithm, and ensures the effectiveness of medical data collection.
[0004] Although the above-mentioned existing technology can improve the storage efficiency of medical data to a certain extent, when compressing after matching the corresponding compression algorithm, arithmetic coding needs to obtain the character frequency in advance to build a character frequency table before compression, and the relevant information data is updated in real time, resulting in the inability to obtain an accurate character frequency table, and the compression effect is poor.
[0005] Based on this, how to effectively improve the efficiency of storing subject information in the electronic data collection system is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0006] In order to solve the above technical problem of how to effectively improve the storage efficiency of subject information in an electronic data collection system, the present invention proposes a method for optimizing storage of subject information in an electronic data collection system, the method comprising the following steps: Obtain the frequency of each character in the subject's information data stream, and combine the interval lengths of all similar characters into a periodic sequence of characters of this type; calculate the predicted period of each type of character: ; In the formula, is the prediction period of the j-th character, is the number of times the j-th character appears in the information data stream, is the index of the j-th character when it appears for the i-th time in the information data stream, is the frequency of the j-th character, is the length of the ith interval in the periodic sequence of the jth type of character; the frequency of the character is corrected through the predicted period of the character to update the character frequency table; and the latest information data stream is compressed and stored based on the updated character frequency table.
[0007] The present invention compresses the subject information through arithmetic coding and then stores it, which can effectively save data storage space. In this process, the present invention takes into account that when data compression is directly performed by constructing a character frequency table through an existing information data stream, the accuracy of the coding and compression of the subject data updated in real time is low, and the compression efficiency is poor. Based on this, the present invention corrects the frequency of the characters by obtaining the period and interval of each type of character in the information data stream, and can accurately obtain the character frequency table used for the compression coding of the latest information data stream, thereby effectively improving the efficiency of the subject information storage.
[0008] According to a method for optimizing storage of subject information for an electronic data acquisition system provided by the present invention, the step of obtaining the frequency of occurrence of each character in the subject's information data stream also includes: obtaining various data of the subject and preprocessing them to obtain a preprocessed information data set of the subject.
[0009] The present invention takes into account the possibility of noise in the originally collected subject information data, and therefore improves the overall quality of the data through preprocessing.
[0010] According to a method for optimizing storage of subject information for an electronic data acquisition system provided by the present invention, the frequency of occurrence of each character in the subject's information data stream is obtained, including: constructing a character mapping table for each data of the subject in the information data set, converting each data into a corresponding character according to the character mapping table to obtain a character string for each subject; the character strings of all subjects are marked with indexes to form the subject's information data stream, and counting the frequency of occurrence of each character in the information data stream.
[0011] According to a method for optimizing storage of subject information for an electronic data acquisition system provided by the present invention, the method for obtaining the interval length includes: recording the index difference between a character and the previous similar character as the interval length of the character, and taking the interval length of the character as the period of the character to obtain a periodic sequence of characters of this type.
[0012] According to a method for optimizing storage of subject information for an electronic data acquisition system provided by the present invention, the frequency of characters is corrected by the prediction period of the characters, including: obtaining the total number of characters in the information data stream and the index difference when one type of characters last appears in the information data stream, and obtaining the ratio of the index difference to the prediction period of the type of characters; and taking the product of the ratio and the frequency of the type of characters as the corrected frequency of the type of characters.
[0013] The present invention provides an accurate method for calculating the frequency of characters after correction. By using the index difference and the predicted period of this type of character, characters with a small period and close to the end of the information data stream are obtained. By obtaining such characters that have a greater impact on the frequency, the frequency of the characters after correction can be accurately obtained.
[0014] According to a method for optimizing storage of subject information for an electronic data acquisition system provided by the present invention, the latest information data stream is compressed and stored based on an updated character frequency table, including: obtaining the latest information data stream based on a preset length, assigning coding lengths to characters in the latest information data stream according to the updated character frequency table, and realizing compressed storage of the latest information data stream.
[0015] According to a method for optimizing storage of subject information for an electronic data acquisition system provided by the present invention, the latest information data stream is compressed and stored based on an updated character frequency table, and then the method further includes: calculating the ratio of the size of the latest information data stream after compression to the size of the latest information data stream before compression to evaluate the compression effect.
[0016] In order to ensure the efficiency and accuracy of the compression of the subject information data, the present invention evaluates the compression effect of the latest compressed information data stream.
[0017] According to a method for optimizing storage of subject information for an electronic data acquisition system provided by the present invention, the evaluation of compression effect further includes: constructing a compression evaluation model based on the latest information data stream and the corresponding compression effect.
[0018] The present invention takes into account that the subject information data is continuously updated and inputted, and therefore a compression evaluation model is constructed so that the compression effect evaluation result can be obtained more accurately and quickly.
[0019] The present invention has the following beneficial effects: Based on the above technical solution, when storing the subject information used in the electronic data acquisition system, the present invention compresses the subject information through arithmetic coding and then stores it, which can effectively save data storage space. In this process, the present invention corrects the frequency of the characters by obtaining the period and interval of each type of character in the information data stream, reduces the influence of the real-time updated subject data on the construction of the character frequency table, and can accurately obtain the character frequency table used for the latest information data stream compression coding, thereby effectively improving the efficiency of subject information storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 A schematic diagram of a flow chart of a method for optimizing storage of subject information in an electronic data collection system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0022] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0023] It should be noted that the subject information and data involved in the present invention have been obtained with full consent and authorization, and the collection, use and processing of relevant information comply with the relevant laws, regulations and standards of relevant countries and regions. The electronic data acquisition system in the medical and health industry can be used to collect and manage subject information to support analysis in clinical research, health monitoring and disease management. In order to ensure the reliability and availability of subject data, data storage and backup are required regularly. With the deepening of medical research and the increase in the number of subjects, the amount of data that needs to be stored is growing exponentially. In the face of massive medical and health data, it is necessary to continuously optimize the data storage method.
[0024] However, when conventional arithmetic coding is used to compress the information data of the subject, it is necessary to obtain the character frequency in advance to construct a character frequency table, while the information data of the subject is updated in real time, resulting in an inability to accurately obtain the character frequency table, and the compression effect is poor.
[0025] Based on this, an embodiment of the present invention discloses a method for optimizing the storage of subject information for an electronic data acquisition system. The method predicts the next possible cycle by analyzing the change cycle of each character in the subject's information data stream, and corrects the initial frequency of the character based on the predicted cycle, thereby effectively improving the efficiency of subject information storage.
[0026] See also Figure 1 As shown, Figure 1 A flow chart of a method for optimizing storage of subject information in an electronic data collection system provided in an embodiment of the present invention, the method specifically includes the following steps.
[0027] S1: Obtain the frequency of occurrence of each character in the subject's information data stream.
[0028] It should be noted that arithmetic coding is a data compression method based on the frequency of character occurrence. In order to effectively compress data, it is necessary to know in advance the frequency of each character in the information data stream, build a character frequency table, and assign codes to the characters based on the character frequency table, thereby reducing the length of the encoded data and improving the data compression ratio.
[0029] For example, in an embodiment of the present invention, the frequency of occurrence of each character in the subject's information data stream is obtained, and before that, the method further includes: obtaining various data of the subject and preprocessing them to obtain a preprocessed information data set of the subject.
[0030] Among them, the preprocessing can be data cleaning, missing data interpolation, data format conversion, etc., which can be specifically set according to actual needs, and the embodiment of the present invention does not impose too many restrictions here.
[0031] For example, the categories of the subject's data can be name, gender, date of birth, height, weight, blood pressure, heart rate, body temperature, laboratory test results (such as blood routine, biochemical indicators, etc.), medication dosage and frequency, eating habits, sleep patterns, emotional state, stress level, etc.; specific settings can be made according to actual needs, and the embodiments of the present invention do not impose too many restrictions on this.
[0032] For example, in an embodiment of the present invention, the frequency of occurrence of each character in the subject's information data stream is obtained, including: constructing a character mapping table for each data of the subject in the information data set, converting each data into a corresponding character according to the character mapping table, and obtaining a character string for each subject; the character strings of all subjects are marked with indexes to form the subject's information data stream, and counting the frequency of occurrence of each character in the information data stream.
[0033] It is understandable that, for the convenience of data processing, one item of data of a subject can correspond to one character, and the character string of the subject is all the data items of the subject, and finally an information data stream containing multiple character categories is obtained, and each character has a corresponding position index.
[0034] For example, the frequency of occurrence of a character may be a ratio of the total number of occurrences of the character to the total number of all characters in the information data stream; wherein, the higher the total number of occurrences of the character, the higher its frequency.
[0035] After the frequencies of all characters in the information data stream are obtained based on the above steps, a character frequency table can be obtained based on the frequencies of all characters in the information data stream, and the following steps are continued.
[0036] S2: The interval lengths of all characters of the same type are combined into a periodic sequence of characters of that type, and the predicted period of each type of character is calculated.
[0037] It should be noted that conventional arithmetic coding encodes data using the character frequency table obtained through the above steps. However, the subject data is updated in real time. This method can only process the subsequent latest data based on the character frequency table in the historical data, resulting in low data encoding accuracy and poor compression efficiency.
[0038] It should be further explained that historical data is an important basis for predicting future trends. By analyzing historical data, we can obtain the regularity and patterns of character appearance, and these regularities and patterns may continue to exist in the subsequent latest data streams.
[0039] Based on this, the embodiment of the present invention obtains the period of occurrence of each type of character to obtain the predicted period of its possible occurrence in the latest data stream, so as to characterize the possibility of the character appearing in the subsequent latest data stream.
[0040] For example, in an embodiment of the present invention, the method for obtaining the interval length includes: recording the index difference between a character and the previous similar character as the interval length of the character, taking the interval length of the character as the period of the character, and obtaining a periodic sequence of characters of this type.
[0041] For the first character, the interval length is the index difference between the index of the character and the index of the first character in the information data stream.
[0042] For example: when calculating the period of the 4th weight character, if the index of the 3rd weight character is 15 and the index of the 4th weight character is 26, then the index difference is 11, and the interval length and period of the 4th weight character are 11.
[0043] After the period of each character is obtained based on the above steps, characters of the same type can be grouped into a period sequence according to the original order, and the predicted period of the character can be obtained through the period sequence of the characters in the information data stream.
[0044] For example, in the embodiment of the present invention, the prediction period of each type of character is determined, and the specific relationship can be referred to as follows: ; In the formula, is the prediction period of the j-th character, is the number of times the j-th character appears in the information data stream, is the index of the j-th character when it appears for the i-th time in the information data stream, is the frequency of the j-th character, is the length of the i-th interval in the periodic sequence of the j-th character.
[0045] In the above formula, The weight represents the weighted value of the interval length of the j-th character. The closer the index of the j-th character in the information data stream is to the latest information data stream to be compressed, the higher its reference value for the prediction period. The higher the frequency of the character, the denser the distribution of this type of character in the information data stream. By weighting the interval length of this type of character by the frequency and index of the character, the prediction period of each type of character can be accurately obtained. The smaller the prediction period, the more frequently this type of character appears.
[0046] After the prediction periods of various characters are obtained based on the above steps, the frequencies of the characters can be corrected according to the prediction periods of the various characters, thereby accurately obtaining the corrected frequencies.
[0047] S3: Correcting the frequency of the character through the prediction period of the character to update the character frequency table.
[0048] It should be noted that for any type of character, the farther the index when it appears in the information data stream is from the position of the latest information data stream to be compressed, and the smaller the prediction period of the character, the greater the probability of the character appearing in the latest information data stream.
[0049] Based on this, the frequency of the characters can be corrected through the prediction period of each type of character and the index of the character that is closest to the latest information data stream.
[0050] By way of example, in an embodiment of the present invention, the frequency of characters is corrected through the prediction period of the characters, including: obtaining the total number of characters in the information data stream and the index difference when one type of characters last appears in the information data stream, and obtaining the ratio of the index difference to the prediction period of the type of characters; and multiplying the ratio by the frequency of the type of characters as the corrected frequency of the type of characters.
[0051] When obtaining the total number of characters in the information data stream, the total number of characters can be obtained by adding one to the index difference between the last character and the first character in the information data stream.
[0052] For example, the frequencies of various characters after correction are determined, as shown in the following relationship: ; In the formula, is the corrected frequency of the j-th character, is the total number of characters in the information data stream, is the index of the last occurrence of the j-th character in the information data stream, is the prediction period of the j-th character, is the frequency of the j-th character.
[0053] In the above formula, It represents the difference between the total number of characters in the information data stream and the index of the last occurrence of the j-th character in the information data stream. The smaller the value is, the closer the position of the last occurrence of the j-th character in the information data stream is to the end of the information data stream.
[0054] It represents the weight for correcting the frequency of the j-th type of characters. The larger the value is, the farther away the position of the j-th type of characters when they last appeared in the information data stream is from the end of the information data stream and the smaller the prediction period of the j-th type of characters is, that is, the greater the probability of the j-th type of characters appearing in the latest information data stream, and the greater the frequency of this type of characters after correction.
[0055] It should be further explained that the frequencies and values of all characters in the corrected information data stream may be greater than 1.
[0056] Based on this, the embodiment of the present invention can further obtain the ratio of the corrected frequency of one type of characters to the corrected frequencies and values of all types of characters as the final corrected frequency of the type of characters, so as to achieve standardized processing of the corrected frequencies of various types of characters.
[0057] After obtaining the corrected frequencies of various characters based on the above formula, the character frequency table can be updated with the corrected frequencies to predict the occurrence frequencies of characters in the latest information data stream, thereby accurately compressing the latest information data stream.
[0058] S4: compress and store the latest information data stream based on the updated character frequency table.
[0059] It should be noted that after the character frequency table applicable to the latest information data stream is obtained based on the above steps, the latest information data stream can be compressed and stored based on the updated character frequency table.
[0060] By way of example, in an embodiment of the present invention, the latest information data stream is compressed and stored based on an updated character frequency table, including: obtaining the latest information data stream based on a preset length, assigning coding lengths to characters in the latest information data stream according to the updated character frequency table, and realizing compressed storage of the latest information data stream.
[0061] The length of the latest information data stream can be preset to 30, which can be set according to actual needs. It can be understood that the length of the latest information data stream is the number of characters included in the latest information data stream.
[0062] Specifically, when realizing the compressed storage of the latest information data stream, arithmetic coding maps the entire latest information data stream to a single real number interval; then based on the updated character frequency table, the real number interval is divided into multiple sub-intervals, each sub-interval corresponds to a type of character, wherein the sub-interval corresponding to the high-frequency character will be shorter, and the sub-interval corresponding to the low-frequency character will be longer; the corresponding sub-interval is selected according to the currently input character, and the next round of segmentation is continued from the sub-interval until the latest information data stream of the preset length is fully input, and the arithmetic coding outputs a finally selected sub-interval, and a decimal is selected from the sub-interval as the code of the latest information data stream, and the code is converted into a binary number, so as to realize the compression of the latest information data stream, and store the compressed latest information data stream.
[0063] It can be understood that the decoding process of arithmetic coding is opposite to the above encoding process, and the specific steps can be implemented by existing technologies, which will not be described in detail in the embodiments of the present invention.
[0064] It should be further explained that, in order to ensure the efficiency and accuracy of the compression of the subject information data, the compression effect of the compressed latest information data stream can be evaluated.
[0065] For example, in an embodiment of the present invention, the latest information data stream is compressed and stored based on the updated character frequency table, and then the method further includes: calculating the ratio of the size of the latest information data stream after compression to the size of the latest information data stream before compression to evaluate the compression effect.
[0066] Among them, by presetting an effect interval for each ratio, the corresponding compression effect can be obtained according to the effect interval where each ratio is located.
[0067] For example, the compression effect corresponding to the effect interval can be preset as good, average and poor, corresponding to data 1, 0 and -1 respectively, and the corresponding compression effect value is input through the effect interval where each ratio is located. It can be set according to actual needs, and the embodiment of the present invention does not impose too many restrictions here.
[0068] For example, in an embodiment of the present invention, the compression effect is evaluated, and then the method further includes: constructing a compression evaluation model based on the latest information data stream and the corresponding compression effect.
[0069] Specifically, when constructing a compression evaluation model, the latest information data streams can be labeled using the compression effect corresponding to each latest information data stream, and the labeled latest information data streams can be input into the neural network model to obtain a compression evaluation model that can be used to evaluate the compression effect.
[0070] Among them, the neural network model can be specifically set according to actual needs, and the embodiments of the present invention do not impose too many restrictions on this.
[0071] It can be seen that in the embodiment of the present invention, when storing the subject information used in the electronic data acquisition system, the frequency of occurrence of each character in the subject's information data stream can be obtained, and the interval lengths of all similar characters can be combined into a periodic sequence of such characters; the predicted period of each type of character is calculated; the frequency of the character is corrected by the predicted period of the character to achieve the update of the character frequency table; and the latest information data stream is compressed and stored based on the updated character frequency table.
[0072] In this way, the embodiment of the present invention compresses the subject information through arithmetic coding and then stores it, which can effectively save data storage space. In this process, the embodiment of the present invention takes into account that when the character frequency table is constructed through the existing information data stream for data compression, the accuracy of the coding and compression of the subject data updated in real time is low, and the compression efficiency is poor. Based on this, the embodiment of the present invention corrects the frequency of the characters by obtaining the period and interval of each type of character in the information data stream, and can accurately obtain the character frequency table used for the compression coding of the latest information data stream, thereby effectively improving the efficiency of the subject information storage.
[0073] 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 principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for optimizing storage of subject information in an electronic data collection system, characterized in that: include: Obtain the frequency of occurrence of each character in the subject's information data stream, and combine the interval lengths of all characters of the same type into a periodic sequence of characters of the same type; Calculate the prediction period for each type of character: ; is the prediction period of the j-th character, is the number of times the j-th character appears in the information data stream, is the index of the j-th character when it appears for the i-th time in the information data stream, is the frequency of the j-th type of character, is the length of the i-th interval in the periodic sequence of the j-th character; The frequency of the characters is corrected through the prediction period of the characters to update the character frequency table; the latest information data stream is compressed and stored based on the updated character frequency table.
2. A method for optimizing storage of subject information for an electronic data collection system according to claim 1, characterized in that: The step of obtaining the frequency of occurrence of each character in the information data stream of the subject also includes: Obtain various data of the subject and perform preprocessing to obtain a preprocessed information data set of the subject.
3. A method for optimizing storage of subject information for an electronic data collection system according to claim 2, characterized in that: The step of obtaining the frequency of occurrence of each character in the subject's information data stream includes: A character mapping table is constructed for each data of the subject in the information data set, and each data is converted into corresponding characters according to the character mapping table to obtain a character string for each subject; the character strings of all subjects are marked with indexes to form the subject's information data stream, and the frequency of each character appearing in the information data stream is counted.
4. The method for optimizing storage of subject information for an electronic data collection system according to claim 1, characterized in that: The method for obtaining the interval length includes: The index difference between a character and the previous character of the same type is recorded as the interval length of the character, and the interval length of the character is taken as the period of the character to obtain the periodic sequence of the character of this type.
5. The method for optimizing storage of subject information for an electronic data collection system according to claim 1, characterized in that: The step of correcting the frequency of the character by using the prediction period of the character comprises: The total number of characters in the information data stream and the index difference of the last appearance of one type of characters in the information data stream are obtained to obtain the ratio of the index difference to the prediction period of the character of this type; the product of the ratio and the frequency of the character of this type is taken as the corrected frequency of the character of this type.
6. The method for optimizing storage of subject information for an electronic data collection system according to claim 1, characterized in that: The method of compressing and storing the latest information data stream based on the updated character frequency table includes: The latest information data stream is obtained based on a preset length, and encoding lengths are allocated to characters in the latest information data stream according to an updated character frequency table, thereby realizing compressed storage of the latest information data stream.
7. The method for optimizing and storing subject information for an electronic data collection system according to claim 1, characterized in that: The method further comprises compressing and storing the latest information data stream based on the updated character frequency table, and then: The ratio of the size of the latest information data stream after compression to the size of the latest information data stream before compression is calculated to evaluate the compression effect.
8. A method for optimizing storage of subject information for an electronic data collection system according to claim 7, characterized in that: The evaluation of the compression effect further includes: A compression evaluation model is constructed based on the latest information data stream and the corresponding compression effect.
Citation Information
Patent Citations
Medical data analysis and acquisition method and device
CN115883670A
Method for compressing Chinese text supporting ANSI encode
CN101350624A
Character-type message compression method
CN102811113A
Data stream encoding prediction method and device
CN105468724A
Gas alarm system data storage method based on Internet of Things platform
CN116015312A