A medical data storage management method, system and device
By generating the medical data to be stored after the medical device has finished treatment, and using the circular alternating use scheme of the data storage unit and the serial number storage unit, the problem of the medical device treatment data cannot be effectively stored and managed, and efficient storage and operation efficiency of medical data is achieved.
Patent Information
- Application Number
- CN202311152674.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-06
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-09-06
AI Technical Summary
In the prior art, the treatment data of medical equipment cannot be effectively stored and managed, resulting in users and doctors being unable to view historical usage records, affecting the comprehensive analysis of treatment effects.
Provide a storage management method for medical data. By generating the medical data to be stored after the medical device is finished, and using the data storage unit and the serial number storage unit to perform a storage solution to be recurrently used, ensuring effective storage of data and subsequent efficient reading and deletion operations.
It realizes effective storage of medical data generated by medical equipment, facilitates viewing of historical data, improves the efficiency of data reading and deletion operations, and supports data recycling and long-term storage.
Smart Images

Figure CN117311610B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical data management, and in particular to a storage management method, system and device for medical data. Background Art
[0002] At present, users will use some medical equipment for treatment. For example, in some occasions, users will use intermittent pneumatic compression equipment for treatment. However, in the current solution, the user reflects the effectiveness of the treatment through his or her own feelings. The treatment data including treatment mode, treatment duration, etc. are only displayed after the treatment is completed but not stored. That is, the user or doctor cannot view the historical usage records, which is not conducive to comprehensive analysis of the treatment effect.
[0003] In summary, how to effectively manage the medical data generated when using medical devices is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system and device for storing and managing medical data, so as to effectively manage the medical data generated when using medical equipment.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] A storage management method for medical data, comprising:
[0007] After the medical device completes the medical treatment, a piece of medical data to be stored is generated based on the data collected during the medical treatment;
[0008] Determine the current free address of the data storage unit and the current free address of the sequence number storage unit; wherein the free address of the data storage unit indicates the first free address of the data storage unit currently available, and the free address of the sequence number storage unit indicates the first free address of the sequence number storage unit currently available;
[0009] Starting from the current free address of the data storage unit, the medical data is stored, and starting from the current free address of the sequence number storage unit, the current free address of the data storage unit is stored;
[0010] After the storage is completed, the free address of the data storage unit and the free address of the sequence number storage unit are updated.
[0011] In one embodiment, a data storage unit and a sequence number storage unit are provided in a preset storage medium, the data storage unit includes a first main area and a first backup area, the first main area and the first backup area are used alternately in a cycle, when the first main area is used, the first main area is used in address order until the space of the first main area is exhausted, and when the first backup area is used, the first backup area is used in address order until the space of the first backup area is exhausted;
[0012] The sequence number storage unit includes a second main area and a second backup area, the second main area and the second backup area are used alternately in a cyclic manner, when the second main area is used, the second main area is used in address order until the space of the second main area is exhausted, and when the second backup area is used, the second backup area is used in address order until the space of the second backup area is exhausted;
[0013] When the current free address of the data storage unit is the first address of the first backup area, clear and enable the first backup area, and when the current free address of the data storage unit is the first address of the first primary area, clear and enable the first primary area;
[0014] When the current free address of the sequence number storage unit is the first address of the second backup area, the second backup area is cleared and enabled; when the current free address of the sequence number storage unit is the first address of the second main area, the second main area is cleared and enabled.
[0015] In one embodiment, it further includes:
[0016] receiving display instructions;
[0017] Starting from the idle address of the current sequence number storage unit, read out the addresses stored in the sequence number storage unit in sequence in the reverse order of writing;
[0018] Based on the addresses stored in the read sequence number storage unit, reading out the medical data corresponding to the addresses from the data storage unit;
[0019] Display each piece of medical data read.
[0020] In one embodiment, when the second backup area is cleared, each bit of each byte in the second backup area is set to 1, and when the second main area is cleared, each bit of each byte in the second backup area is set to 1;
[0021] Accordingly, starting from the current free address of the sequence number storage unit, in the process of sequentially reading out the addresses stored in the sequence number storage unit in the reverse order of writing, when it is detected that each bit of N consecutive bytes is 1, it is determined that all the addresses stored in the sequence number storage unit have been read;
[0022] Wherein, N is a positive integer, which represents the number of bytes occupied by a single address stored in the sequence number storage unit.
[0023] In one embodiment, it further includes:
[0024] Receive query instructions;
[0025] Starting from the idle address of the current sequence number storage unit, read out the addresses stored in the sequence number storage unit in sequence in the reverse order of writing;
[0026] Based on the addresses stored in the read sequence number storage unit, read out the recorded medical data in sequence from the data storage unit;
[0027] For any one of the read medical data, when the medical data meets the query condition carried in the query instruction, the address corresponding to the medical data stored in the sequence number storage unit is stored in the query storage unit;
[0028] Based on each address stored in the query storage unit, the corresponding medical data are read out from the data storage unit in sequence and displayed.
[0029] In one embodiment, it further includes:
[0030] When a query result deletion instruction is received, each address stored in the query storage unit is cleared.
[0031] In one embodiment, it further includes:
[0032] When a full data deletion instruction is received, all data in the query storage unit, the data storage unit and the sequence number storage unit are cleared.
[0033] In one embodiment, it further includes:
[0034] Upon receiving a directional deletion instruction pointing to target medical data, deleting the address corresponding to the target medical data stored in the sequence number storage unit, and determining each address to be moved in the sequence number storage unit;
[0035] The storage positions of the addresses to be moved are advanced one by one, so that after the advancement, the storage position of the first address to be moved is the position of the address originally used to store the target medical data;
[0036] Among them, each of the addresses to be moved represents each address whose generation time is earlier than the address of the target medical data among all the addresses stored in the serial number storage unit.
[0037] A storage management system for medical data, comprising:
[0038] A medical data generation module, used to generate a piece of medical data to be stored based on the data collected during the medical treatment after the medical device completes the medical treatment;
[0039] A parameter determination module, used to determine the current free address of the data storage unit and the current free address of the sequence number storage unit; wherein the free address of the data storage unit indicates the first free address currently available for the data storage unit, and the free address of the sequence number storage unit indicates the first free address currently available for the sequence number storage unit;
[0040] A writing module, used to store the medical data starting from the current free address of the data storage unit, and to store the current free address of the data storage unit starting from the current free address of the sequence number storage unit;
[0041] The parameter updating module is used to update the free addresses of the data storage unit and the free addresses of the sequence number storage unit after the storage is completed.
[0042] A storage management device for medical data, comprising:
[0043] Memory for storing computer programs;
[0044] A processor is used to execute the computer program to implement the steps of the medical data storage management method as described above.
[0045] By applying the technical solution provided by the embodiment of the present invention, after the medical device finishes the current medical treatment, a piece of medical data to be stored is generated based on the data collected during the current medical treatment, and then the medical data to be stored can be stored. Specifically, during storage, the current data storage unit free address and the current serial number storage unit free address can be determined, the data storage unit free address represents the first free address currently available for the data storage unit, and the serial number storage unit free address represents the first free address currently available for the serial number storage unit. After obtaining the current data storage unit free address, the medical data can be stored starting from the current data storage unit free address, and the current data storage unit free address can be stored starting from the current serial number storage unit free address, thereby effectively realizing the storage of the medical data to be stored, and after the storage is completed, the data storage unit free address and the serial number storage unit free address can be updated. It can also be seen that, because a data storage unit and a serial number storage unit are set up when storing data in the solution of the present application, the data storage unit stores specific medical data, and the serial number storage unit stores the address of the corresponding medical data, so that when the data is subsequently read, the serial number storage unit can be used to determine whether the reading is completed, and when deleting data, the serial number storage unit can be operated, which can effectively ensure the execution efficiency of these operations.
[0046] To sum up, the solution of the present application can effectively store the medical data generated when using medical equipment, which is convenient for viewing historical medical data. Moreover, since the data storage unit and the serial number storage unit are separately set up, the execution efficiency of subsequent operations such as data reading and data deletion can be effectively guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 This is a flowchart of an implementation method of a medical data storage management method in the present invention;
[0049] Figure 2 A schematic diagram of sector arrangement in a specific scenario of the present invention;
[0050] Figure 3 A schematic diagram of a display interface in a specific scenario of the present invention;
[0051] Figure 4 A schematic diagram of changes in the storage content in the sequence number storage unit before and after deletion in one scenario of the present invention;
[0052] Figure 5 It is a structural schematic diagram of a storage management system for medical data in the present invention. DETAILED DESCRIPTION
[0053] The core of the present invention is to provide a storage management method for medical data, which can effectively store the medical data generated when using medical equipment, facilitate the viewing of historical medical data, and because a data storage unit and a serial number storage unit are respectively set up, the execution efficiency of subsequent data reading and data deletion operations can be effectively guaranteed.
[0054] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0055] Please refer to Figure 1 , Figure 1 The following is a flowchart of a method for storing and managing medical data in the present invention. The method for storing and managing medical data may include the following steps:
[0056] Step S101: After the medical device completes the current medical treatment, a piece of medical data to be stored is generated based on the data collected during the current medical treatment.
[0057] The medical device described in this application can be, for example, an intermittent pneumatic pressurization medical device. Of course, it can be other types of medical devices in other occasions. After the medical device ends this medical treatment, it can generate a piece of medical data to be stored based on the data collected during this medical treatment. It can be understood that the specific data items included in the generated medical data can be set and adjusted according to actual needs. For example, in a specific occasion, a piece of medical data can include 12 data items, and these 12 data items are specifically treatment type, treatment time in minutes, treatment time in seconds, maximum treatment pressure, treatment mode, treatment date-year, treatment date-month, treatment date-day, treatment date-hour, treatment date-minute, treatment date-second, and reserved bytes. For example, in this occasion, each of these 12 data items occupies 2 bytes, so in this occasion, a piece of medical data to be stored needs to occupy 24 bytes of storage space. In the following text of this application, the size of the medical data in this example is used for explanation. In other specific occasions, the size of the storage space occupied by a piece of medical data to be stored may be different from this.
[0058] Step S102: Determine the current free address of the data storage unit and the current free address of the sequence number storage unit.
[0059] The data storage unit free address indicates the first free address of the data storage unit that is currently available, and the sequence storage unit free address indicates the first free address of the sequence storage unit that is currently available.
[0060] After a piece of medical data to be stored is generated, it is necessary to store the medical data. In the solution of the present application, a preset storage medium can be used to store each piece of medical data. For example, the preset storage medium can be a specially configured data storage chip. For example, in one scenario, the data storage chip specifically selected is an external FLASH storage chip W25Q64.
[0061] In the solution of the present application, it is necessary to determine the current free address of the data storage unit and the current free address of the sequence number storage unit.
[0062] Determining the current free address of the data storage unit indicates the first free address currently available in the data storage unit. That is to say, if a certain medical data needs to be stored currently, the medical data will be stored starting from the free address of the current data storage unit.
[0063] The free address of the serial number storage unit indicates the first free address that is currently available in the serial number storage unit. In the solution of the present application, the serial number storage unit is used to store the address of the corresponding medical data.
[0064] Step S103: Starting from the free address of the current data storage unit, the medical data is stored, and starting from the free address of the current serial number storage unit, the free address of the current data storage unit is stored.
[0065] After determining the current free address of the data storage unit, medical data can be stored starting from the current free address of the data storage unit. For example, in the above example, medical data is stored starting from the current free address of the data storage unit, and one piece of medical data requires 24 bytes of storage space.
[0066] Furthermore, starting from the current free address of the sequence number storage unit, the current free address of the data storage unit is stored. It can be seen that for the currently stored medical data, the current free address of the data storage unit, that is, the first address of the medical data, needs to be stored in the data storage unit, and the starting position of the storage is the current free address of the sequence number storage unit. For example, in one case, for the byte medical data that occupies 24 storage spaces, its first address occupies 4 bytes of space. In this case, in the sequence number storage unit, starting from the current free address of the sequence number storage unit, 4 bytes of space are used to store the first address.
[0067] Step S104: after the storage is completed, update the free address of the data storage unit and the free address of the sequence number storage unit.
[0068] After one piece of medical data is stored, since the space of the data storage unit and the serial number storage unit has been used, it is necessary to update the free address of the data storage unit and the free address of the serial number storage unit.
[0069] From the above description, it can be seen that the preset storage medium needs to be provided with a data storage unit and a serial number storage unit. When using the data storage unit and the serial number storage unit to store the corresponding data, there can be multiple specific usage rules. Taking the data storage unit as an example, for example, a simple usage method is to use the data storage unit starting from the first address of the data storage unit. When all the space of the data storage unit is used up, the entire space of the data storage unit is cleared and the data storage unit is used again from the first address of the data storage unit. However, the disadvantage of this method is that each time the data storage unit is used again from the first address of the data storage unit, a large amount of medical data will be deleted, that is, a large amount of historical records will be deleted.
[0070] In this regard, in a specific implementation of the present invention, a data storage unit and a sequence number storage unit are provided in a preset storage medium, the data storage unit includes a first main area and a first backup area, the first main area and the first backup area are used alternately in a cycle, when the first main area is used, the first main area is used in address order until the space of the first main area is exhausted, when the first backup area is used, the first backup area is used in address order until the space of the first backup area is exhausted;
[0071] The sequence number storage unit includes a second main area and a second backup area, the second main area and the second backup area are used alternately in a cycle, when the second main area is used, the second main area is used in address order until the space of the second main area is exhausted, when the second backup area is used, the second backup area is used in address order until the space of the second backup area is exhausted;
[0072] When the current data storage unit free address is the first address of the first backup area, clear and enable the first backup area, and when the current data storage unit free address is the first address of the first main area, clear and enable the first main area;
[0073] When the current free address of the sequence number storage unit is the first address of the second spare area, the second spare area is cleared and enabled; when the current free address of the sequence number storage unit is the first address of the second main area, the second main area is cleared and enabled.
[0074] In this implementation, both the data storage unit and the sequence number storage unit are provided with primary and backup areas. For the sake of distinction, the primary and backup areas of the data storage unit are referred to as the first primary area and the first backup area, and correspondingly, the primary and backup areas of the sequence number storage unit are referred to as the second primary area and the second backup area. The first primary area and the first backup area are used alternately in a cycle, and the second primary area and the second backup area are also used alternately in a cycle.
[0075] Taking the data storage unit as an example, the data storage unit stores various medical data. First, the first medical data is stored from the first address of the first main area until it is stored to the last address of the first main area, that is, until the current free address of the data storage unit is the first address of the first backup area, which means that the space of the first main area has been used up, so the first backup area needs to be enabled, and the first backup area will be cleared before enabling the first backup area. After all the space in the first main area is used up, the medical data will be stored from the first address of the first backup area. When the medical data is stored in the last address of the first backup area, that is, when the current free address of the data storage unit is the first address of the first main area, the first main area will be enabled, and similarly, the first main area will be cleared before enabling. After all the space in the first backup area is used up, the medical data will be stored from the first address of the first main area again. This cycle of storage is repeated, which is a circular operation. During the storage process, the current free address of the data storage unit will be continuously updated.
[0076] The sequence number storage unit is similar to this, and is also a circular operation. The difference is that the data storage unit stores specific medical data, while the sequence number storage unit stores the address of each medical data, that is, the physical address of each medical data. In the process of using the sequence number storage unit to store each address data, the current sequence number storage unit free address will be continuously updated.
[0077] For ease of description, in the following text, DataAddr is used to represent the parameter of the free address of the data storage unit. DataAddr is the next storage address in the data storage unit that can be used to store medical data, and NumberAddr is used to represent the parameter of the free address of the serial storage unit. NumberAddr is the next storage address in the serial storage unit that can be used to store address data. It can be understood that the two parameters DataAddr and NumberAddr will be continuously updated as medical data is continuously stored. For example, in one case, the first address of the first main area of the data storage unit is 1, the last address of the first main area is 100, the first address of the first backup area of the data storage unit is 101, and the last address of the first backup area is 200. If the current DataAddr is 60, then if data needs to be read, it can be read from 59.
[0078] For example, in one case, the storage medium used is a memory chip of 8M bytes, that is, 2048 sectors, where Figure 2, is a schematic diagram of sector arrangement in a specific scenario, sectors 1-127 are used as the second main area of the sequence storage unit, sectors 128-254 are used as the second backup area of the sequence storage unit, sectors 255-381 are used as the third main area of the query storage unit, sectors 382-508 are used as the third backup area of the query storage unit; sectors 509-1270 are used as the first main area of the data storage unit, and sectors 1271-2032 are used as the first backup area of the data storage unit. In this scenario, considering that a piece of medical data occupies 24 bytes and the first address of a piece of medical data occupies 4 bytes, the sequence storage unit, the query storage unit and the data storage unit are divided in a ratio of 4:4:24.
[0079] by Figure 2 Taking the case of as an example, the data storage process in this implementation manner is explained.
[0080] After a piece of medical data to be stored is generated, the current DataAddr and NumberAddr parameters need to be determined. For example, if DataAddr is specifically equal to 0x00000001, then for the medical data to be stored, the relationship between the data content and the address in the data storage unit is as follows: address 0x00000001 and address 0x00000002 are used to store the treatment type of the medical data, address 0x00000003 and address 0x00000004 are used to store the treatment time of the medical data in minutes, address 0x00000005 and address 0x00000006 are used to store the treatment time of the medical data in seconds, address 0x00000007 and address 0x00000008 are used to store the maximum treatment pressure of the medical data, address 0x00000009 and address 0x0000000A are used to store the treatment mode of the medical data, address 0x0000000B and address 0x0000000C are used to store the treatment date-year of the medical data, and address 0 x0000000D and address 0x0000000E are used to store the treatment date-month of the medical data, address 0x0000000F and address 0x00000010 are used to store the treatment date-day of the medical data, address 0x00000011 and address 0x00000012 are used to store the treatment date-hour of the medical data, address 0x00000013 and address 0x00000014 are used to store the treatment date-minute of the medical data, address 0x00000015 and address 0x00000016 are used to store the treatment date-second of the medical data, address 0x00000017 and address 0x00000018 are used to store the reserved bytes of the medical data. It can be seen that after the storage is completed, DataAddr needs to be updated, and the updated DataAddr = 0x00000001+24 = 0x00000019.
[0081] In addition, the address 0x00000001 needs to be stored in the serial number storage unit, and 0x00000001 occupies 4 bytes, so the corresponding relationship between DataAddr (0x00000001) stored in the serial number storage unit is: NumberAddr, NumberAddr+1, NumberAddr+2 and NumberAddr+3. That is to say, after the storage is completed, the updated NumberAddr is equal to the NumberAddr+4 before the update. If the medical data needs to be read later, the NumberAddr, NumberAddr+1, NumberAddr+2 and NumberAddr+3 in this example are read, and the read data content is 0x00000001, that is, the first address of the medical data in the data storage unit is read out, so based on the address 0x00000001, 24 bytes are read from the data storage unit to obtain the medical data.
[0082] And from the above description, it can be known that when DataAddr is equal to the first address of the first backup area of the data storage unit, in this example, it is specifically equal to the first address 1271*1024*4 of sector 1271, it means that the storage space of the first main area of the data storage unit has been used up, and the first backup area of the entire data storage unit can be cleared. In actual applications, when clearing the first backup area, each bit in each byte of the first backup area can usually be set to 1, that is, after the data is cleared, the data of all bytes becomes 0xff, and then the first backup area of the data storage unit is enabled.
[0083] If the size of each area is set according to the proportional relationship described above, when DataAddr is equal to the starting address of the first backup area of the data storage unit, NumberAddr will also be equal to the starting address of the second backup area of the serial storage unit. In this example, it is specifically equal to the starting address 128*1024*4 of sector 128, indicating that the storage space of the second main area of the serial storage unit has been used up, and the second backup area of the entire serial storage unit can be cleared. Similarly, when clearing the second backup area, each bit of each byte in the second backup area can usually be set to 1, that is, after the data is cleared, all bytes of data become 0xff.
[0084] Similarly, when DataAddr is equal to the next sector starting address of the first backup area of the data storage unit (the starting address 2033*1024*4 of sector 2033), DataAddr can be assigned to the first main area starting address of the data storage unit (the starting address 509*1024*4 of sector 509). At this time, it means that the storage space of the first backup area of the data storage unit has been used up, and the first main area of the entire data storage unit can be cleared, so that the medical data can be stored again from the first main area of the data storage unit.
[0085] Similarly, when NumberAddr is equal to the next sector starting address of the second backup area of the sequence storage unit (that is, the starting address 255*1024*4 of sector 255), NumberAddr can be assigned to the starting address of the second main area of the sequence storage unit (the starting address 1*1024*4 of sector 1). At this time, it means that the storage space of the second backup area of the sequence storage unit has been used up, and the entire second main area of the sequence storage unit can be cleared, so that the address data can be stored again from the second main area of the sequence storage unit.
[0086] In a specific embodiment of the present invention, it may also include:
[0087] receiving display instructions;
[0088] Starting from the current free address of the sequence number storage unit, read out the addresses stored in the sequence number storage unit in sequence in the reverse order of writing;
[0089] Based on the addresses stored in the read sequence number storage unit, read out the medical data corresponding to the addresses from the data storage unit;
[0090] Display each piece of medical data read.
[0091] Based on the above description of the data storage process, i.e., the data writing process, it can be seen that each piece of medical data is recorded in the data storage unit in order from old to new, and correspondingly, the address of each piece of medical data is also recorded in the sequence storage unit in order from old to new. Therefore, in this implementation, after receiving the display instruction, each address stored in the sequence storage unit is read out in order in the opposite order to that of writing, i.e., in order from new to old, and then based on the addresses stored in the read sequence storage unit, each piece of medical data is read out in order from new to old and then displayed.
[0092] In addition, it is understandable that in actual applications, due to the large number of medical data items, paging can be performed on the display interface, for example Figure 3 This is a schematic diagram of a display interface in a specific scenario. Each page can display 8 pieces of medical data. The following is an example of reading 8 pieces of medical data on page 1.
[0093] The 8 medical data on page 1 are the latest 8 medical data. They start from the current free address of the serial storage unit, that is, from the current NumberAddr, and read out the 8 addresses stored in the serial storage unit in sequence in the opposite order of writing. Each address occupies 4 bytes. In other words, when reading the first medical data, NumberAddr is reduced by 4, and then the 4 bytes of data of NumberAddr-4, NumberAddr-3, NumberAddr-2 and NumberAddr-1 are read. The 4 bytes of data read constitute 1 address, which is the first address of the latest medical data in the data storage unit. Therefore, based on this address, 24 bytes of data can be read in the data storage unit to obtain the first medical data on page 1.
[0094] And so on, after seven cycles, the seven addresses stored in the serial number storage unit can be read out in order from new to old, and then based on these seven addresses, seven pieces of medical data can be read out from the data storage unit in order, and a total of eight pieces of medical data on page 1 can be obtained.
[0095] The display interface may be provided with a page turning icon, and each time the next page is clicked, the page number increases by 1, and each time the previous page is clicked, the page number decreases by 1. The minimum page number may be set to 1, and if the home page is clicked, the page jumps to page 1. In addition, it is understood that when the page is turned to the last page, it means that all medical data in the data storage unit has been read out.
[0096] In a specific implementation of the present invention, when the second backup area is cleared, each bit of each byte in the second backup area is set to 1, and when the second main area is cleared, each bit of each byte in the second backup area is set to 1;
[0097] Accordingly, starting from the current free address of the sequence number storage unit, in the process of sequentially reading out the addresses stored in the sequence number storage unit in the reverse order of writing, when it is detected that all the bits of N consecutive bytes are 1, it is determined that all the addresses stored in the sequence number storage unit have been read;
[0098] Wherein, N is a positive integer, which represents the number of bytes occupied by a single address stored in the sequence number storage unit.
[0099] When clearing the second backup area or the second main area, this implementation method is to set each bit of each byte to 1, which is also a more commonly used implementation method in practical applications. Of course, in some cases, you can choose to set each bit of each byte to 0, which does not affect the implementation of the present invention. The same is true when clearing the first backup area or the first main area.
[0100] Furthermore, since this implementation method selects a scheme in which each bit of each byte is set to 1 when clearing, during the data reading process, that is, when executing the operation described in the above implementation method of "starting from the current free address of the sequence number storage unit, and reading out each address stored in the sequence number storage unit in sequence in the opposite order to that when writing", it can be understood that as the reading process proceeds, it will be detected that each bit of N consecutive bytes is 1, that is, it is detected that N bytes are all 0xff. Since N=4 in the above example, it will be detected that 4 consecutive bytes in the sequence number storage unit are all 0xff. At this time, it can be said that all addresses in the sequence number storage unit have been read.
[0101] It should be pointed out that when reading and displaying medical data, it is also possible to directly start from the current free address of the data storage unit, and read out the medical data stored in the data storage unit in sequence in the opposite order of writing. If such an operation is adopted, 24 bytes need to be judged each time, that is, by judging whether these 24 bytes are all 0xff, it is determined whether all the medical data stored in the data storage unit have been read. Such a solution will be less efficient. That is to say, in the implementation of the present application, starting from the current free address of the sequence number storage unit, in the opposite order of writing, each address stored in the sequence number storage unit is read out in sequence, so that each time it is only necessary to judge whether the N bytes read are all 0xff. In practical applications, the value of N is usually much lower than the number of bytes occupied by a single piece of medical data, so such an implementation effectively improves the reading efficiency.
[0102] In a specific embodiment of the present invention, it may also include:
[0103] Receive query instructions;
[0104] Starting from the current free address of the sequence number storage unit, read out the addresses stored in the sequence number storage unit in sequence in the reverse order of writing;
[0105] Based on the addresses stored in the read sequence number storage unit, the recorded medical data are sequentially read out from the data storage unit;
[0106] For any one of the read medical data, when the medical data meets the query condition carried in the query instruction, the address corresponding to the medical data stored in the sequence number storage unit is stored in the query storage unit;
[0107] Based on the addresses stored in the query storage unit, the corresponding medical data are read out from the data storage unit in sequence and displayed.
[0108] In this implementation, the query of medical data can also be supported. Similar to the reading process described in the above embodiment, when implementing the query, it is also necessary to start from the free address of the current serial storage unit, and read out the addresses stored in the serial storage unit in sequence in the opposite order to that when writing. Then, based on the addresses stored in the read serial storage unit, the recorded medical data can be read out from the data storage unit in sequence.
[0109] For each piece of medical data read out, it is necessary to compare it with the query condition carried in the query instruction. For example, in one scenario, the year, month and day are used as the query condition. When the year, month and day of a piece of medical data is consistent with the year, month and day of the query condition, it is determined that the medical data meets the query condition carried in the query instruction, and the 4-byte address corresponding to the medical data stored in the serial number storage unit can be stored in the query storage unit.
[0110] It can be seen that after each piece of medical data recorded in the data storage unit is read and the judgment of whether it meets the query conditions is completed, the addresses of all medical data that meet the query conditions are stored in the query storage unit, and then based on the addresses stored in the query storage unit, the corresponding pieces of medical data can be read out from the data storage unit in sequence and displayed.
[0111] In practical applications, a dedicated sector can be configured for querying storage units, for example Figure 2 In the case of, like the data storage unit and the serial number storage unit, the query storage unit is also configured with primary and backup areas, which are respectively called the third primary area of the query storage unit and the third backup area of the query storage unit. The third primary area and the third backup area are also used in a cyclic alternating manner, that is, when the space of the third primary area is exhausted, the third backup area is cleared and enabled, and when the space of the third backup area is exhausted, the third main area is cleared and enabled. Of course, in some cases, considering that as long as the allocated sector size is appropriate, the query storage unit usually does not run out of space, it is also possible not to divide the query storage unit into primary and backup areas, that is, each time starting from the first address of the query storage unit, using the space of the query storage unit to store the corresponding address, and after each query is completed, all data in the query storage unit is cleared, which is also more convenient in implementation.
[0112] In a specific embodiment of the present invention, it may also include:
[0113] When the query result deletion instruction is received, each address stored in the query storage unit is cleared.
[0114] In this implementation, deletion of query results is allowed, that is, when a query result deletion instruction sent by the user is received, it means that the user no longer needs to view the query results, so the addresses stored in the query storage unit can be cleared, and a blank can be displayed on the query result page of the display interface.
[0115] In a specific embodiment of the present invention, it may also include:
[0116] When receiving the full data deletion instruction, all data in the query storage unit, the data storage unit and the sequence number storage unit are cleared.
[0117] In this implementation, deletion of all data is allowed, that is, when a full data deletion instruction sent by the user is received, all data in the query storage unit, the data storage unit and the sequence number storage unit can be cleared.
[0118] In a specific embodiment of the present invention, it may also include:
[0119] When receiving a directional deletion instruction pointing to the target medical data, deleting the address corresponding to the target medical data stored in the sequence number storage unit, and determining each address to be moved in the sequence number storage unit;
[0120] The storage positions of the addresses to be moved are advanced one by one, so that after the advancement, the storage position of the first address to be moved is the position of the address originally used to store the target medical data;
[0121] Among them, each address to be moved represents each address whose generation time is earlier than the address of the target medical data among all the addresses stored in the serial number storage unit.
[0122] In this implementation, the user is supported to delete only a certain piece of medical data, which is called target medical data. When a directional deletion instruction pointing to the target medical data is received, in this implementation, the address corresponding to the target medical data stored in the sequence number storage unit can be determined, and then the address can be deleted.
[0123] There may be many specific implementation methods for determining the address corresponding to the target medical data stored in the serial number storage unit. For example, after the user clicks to delete the target medical data on the display interface, the address corresponding to the target medical data stored in the serial number storage unit can be determined through relevant programs based on the page number of the target medical data on the display interface and the position of the target medical data in the current page number, combined with the current NumberAddr. For example, in one of the above situations, the page numbers start from 1, and 8 medical data are displayed on 1 page, and for example, the target medical data is the second medical data on the second page. Based on this information, the address corresponding to the target medical data stored in the serial number storage unit can be obtained by calculating: NumberAddr-4×((a-1)×8)-4×b, where a represents the page number of the target medical data, and in this example, a takes a value of 2, and b represents the position of the target medical data in the current page number. Since the target medical data in this example is the second medical data on the second page, b takes a value of 2.
[0124] After determining the address of the target medical data stored in the serial number storage unit, since one address occupies 4 bytes, it is necessary to delete the 4 bytes occupied by the address, that is, delete the 4-byte address corresponding to the target medical data stored in the serial number storage unit.
[0125] After deletion, the storage locations of the addresses to be moved need to be moved forward one by one, so that after the forwarding, the storage location of the first address to be moved is the location of the address originally used to store the target medical data. For easy understanding, please refer to Figure 4 , which is a schematic diagram of the change of storage content in a sequence storage unit before and after deletion in one situation. Figure 4 In the example, a square represents 4 bytes of space. Figure 4 The area to the right of NumberAddr and to the left of a5 is not used, that is, these areas do not store addresses. Figure 4 a0 in the table represents the address of the latest medical data. After deleting the address of the target medical data, Figure 4 a1 to a5 in the figure are all addresses whose generation time is earlier than the address of the target medical data, that is, a1 to a5 are all addresses to be moved.
[0126] When moving, the storage positions of each address to be moved are moved forward one by one. Therefore, after the advancement, the storage position of the first address to be moved, that is, the storage position of a1, is the address position originally used to store the target medical data. Similarly, a2 is moved to the original position of a1, a3 is moved to the original position of a2, a4 is moved to the original position of a3, and a5 is moved to the original position of a4.
[0127] It can be seen that in this implementation, when performing the operation of deleting medical data, it is only necessary to delete the address corresponding to the medical data in the storage unit and adjust the storage position of the remaining addresses to be moved in the storage unit without operating the data content in the data storage unit. This is because the number of erase times of the sector is limited. This solution of only operating the serial number storage unit instead of directly operating the data storage unit can effectively improve the service life of the storage chip.
[0128] By applying the technical solution provided by the embodiment of the present invention, after the medical device completes the current medical treatment, a piece of medical data to be stored is generated based on the data collected during the current medical treatment, and then the medical data to be stored can be stored. Specifically, when storing, the current data storage unit free address and the current serial number storage unit free address can be determined, the data storage unit free address represents the first free address currently available for the data storage unit, and the serial number storage unit free address represents the first free address currently available for the serial number storage unit. After obtaining the current data storage unit free address, the medical data can be stored starting from the current data storage unit free address, and the current data storage unit free address can be stored starting from the current serial number storage unit free address, thereby effectively realizing the storage of the medical data to be stored. After the storage is completed, the data storage unit free address and the serial number storage unit free address can be updated. It can also be seen that, because a data storage unit and a serial number storage unit are set up when storing data in the solution of the present application, the data storage unit stores specific medical data, and the serial number storage unit stores the address of the corresponding medical data, so that when the data is subsequently read, it is possible to determine whether the reading is completed through the serial number storage unit, and when deleting data, it is sufficient to operate the serial number storage unit, which can effectively ensure the execution efficiency of these operations.
[0129] In summary, the solution of the present application can effectively store the medical data generated when using medical equipment, making it easy to view historical medical data. Moreover, since the data storage unit and the serial number storage unit are separately provided, the execution efficiency of subsequent operations such as data reading and data deletion is effectively guaranteed.
[0130] Corresponding to the above method embodiment, the embodiment of the present invention further provides a storage management system for medical data, which can be referenced in correspondence with the above.
[0131] See also Figure 5 FIG. 1 is a schematic diagram of a structure of a medical data storage management system in the present invention. The medical data storage management system may include:
[0132] The medical data generating module 501 is used to generate a piece of medical data to be stored based on the data collected during the medical treatment after the medical device completes the medical treatment;
[0133] The parameter determination module 502 is used to determine the current free address of the data storage unit and the current free address of the sequence number storage unit; wherein the free address of the data storage unit indicates the first free address currently available for the data storage unit, and the free address of the sequence number storage unit indicates the first free address currently available for the sequence number storage unit;
[0134] The writing module 503 is used to store the medical data starting from the current free address of the data storage unit, and to store the current free address of the data storage unit starting from the current free address of the sequence number storage unit;
[0135] The parameter updating module 504 is used to update the free addresses of the data storage unit and the free addresses of the sequence number storage unit after the storage is completed.
[0136] Corresponding to the above method and system embodiments, an embodiment of the present invention further provides a medical data storage management device, which may include:
[0137] Memory for storing computer programs;
[0138] A processor is used to execute a computer program to implement the steps of the medical data storage management method in any of the above embodiments.
[0139] It should also be noted that, in this application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0140] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0141] The present application uses specific examples to illustrate the principles and implementation methods of the present invention, and the description of the above embodiments is only used to help understand the technical solution and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A method for storing and managing medical data, characterized in that: include: After the medical device completes the medical treatment, a piece of medical data to be stored is generated based on the data collected during the medical treatment; Determine the current free address of the data storage unit and the current free address of the sequence number storage unit; wherein the free address of the data storage unit indicates the first free address of the data storage unit currently available, and the free address of the sequence number storage unit indicates the first free address of the sequence number storage unit currently available; Starting from the current free address of the data storage unit, the medical data is stored, and starting from the current free address of the sequence number storage unit, the current free address of the data storage unit is stored; After the storage is completed, the free address of the data storage unit and the free address of the sequence number storage unit are updated; Among them, one piece of medical data occupies a fixed byte of storage space; Also includes: Upon receiving a directional deletion instruction pointing to target medical data, deleting the address corresponding to the target medical data stored in the sequence number storage unit, and determining each address to be moved in the sequence number storage unit; The storage positions of the addresses to be moved are advanced one by one, so that after the advancement, the storage position of the first address to be moved is the position of the address originally used to store the target medical data; Among them, each of the addresses to be moved represents each address whose generation time is earlier than the address of the target medical data among all the addresses stored in the serial number storage unit.
2. The method for storing and managing medical data according to claim 1, characterized in that: A data storage unit and a sequence number storage unit are provided in the preset storage medium, the data storage unit includes a first main area and a first backup area, the first main area and the first backup area are used alternately in a cycle, when the first main area is used, the first main area is used in address order until the space of the first main area is exhausted, when the first backup area is used, the first backup area is used in address order until the space of the first backup area is exhausted; The sequence number storage unit includes a second main area and a second backup area, the second main area and the second backup area are used alternately in a cyclic manner, when the second main area is used, the second main area is used in address order until the space of the second main area is exhausted, and when the second backup area is used, the second backup area is used in address order until the space of the second backup area is exhausted; When the current free address of the data storage unit is the first address of the first backup area, clear and enable the first backup area, and when the current free address of the data storage unit is the first address of the first primary area, clear and enable the first primary area; When the current free address of the sequence number storage unit is the first address of the second backup area, the second backup area is cleared and enabled; when the current free address of the sequence number storage unit is the first address of the second main area, the second main area is cleared and enabled.
3. The method for storing and managing medical data according to claim 2, characterized in that: Also includes: receiving display instructions; Starting from the idle address of the current sequence number storage unit, read out the addresses stored in the sequence number storage unit in sequence in the reverse order of writing; Based on the addresses stored in the read sequence number storage unit, reading out the medical data corresponding to the addresses from the data storage unit; Display each piece of medical data read.
4. The method for storing and managing medical data according to claim 3, characterized in that: When the second backup area is cleared, each bit of the second backup area is set to 1; when the second main area is cleared, each bit of the second main area is set to 1; Accordingly, starting from the current free address of the sequence number storage unit, in the process of sequentially reading out the addresses stored in the sequence number storage unit in the reverse order of writing, when it is detected that each bit of N consecutive bytes is 1, it is determined that all the addresses stored in the sequence number storage unit have been read; Wherein, N is a positive integer, which represents the number of bytes occupied by a single address stored in the sequence number storage unit.
5. The method for storing and managing medical data according to claim 2, characterized in that: Also includes: Receive query instructions; Starting from the idle address of the current sequence number storage unit, read out the addresses stored in the sequence number storage unit in sequence in the reverse order of writing; Based on the addresses stored in the read sequence number storage unit, read out the recorded medical data in sequence from the data storage unit; For any one of the read medical data, when the medical data meets the query condition carried in the query instruction, the address corresponding to the medical data stored in the sequence number storage unit is stored in the query storage unit; Based on each address stored in the query storage unit, corresponding pieces of medical data are read out from the data storage unit in sequence and displayed.
6. The method for storing and managing medical data according to claim 5, characterized in that: Also includes: When a query result deletion instruction is received, each address stored in the query storage unit is cleared.
7. The method for storing and managing medical data according to claim 5, characterized in that: Also includes: When a full data deletion instruction is received, all data in the query storage unit, the data storage unit and the sequence number storage unit are cleared.
8. A storage management system for medical data, characterized in that: include: A medical data generation module, used to generate a piece of medical data to be stored based on the data collected during the medical treatment after the medical device completes the medical treatment; A parameter determination module, used to determine the current free address of the data storage unit and the current free address of the sequence number storage unit; wherein the free address of the data storage unit indicates the first free address currently available for the data storage unit, and the free address of the sequence number storage unit indicates the first free address currently available for the sequence number storage unit; A writing module, used to store the medical data starting from the current free address of the data storage unit, and to store the current free address of the data storage unit starting from the current free address of the sequence number storage unit; A parameter updating module, used for updating the free addresses of the data storage unit and the free addresses of the sequence number storage unit after the storage is completed; Among them, one piece of medical data occupies a fixed byte of storage space; Also includes: Upon receiving a directional deletion instruction pointing to target medical data, deleting the address corresponding to the target medical data stored in the sequence number storage unit, and determining each address to be moved in the sequence number storage unit; The storage positions of the addresses to be moved are advanced one by one, so that after the advancement, the storage position of the first address to be moved is the position of the address originally used to store the target medical data; Among them, each of the addresses to be moved represents each address whose generation time is earlier than the address of the target medical data among all the addresses stored in the serial number storage unit.
9. A medical data storage management device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the medical data storage management method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Data storage method
CN107704200A
Method for data storage management of micro-controller
CN108089821A