CN114822804B - Data storage method and device, computer equipment and storage medium - Google Patents

Data storage method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114822804B
CN114822804B CN202210756512.5A CN202210756512A CN114822804B CN 114822804 B CN114822804 B CN 114822804B CN 202210756512 A CN202210756512 A CN 202210756512A CN 114822804 B CN114822804 B CN 114822804B
Authority
CN
China
Prior art keywords
data
target
data table
data set
transaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210756512.5A
Other languages
Chinese (zh)
Other versions
CN114822804A (en
Inventor
程昌南
余顺周
容争来
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Core Medical Technology Co Ltd
Original Assignee
Shenzhen Core Medical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=82523024&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=CN114822804(B) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Shenzhen Core Medical Technology Co Ltd filed Critical Shenzhen Core Medical Technology Co Ltd
Priority to CN202210756512.5A priority Critical patent/CN114822804B/en
Publication of CN114822804A publication Critical patent/CN114822804A/en
Application granted granted Critical
Publication of CN114822804B publication Critical patent/CN114822804B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H40/00ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices
    • G16H40/60ICT specially adapted for the management or administration of healthcare resources or facilities; ICT specially adapted for the management or operation of medical equipment or devices for the operation of medical equipment or devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Epidemiology (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Public Health (AREA)
  • Primary Health Care (AREA)
  • General Business, Economics & Management (AREA)
  • Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data storage method, a data storage device, computer equipment and a storage medium. The method comprises the following steps: caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by a ventricular assist device in a preset period; when the data volume of the first operation data set cached in the temporary cache space reaches a target quantity, determining a target data table from a target storage space, wherein the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set; and writing the first operation data set in the temporary cache space into the target data table. By adopting the method, the storage efficiency can be improved.

Description

Data storage method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data storage method and apparatus, a computer device, and a storage medium.
Background
The ventricular assist device is an artificial mechanical device which leads blood out of a venous system or a heart and directly pumps the blood into an arterial system to partially or completely replace the ventricles to do work, and provides sufficient blood supply power for patients suffering from heart problems. In order to ensure stable operation of the ventricular assist device, real-time monitoring of the operating state of the ventricular assist device is required. The ventricle auxiliary device can send the real-time collected operation data to the monitor for displaying and analyzing, so that the operation state of the blood pump can be mastered in real time by looking at the monitor. The monitor also stores recent operating data of the ventricular assist device for later analysis.
Because the ventricular assist device has a high acquisition frequency and a large data volume of acquired operating data, a large amount of CPU (Central Processing Unit) resources are occupied by storage operations, and the data storage efficiency is low.
Disclosure of Invention
In view of the above, it is necessary to provide a data storage method, an apparatus, a computer device and a storage medium capable of improving storage efficiency.
In a first aspect, the present application provides a data storage method, including:
caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by a ventricular assist device in a preset period;
when the data volume of the first operation data set cached in the temporary cache space reaches a target quantity, determining a target data table from a target storage space, wherein the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set;
and writing the first operation data set in the temporary cache space into the target data table.
In a second aspect, the present application also provides a data storage device comprising:
the cache module is used for caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by the ventricular assist device in a preset period;
a determining module, configured to determine a target data table from a target storage space when a data amount of the first operating data set cached in the temporary cache space reaches a target amount, where the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table storing a second operating data set, and a collection time of the second operating data set is shorter than a collection time of the first operating data set;
and the writing module is used for writing the first operation data set in the temporary cache space into the target data table.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by a ventricular assist device in a preset period; when the data volume of the first operation data set cached in the temporary cache space reaches a target quantity, determining a target data table from a target storage space, wherein the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set; and writing the first operation data set in the temporary cache space into the target data table.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by a ventricular assist device in a preset period; when the data volume of the first operation data set cached in the temporary cache space reaches a target quantity, determining a target data table from a target storage space, wherein the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set; and writing the first operation data set in the temporary cache space into the target data table.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by a ventricular assist device in a preset period; when the data volume of the first operation data set cached in the temporary cache space reaches a target quantity, determining a target data table from a target storage space, wherein the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set; and writing the first operation data set in the temporary cache space into the target data table.
According to the data storage method, a first operation data set composed of operation data sent by the ventricular assist device in a preset period is cached in a temporary cache space, when the data volume of the first operation data set cached in the temporary cache space reaches a target number, a target data table is determined from the target storage space, and the first operation data set in the temporary cache space is written into the target data table. Therefore, the writing frequency of the target storage space can be reduced, the CPU resource occupied by the writing operation is reduced, and the storage efficiency is improved. In addition, the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set. That is, the target storage space has a plurality of historical data tables, and the first operating data is written into the plurality of historical data tables respectively, so that the data written into each historical data table is not very large, the time for opening the target data table is shortened, the writing time of the operating data is shortened, and the storage efficiency of the operating data is further improved.
Drawings
FIG. 1 is a diagram illustrating an internal structure of a computer device according to an embodiment;
FIG. 2 is a schematic diagram of a ventricular assist system in one embodiment;
FIG. 3 is a schematic diagram of the internal structure of the controller according to one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating a data storage method in one embodiment;
FIG. 5 is a flow diagram that illustrates a method for determining a target data table, according to one embodiment;
FIG. 6 is a schematic diagram of collecting and writing operational data in one embodiment;
FIG. 7 is a diagram of content fields in one embodiment;
FIG. 8 is a flow diagram of a method for classifying a first data run set in one embodiment;
FIG. 9 is a schematic illustration of classifying a first operational data set in one embodiment;
FIG. 10 is a schematic flow chart diagram illustrating a method for filtering a first data set to obtain a second data set in one embodiment;
FIG. 11 is a block diagram of a data storage device in one embodiment;
fig. 12 is a block diagram showing the structure of a data storage device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Illustratively, as shown in fig. 1, a computer apparatus of the present application includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory and the input/output interface are connected by a system bus, and the communication interface, the display unit and the input device are connected by the input/output interface to the system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The input/output interface of the computer device is used for exchanging information between the processor and an external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data storage method. The display unit of the computer equipment is used for forming a visual and visible picture, and can be a display screen, a projection device or a virtual reality imaging device, the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
Wherein the computer device may be, but is not limited to, various medical accessories, personal computers, laptops, smart phones, tablets, or portable wearable devices. The medical auxiliary device may be an interventional ventricular auxiliary device, an implantable ventricular auxiliary device, an external ventricular auxiliary device, etc. for PCI (Percutaneous Coronary Intervention) surgical protection, and the portable wearable device may be a smart watch, a smart band, a head-mounted device, etc.
For example, the data storage method provided by the embodiment of the present application may be applied to a ventricular assist system as shown in fig. 2, where the ventricular assist system includes a ventricular assist device implanted in a human body and a controller outside the human body. As shown in fig. 3, the controller includes a display device, a system board for performing human-computer interaction control and monitoring system operation, a main control board for performing information interaction between the system board and the blood pump driving board, a driving board for driving the ventricular assist device to operate, a flushing liquid driving board for controlling flushing liquid operation, and a built-in battery for supplying power to the controller.
In the operation process of the ventricular assist device, the controller displays daily operation data acquired by the ventricular assist device in real time and data sent by the ventricular assist device in interaction with the controller on a display screen, so that the operation state of the ventricular assist device is monitored, and meanwhile, the controller can write the operation data into a database for storage. The database is a warehouse that organizes, stores, and manages data according to a data structure, and may be any relational database that stores data in the form of a data table that includes a plurality of rows and columns, one record for each row. The database may be a database deployed in the memory of the controller, or may be a database deployed on a cloud or a network server, which is not limited in the embodiment of the present application.
Specifically, as shown in fig. 2, the controller 202 receives the operation data sent by the ventricular assist device 204 in real time, and buffers the operation data into a buffer space on a system board of the controller; when the data volume of the operation data cached in the cache space on the system board reaches a target value, the controller selects a target data table from the historical data tables of the database 206; and then writing the operation data cached in the cache space on the system board into a target data table for storage.
According to the scheme, the operating data of the ventricular assist device is firstly cached in the cache space on the system board, and when the data volume of the cached operating data reaches the target value, the operating data is uniformly written into the target data table for storage, so that frequent operation on the database is reduced, CPU (central processing unit) resources occupied by storage operation are reduced, and the storage efficiency is improved.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 4, fig. 4 is a flowchart illustrating a data storage method according to an embodiment of the present application, applied to the ventricular assist system shown in fig. 2. As shown in fig. 4, the method includes the steps of:
s402, caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by the ventricular assist device in a preset period.
In the embodiment of the application, the ventricular assist device can be a blood pump in medical assist equipment, the blood pump is implanted in a human body and runs at a high speed in the human body, and the controller monitors the running state of the blood pump by receiving running data of the blood pump. Because the data communication between the controller and the blood pump needs to meet the requirements of high real-time performance and high safety, the controller and the blood pump perform data interaction through a customized communication protocol, wherein one transaction represents one transmission between the ventricular assist device and the controller and all interactions related to the transmission.
The operating data in the present application may represent data carried by different transmission transactions of the ventricular assist device, where the transmission transactions include at least one sub-transaction, and the transmission transactions include at least one of the following: pump control transactions, real-time clock transactions, controller command transactions, real-time status transactions, non-real-time status acquisition transactions, patient configuration transactions, log read transactions, authentication transactions, and power state transactions. Specifically, the data may include data for displaying daily log reading transactions (such as rotational speed, power, flow rate, pressure, etc.) of the ventricular assist device and interaction data of the ventricular assist device with the controller (such as pump control transactions, real-time clock transactions, non-real-time status acquisition transactions, patient configuration transactions, data carried by authentication transactions, etc.). The first operational data set may include data for a plurality of daily operational log read transactions sent by the ventricular assist device and/or interaction data with the controller.
The temporary cache space is a storage space for temporarily storing the operation data. When the first operation data is collected, in order to avoid frequently accessing and calling the database, the first operation data can be stored in the temporary cache space, and then the operation data in the temporary cache space can be written into the database at one time, so that the access frequency of the database can be reduced, the CPU resource occupied by the writing operation is reduced, and the data storage efficiency is improved.
In one embodiment, the temporary buffer space may be a buffer area of a CPU in the controller system board, and the CPU may directly address the temporary buffer space, so that the data Access speed of the temporary buffer space is higher than that of a general RAM (Random Access Memory).
In another embodiment, the temporary buffer space may be a DDR SDRAM (Double Data Rate Synchronous Random Access Memory), which is an SDRAM with Double Data transmission Rate, and the Data transmission Rate is twice the system clock frequency, and the performance is better than the conventional SDRAM.
In one embodiment, S402 specifically includes: the ventricular assist device collects operation data in real time during operation and sends the operation data to the controller for displaying and storing, and a system board in the controller receives the operation data collected by the ventricular assist device and then displays the operation data on a display screen and stores the operation data in a database. The collected operational data includes rotational speed, power, flow rate of the ventricular assist device, and pressure, speed, or flow rate of the irrigation fluid element.
In one embodiment, S402 specifically includes: the ventricular assist device collects first operation data according to a preset collection frequency in a preset period, and the controller caches a first operation data set formed by the first operation data in a temporary cache space. For example, the ventricular assist device acquires the first operating data at a preset acquisition frequency of 30 times per second over a preset period of 9:00 to 10: 00. Still alternatively, the ventricular assist device acquires first operational data at an acquisition frequency of every 30 ms.
S404, when the data volume of the first operation data set cached in the temporary cache space reaches a target quantity, determining a target data table from the target storage space, wherein the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set.
The target quantity may be a preset quantity preset for measuring the size of the data volume of the running data, for example, the target quantity may be a data volume corresponding to 3 kilobits, or may also be a data volume of 256 records, which is not limited in this embodiment of the application.
The target storage space is a storage space for persistent storage, and may be a storage space in a database, such as a hard disk or Flash in a system board, which may be used to store data in the form of a database, where the database may be a relational database. Due to the fact that the storage capacity of the temporary cache space is small, the first operation data set cached in the temporary cache space is written into the target storage space, and data loss caused by the fact that the data amount stored in the temporary cache space exceeds the capacity limit can be avoided. Moreover, data loss can not be caused even if power is cut off, and the safety of data is ensured.
The target data table is a data table in the target storage space, and may be a first data table newly created when the data amount of the first operation data set reaches the target data amount, or may be a second data table existing before the collection of the first operation data is started. The second data table is a historical data table storing a second operational data set that was collected earlier in time than the first operational data set.
Specifically, the ventricular assist device collects operation data in real time during operation, then caches the collected operation data in a temporary storage space, and writes the cached operation data into a historical data table of the target storage space when the cached operation data in the temporary storage space reach a target number. In order to avoid the reduction of data storage efficiency, when a certain amount of data is written in the historical data table, a new data table is created in the target storage space, and the later collected operation data is stored in the newly created data table. The second data table is a historical data table storing a second operational data set that was collected earlier in time than the first operational data set. The amount of data stored in the second data table may have reached the maximum storage limit or the amount of data stored in the second data table may not have reached the maximum storage limit.
In one embodiment, the second data table may be a data table that was created at the latest time among the historical data tables that have been created before the collection of the first operational data set was started; or may be a data table with the smallest data amount among the created history data tables, or the like.
For example, when the data amount of the first running data set cached in the temporary cache space reaches the target amount, the creation time of each historical data table in the target storage space is obtained, and the target data table is selected from the historical data tables according to the creation time. The selected target data table may be a historical data table whose creation time is closest to the current time.
For example, when the data amount of the collected operation data reaches a target value, the stored data amount of each historical data table in the database is acquired, and a target data table is selected from the historical data tables according to the stored data amount. The selected target data table may be a history data table storing the smallest amount of data.
And S208, writing the first operation data set in the temporary cache space into the target data table.
And when the data volume of the first operation data set cached in the temporary cache space reaches the target number, determining a target data table from the target storage space, and writing the first operation data set in the temporary cache space into the target data table.
In the above embodiment, the first operating data set composed of the operating data sent by the ventricular assist device in the preset period is cached in the temporary cache space, and when the data amount of the first operating data set cached in the temporary cache space reaches the target amount, the target data table is determined from the target storage space, and the first operating data set in the temporary cache space is written into the target data table. Therefore, the writing frequency of the target storage space can be reduced, the CPU resource occupied by the writing operation is reduced, and the storage efficiency is improved. In addition, the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set. That is, the target storage space has a plurality of historical data tables, and the first operating data is written into the plurality of historical data tables respectively, so that the data written into each historical data table is not very large, the time for opening the target data table is shortened, the writing time of the operating data is shortened, and the storage efficiency of the operating data is further improved.
In one embodiment, S404 specifically includes: acquiring the number of records of the data records in the second data table; if the number of the records is larger than the number threshold value, creating a first data table, and determining the first data table as a target data table; otherwise, the second data table is determined as the target data table.
The data record is a row of data in the data table, and may include data of a plurality of fields. For example, a data record may include data for multiple fields of speed, timestamp, power, etc. For example, the computer device may Query the number of records of the data record in the second data table through a database Query Language, for example, the terminal may Query the database for the number of records of the data record in the second data table through an SQL (Structured Query Language) Query Language.
Specifically, if the number of records of the data records in the second data table is greater than the number threshold, it is indicated that the amount of data stored in the second data table is large, the speed of reading and writing the second data table is slow, the first data table is created in the target storage space, and the first data table is determined as the target data table, so that the first operating data can be written into the first data table. Because the first data table is a newly created data table, the reading and writing speed of the first data table is high, and the storage efficiency of the running data is improved. If the number of the data records in the second data table is smaller than or equal to the number threshold, the data amount stored in the second data table is small, the reading and writing speed of the second data table is high, in order to avoid fragmentation of a storage space caused by frequently creating the data table, the second data table is determined as a target data table, and the first operation data is stored in the second data table. For example, the number of records of the data records in the second data table i is L, whether L is greater than a number threshold P is judged, if L > P, a first data table i +1 is created, and the first data table i +1 is determined as a target data table; and if L < = P, determining the second data table as the target data table.
In the above embodiment, the number of records of the data records in the second data table is greater than the number threshold, the first data table is created, and the first data table is determined as the target data table; otherwise, the second data table is determined as the target data table. Therefore, when the reading and writing speed of the second data table is reduced, the first data table can be established for data storage, and the data storage efficiency is improved. And the fragmentation of the storage space caused by frequently creating the data table can be avoided, and the storage space is saved.
In one embodiment, as shown in fig. 5, S404 specifically includes the following steps:
s502, calculating a first time length, wherein the first time length is the time length required for collecting the first operation data sets of the target number.
Wherein the first duration is a duration required to collect a target number of the first operational data sets. For example, the first time period is a time period required to collect 256 pieces of the first operation data. As another example, the first duration may be a duration required to collect 3 kilobits of the first operational data.
In one embodiment, the ventricular assist device acquires operational data at preset acquisition time intervals, at equal intervals. The controller may set the acquisition time interval. Acquiring the acquisition time interval of the first operation data and the acquisition times when the target data is reached, and calculating the product of the acquisition time interval and the acquisition times to obtain a first time length. For example, a ventricular assist device acquires operational data every 30ms to obtain a data record, and 256 data records require a duration of 7.68 seconds to acquire.
S504, a second time length is obtained according to the second data table, and the second time length is the time length required for writing the first operation data set in the temporary cache space into the second data table.
The larger the amount of data in the second data table, the longer the time required to write the first operational data into the second data table, and the computer device may estimate the second time based on the size of the second data table. Alternatively, the computer device may obtain the second duration according to an attribute of the database.
S506, if the first time length is less than or equal to the second time length, creating a first data table, and determining the first data table as a target data table; otherwise, the second data table is determined as the target data table.
If the first time length is less than or equal to the second time length, the time length required for writing the first operation data in the second data table cannot meet the requirement for storing the first operation data, and a new data table needs to be created for data storage. Specifically, as shown in fig. 6, when 256 data acquisitions are completed, a first operation data set including 256 pieces of operation data is obtained, and then the first operation data set is stored in the target storage space. And continuously acquiring the operation data while storing the operation data in the first operation data set into the target storage space, if the second time length is longer than the first time length, when the acquisition of 256 pieces of operation data is completed again, the first operation data set cannot be stored into the second data table, the writing speed of the second data table cannot meet the data storage requirement, and the first data table needs to be created. For example, the acquisition time interval of the operation data is N, when M items of operation data are cached in the temporary storage space, a second time length T required for writing the M items of operation data into the second data table is obtained, if N × M < = T, a first data table i +1 is created, and the M items of operation data are written into the first data table i + 1; if N M > T, M items of operation data are written into a second data table i. For example, N =30ms, M =256, if the time for writing M pieces of operation data into the second data table is greater than or equal to 7.68s, the first data table is created, and the storage address of the operation data is changed to the first address of the first data table.
In the above embodiment, the first time length required for acquiring the target number of first operation data sets is calculated to obtain the second time length required for writing the first operation data sets in the temporary cache space into the second data table, and if the first time length is less than or equal to the second time length, the first data table is created and determined as the target data table; otherwise, the second data table is determined as the target data table. Therefore, the first data table can be created when the writing time corresponding to the target data table is too long, so that the data storage requirement is met, the data loss is avoided, and the data storage efficiency is improved. And fragmentation of the storage space can be avoided, and the storage space is saved.
In one embodiment, S404 specifically includes: acquiring a pre-configured data table creating period; determining the creation time of the data table according to the creation period of the data table; if the data table creation time is up, creating a first data table, and determining the first data table as a target data table; otherwise, the second data table is determined as the target data table.
The data table creating period is a time period for creating a data table in the target storage space, and may be a day, a week, or 12 hours. The data table creation time is determined according to the data table creation period, for example, when the data table creation period is one day, the data table creation time may be 8:00 or 12:00 of each day, or the like. When the data table creation time arrives, a first data table is created in the database. For example, when 8:00 arrives each day, a first data table is created in the target storage space.
In one embodiment, S406 specifically includes: if the system board is in a starting state, writing the first operation data set in the temporary cache space into the target data table through the system board; if the system board is in a closed state, storing the first operation data set into a storage area of the main control board; and after the system board is started, sending the first operation data set in the storage area of the main control board to the system board, and storing the first operation data set in the target data table through the system board.
The system board is a circuit board integrated with a main circuit system in the terminal and used for performing human-computer interaction control and monitoring system operation. The main control board is a circuit board used for transmitting interactive information between the system board and the driving board. Specifically, when the system board is in a start state, the operation data is stored in the target data table by the system board. When the system board is in a closed state, in order to avoid data loss caused by shutdown of the system board, the operation data is stored in the storage area on the main control board, when the system board is restarted, the operation data stored on the main control board is sent to the system board, and the operation data is stored in the target data table through the system board.
In the above embodiment, if the system board is in the starting state, the operating data is stored in the target data table through the system board; if the system board is in a closed state, storing the operation data into a storage area of the main control board; when the system board is started, the operation data in the storage area of the main control board is sent to the system board, and the operation data is stored in the target data table through the system board. Therefore, data loss caused by shutdown of the system board is avoided, and the safety of data storage is improved.
In one embodiment, S406 further includes before: acquiring metadata corresponding to the operation data in the first operation data set; encrypting the metadata to obtain encrypted data; after S406, further comprising: and storing the encrypted data to the cloud.
The metadata is data for describing attributes of the operation data, and includes the number of fields, field identifiers, data types, and the like of the operation data. After the operation data is obtained, the operation data is stored according to the data structure of the relational database, and before the operation data is stored in the database, the metadata of the operation data is generated so as to describe the operation data through the metadata of the operation data. In order to ensure the security of the metadata, the metadata is encrypted before being stored in the cloud.
In one embodiment, S406 further includes: in response to the query instruction, querying target operation data in a target data table; acquiring metadata of target operation data from a cloud; verifying the target operation data according to the metadata to obtain a verification result; if the verification result is that the target operation data passes, displaying the target operation data; and if the verification result is that the verification result does not pass, generating and displaying prompt information.
The query instruction is an instruction for querying the operation data, and may be an instruction triggered by the database. After the operation data is stored in the database, the terminal can query the operation data stored in the database through a query instruction. When the target operation data is inquired, the terminal acquires metadata of the target operation data from the cloud in order to check whether the operation data is wrong. And then, verifying the target operation data according to the metadata, wherein the metadata acquired by the terminal comprises the field number, the field identification or the data type of the target operation data, for example. And then verifying whether the field number, the field identification or the data type of the target operation data are consistent with the metadata. If the two are consistent, the verification result is passed; if not, the verification result is failed. If the verification result is that the target operation data passes, displaying the target operation data on a display screen; and if the verification result is that the operation data does not pass the verification result, generating and displaying prompt information to prompt a user that the operation data is wrong in the storage process.
In the above embodiment, the terminal obtains the metadata corresponding to the operation data, and stores the encrypted metadata to the cloud. And when the target operation data is inquired in the operation data stored in the database, verifying the target operation data according to the metadata acquired from the cloud. And when the verification result is that the target operation data passes, displaying the target operation data. Therefore, the queried operation data can be verified according to the metadata stored in the cloud, and the accuracy of the query result is ensured.
In one embodiment, the first data in the first set of operating data includes a first field and a second field, the first field to indicate a transmission type of the first data; the second field is used for indicating a transaction identifier of the first data, the transaction identifier is used for defining the function and/or operation data of a transaction in the ventricular assist device, the first data is any data in the first operation data set, the transmission types comprise a bidirectional data transmission type and a sending-only transmission type, the bidirectional data transmission type comprises a sending data type and a receiving data type, and the sending-only transmission type comprises the sending data type.
The first data may be data carried by different transmission transactions of the ventricular assist device. The transfer transactions include log read transactions for displaying daily operation of the ventricular assist device and transactions for data interaction of the ventricular assist device with the controller. Specifically, the data may include data for displaying daily log reading transactions (such as rotational speed, power, flow rate, pressure, etc.) of the ventricular assist device and interaction data of the ventricular assist device with the controller (such as pump control transactions, real-time clock transactions, non-real-time status acquisition transactions, patient configuration transactions, data carried by authentication transactions, etc.).
For example, after receiving first data in a first operating data set sent by a ventricular assist device, a target data type of the first data corresponding to a target first value and a target second value, which triggers a transmission transaction, may also be determined according to a preset mapping relationship between the transaction and the first value and the second value, where the target data type is the sending data type and/or the receiving data type, the target first value is a value of the first field, and the target second value is a value of the second field; determining a target data structure corresponding to the target data type according to a mapping relation between a predefined data type and the data structure; and reading the operation data of the ventricular assist device carried by the first data according to the target data structure.
The first value and the second value corresponding to each transmission transaction can be predefined by the user for the ventricular assist device, that is, the content field of each transmission data is predefined, and the content field comprises the first field and the second field. The first field is used to indicate a transmission type of the first data. The transmission type is used for representing a data interaction mode between the ventricular assist device and the controller, and comprises bidirectional data transmission (TxRx) and unidirectional transmission (TxOnly). Bidirectional data transmission is a transmission type of interactive data for transmitting an expected response, and includes transmitting confirmation data (data is transmitted, no data is received), requesting data from a receiving end (data is transmitted, data is received), exchanging data (data is both transmitted and received), and transmitting a command (no data is both transmitted and received). The one-way transmission is a transmission type for transmitting interactive data for which a response is not expected. The second field is used to indicate a transaction identification of the first data, the transaction identification being used to define functional and/or operational data of a transaction in the ventricular assist device. For example, as shown in fig. 7, the transaction identifier defining the pump speed setting sub-transaction in the content field of the pump speed setting sub-transaction under the pump control transaction is 1, and the transmission type is bidirectional data transmission (TxRx). The controller can obtain a transmission transaction and a transmission type corresponding to the first data by reading the values of the first field and the second field, and further determine the data type of the first data according to the transmission transaction and the transmission type. And then determining a corresponding data structure of the first data according to the data and the data format defined by each predefined data type, so as to read the data carried by the first data in the first data.
Illustratively, there is a multi-packet transmission between the ventricular assist device and the controller, and therefore the first data further includes a third field for indicating a sequence number of the first data; the controller also arranges the first data in the first operation data set in ascending order according to the sequence number according to the third field. In one embodiment, as shown in fig. 8, the following steps are further included after S402:
s802, classifying the first operation data sets in the temporary cache space according to the transaction identifiers to obtain n first data sets, wherein each first data set corresponds to one transmission transaction, and n is a positive integer greater than 1.
Since the first data in the first operating data set may be data carried by different transmission transactions of the ventricular assist device. And the second field in the first data is used for indicating the transaction identifier of the first data, the first data in the first operation data is classified according to the transaction identifier, and the first data of each category form a corresponding first data set. Each first data set corresponds to a transmission transaction, and the first data in the first data sets have the same transaction identification. Specifically, as shown in fig. 9, the first running data set in the temporary cache space is divided into n categories of first data sets according to the transaction identifier.
S804, respectively obtaining target priority and a target key set corresponding to the n first data sets according to the transaction identifier and the transmission type, wherein the target key set comprises at least one keyword.
The target priority is used to define the storage priority of the operation data, and may be represented by words, numbers, characters, or letters. For example, the target priority may include one level, two levels, three levels, etc.; or the target priority can also comprise A level, B level and C level; or the target priority may also include class a, class b, class c, etc. Because the first data in the first operating data set may be data carried by different transmission transactions of the ventricular assist device, the importance degrees of the different transmission transactions are different, and the data carried by the transmission transaction with the high importance degree is relatively important and needs to be stored preferentially, the target priority corresponding to the first data set may be determined according to the transaction identifier and the transmission type. For example, for a pump control transaction for controlling the operation of a pump, which directly affects the operation of the ventricular assist device, when data of the pump control transaction is abnormal, the operation of the ventricular assist device may be abnormal, and thus the priority of the pump control transaction may be set to one level; for the non-real-time state acquisition transaction used for transmitting the information (such as version) built in the system, when the data is abnormal, the operation of the ventricular assist device is not influenced, so that the priority of the non-real-time state acquisition transaction can be set to three levels.
The target key set is a set including at least one keyword, and can be set according to user requirements. The keywords contained in the target key set may be used to describe the first data in the first data set or to represent characteristics or attributes of the first data. For example, the target key set key includes a speed, power, or time stamp, etc. Because the data included in the first data set may be determined according to the transaction identifier and the transmission type, for example, if the transaction corresponding to the transaction identifier is a log reading transaction, the transmission type is bidirectional data transmission, and because the data carried by the log reading transaction includes a rotation speed, a power, a flow rate, a pressure, or the like, a target key set of the first data set corresponding to the log reading transaction may be set to a set including one or more keys in "rotation speed, power, a flow rate, a pressure.
S806, screening the n first data sets respectively according to the target key set to obtain m second data sets, wherein m is smaller than or equal to n.
Since the operating data in the first data set records the operating conditions of the ventricular assist device, for example, the rotational speed, power or voltage of the ventricular assist device. And screening the n first data sets according to the target key set to obtain a second data set matched with the key words in the target key set, so that the screened second data set can be subjected to persistent storage. In filtering the first data set, the first data set may be matched to one or more keywords in the target keyword set. For example, the target key set comprises a key word "rotating speed", and the first data set is screened according to the key word "rotating speed", so that a second data set with the rotating speed within the rotating speed range is obtained. For example, the target key set includes the key words "voltage" and "timestamp", and the first data set is filtered according to the "voltage" and the "timestamp" to obtain a second data set which is acquired at the time determined by the timestamp and has the voltage within the voltage range.
And S808, determining a target storage mode of each second data set according to the target priority.
The target storage mode is used for defining the storage place, the storage effective time, the storage medium, the data storage format and the like of the second data set. The storage location may be, for example, local, a designated server, a storage block in a block chain, a cloud, or the like.
In one embodiment, S808 specifically includes: and determining the corresponding relation between the priority and the storage mode, and determining the corresponding target storage mode according to the target priority of each second data set according to the corresponding relation. For example, the correspondence between the priority and the storage method is shown in table 1, and if the target priority corresponding to the second data set is one level, it is determined that the target storage method of the second data set is the first storage method.
TABLE 1
Priority level Storage mode
First stage Storage mode one (storage place: local; storage time: one month; DBF format)
Second stage Storage mode two (storage place: server; storage time: six months; JSON format)
Three-stage Storage mode three (storage place: cloud, storage time: two years; JSON format)
And S810, respectively storing the m second data sets according to the target storage mode.
The computer device stores the m second data sets respectively according to the target storage mode, and the storage modes of the m second data sets can be the same or different. For example, 3 of the m second data sets are stored according to the first storage method, four data sets are stored according to the second storage method, and the like.
In the above embodiment, the first operating data set in the temporary cache space is classified according to the transaction identifier, so that the first operating data set is divided into a plurality of first data sets according to the importance degree of the transmission transaction, and thus each data set can be stored according to the importance degree of the data. And screening the first data set according to the target key set, selecting a second data set matched with the key words in the target key set, then determining a target storage mode of each second data set according to the target priority, and respectively storing the second data sets according to the target storage modes. The classified storage of the second data set is realized, and the data storage efficiency is improved.
In one embodiment, as shown in fig. 10, S806 specifically includes the following steps:
s1002, respectively matching data in a first data set i with at least one keyword to obtain an intermediate data set, wherein the intermediate data set comprises a plurality of pieces of first data, the first data set i is any one of n first data sets, and i is a positive integer.
The data in the first data set may be data carried by various types of transmission transactions between the ventricular assist device and the controller, the data carried matching one or more keywords in the target keyword set. For example, the data "300 rpm" in the first data set i matches the keyword "speed of rotation"; as another example, the data "5 kilowatts" in the first data set i matches the keyword "power"; as another example, data "2022-01-15 in the first data set i; 19:00: 05; 220V "matches the timestamp and voltage.
S1004, acquiring a preset value and a preset mean square error corresponding to at least one keyword.
The preset value and the preset mean square error are values set according to the running condition of the ventricular assist device in a normal running state, or values of running parameters of the ventricular assist device set by a user, for example, the user sets the rotating speed of the ventricular assist device to be 2500 rpm/s and the power to be 5 kilowatts through a controller or a monitor. For example, the preset value may be an average value of the operation data corresponding to the keyword within a preset time; the preset mean square error may be a mean square error of the running data corresponding to the keyword within a preset time. For example, the preset value corresponding to the keyword "rotation speed" may be 2500 rpm, and the preset mean square error may be 3.
S1006, calculating a first difference value, wherein the first difference value is a difference value between the mean square error of the intermediate data set and a preset mean square error.
Wherein the controller may calculate a first difference according to equation (1), where d is the first difference, S is the mean square error of the intermediate data set,
Figure 473510DEST_PATH_IMAGE002
in order to set the mean square error to be preset,
Figure 178161DEST_PATH_IMAGE004
for the ith data in the intermediate data set,
Figure 720000DEST_PATH_IMAGE006
is the average of all data in the intermediate data set, and n is the number of data in the intermediate data set.
Figure 219115DEST_PATH_IMAGE008
(1)
And S1008, determining a target adjustment factor corresponding to the first difference according to the mapping relation between the differences and the adjustment factors.
The controller may pre-store a mapping relationship between a preset difference and an adjustment factor, where the adjustment factor is used to determine an adjustment range of the difference, and the adjustment range may be an integer, a fraction, a decimal, a percentage, or the like. The fluctuation of the ventricular assist device in the operation process can be obtained by calculating the first difference, and then the error influence caused by the fluctuation can be reduced according to the adjusting factor, so that the fault occurring in the operation process of the ventricular assist device can be more accurately judged according to the operation data. For example, the adjustment factor may be 3, or the adjustment factor may be 0.7, or the adjustment factor may be 30%, or the like. The difference value and the adjustment factor have a definite mapping relationship, for example, as shown in table 2, when the difference value is 0-10, the adjustment factor is 5; when the difference is 10-50, the adjusting factor is 30; when the difference is 50-100, the adjustment factor is 60. If the first difference is 40, the target adjustment factor corresponding to the first difference may be determined to be 30.
TABLE 2
Figure 315247DEST_PATH_IMAGE010
And S1010, adjusting the preset value according to the target adjusting factor to obtain a target value.
The target value is a value at which the operating parameter of the ventricular assist device normally operates under a preset condition, for example, the rotation speed should be 2800RPM under the conditions of a flow rate of 4L/min and a differential pressure of 40 mmHg.
In one embodiment, S1010 specifically includes: increasing the preset value according to the target adjusting factor to obtain a target value; or reducing the preset value according to the target adjusting factor to obtain a target value; or multiplying the preset value according to the target adjusting factor to obtain a target value and the like.
S1012, a target deviation degree between each first data in the intermediate data set and the target value is determined.
Wherein the target deviation measure is used to measure the extent to which the first data deviates from the target value. For example, the target deviation may be linearly related to the difference between the first data and the target value. For another example, the target deviation degree may be a logarithm of a difference between the first data and the target value, or the like.
S1014, screening the first data with the target deviation degree within a preset range to a second data set.
Through screening the first data according to the preset range, the data meeting the user requirements can be screened from the first data to be stored, so that the data meeting the user requirements can be backed up, the data volume of storage can be reduced, the storage space is saved, and the storage cost is reduced.
In one embodiment, S1014 is followed by: respectively acquiring target timestamps of a plurality of second data, wherein the second data are first data of which the target deviation values are not in a preset range; selecting data corresponding to the target timestamp from each first data set to obtain n third data sets, wherein each third data set at least comprises one piece of first data; respectively determining a target display mode of each third data set according to the transmission transaction corresponding to each first data set; and alarming the third data set according to the target display mode.
The timestamp is used to indicate the time when the second data is acquired, and may be the time automatically recorded by the ventricular assist device when the operation data is acquired, or may be the time recorded by the controller when the operation data is received. The target deviation value of the second data is not in the preset range and may be caused by the fact that the ventricular assist device fails in operation, the target timestamp corresponding to the second data is the time when the ventricular assist device fails, and the third data set is obtained by screening the data corresponding to the target timestamp in the first data set, so that the reason why the ventricular assist device fails can be analyzed according to the third data set, and an alarm can be given.
The target display mode is a mode of performing data display on the third data set, and includes a graph display mode, a table display mode, a picture display mode or a video display mode. The graphical representation may be, for example, a waveform, a line graph, a bar graph, or a sector graph. And alarming the third data set according to the target display mode, wherein the alarming mode comprises sound alarming, text prompting alarming, video alarming or light flashing alarming and the like.
For example, if the rotational speed of the ventricular assist device at the time point A, B, C, D exceeds the preset rotational speed range, all data at the time point A, B, C, D in the first data set are screened out to obtain a third data set, and then the third data set is displayed in a target display manner, for example, a rotational speed error waveform, a flow error waveform diagram, a power error waveform diagram, and the like may be generated according to the third data set, so that the alarm display of the data may be performed in a visual manner.
In the embodiment, in the first data set, the first data with the target deviation degree not within the preset range is screened to the third data set, so that all data of the ventricular assist device in the failure can be subjected to statistical analysis, and displayed and alarmed according to the target display mode, the alarm mode is more visual, and the efficiency of fault processing of the ventricular assist device is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a data storage device for implementing the above mentioned data storage method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the data storage device provided below can refer to the limitations on the data storage method in the foregoing, and details are not described herein again.
In one embodiment, as shown in fig. 11, there is provided a data storage device including: a caching module 1102, a determination module 1104, and a writing module 1106, wherein:
the caching module 1102 is configured to cache a first operating data set in a temporary caching space, where the first operating data set is a set of operating data sent by the ventricular assist device in a preset period;
a determining module 1104, configured to determine a target data table from the target storage space when the data amount of the first operating data set cached in the temporary cache space reaches a target amount, where the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operating data set, and the acquisition time of the second operating data set is shorter than the acquisition time of the first operating data set;
a writing module 1106 is configured to write the first operation data set in the temporary cache space into the target data table.
In the above embodiment, the first operating data set composed of the operating data sent by the ventricular assist device in the preset period is cached in the temporary cache space, and when the data amount of the first operating data set cached in the temporary cache space reaches the target amount, the target data table is determined from the target storage space, and the first operating data set in the temporary cache space is written into the target data table. Therefore, the writing frequency of the target storage space can be reduced, the CPU resource occupied by the writing operation is reduced, and the storage efficiency is improved. In addition, the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set. That is, the target storage space has a plurality of historical data tables, and the first operating data is written into the plurality of historical data tables respectively, so that the data written into each historical data table is not very large, the time for opening the target data table is shortened, the writing time of the operating data is shortened, and the storage efficiency of the operating data is further improved.
In one embodiment, the determining module 1104 is further configured to: acquiring the number of records of the data records in the second data table; if the number of the records is larger than the number threshold value, creating a first data table, and determining the first data table as a target data table; otherwise, the second data table is determined as the target data table.
In one embodiment, the determining module 1104 is further configured to: calculating a first time length, wherein the first time length is the time length required for acquiring the first operation data sets of the target number; acquiring a second time length according to the second data table, wherein the second time length is the time length required for writing the first operation data set in the temporary cache space into the second data table; if the first time length is less than or equal to the second time length, creating a first data table, and determining the first data table as a target data table; otherwise, the second data table is determined as the target data table.
In one embodiment, the first data in the first set of operating data includes a first field and a second field, the first field to indicate a transmission type of the first data; the second field is used for indicating a transaction identifier of the first data, the transaction identifier is used for defining the function and/or operation data of the transaction in the ventricular assist device, and the first data is any data in the first operation data set.
In one embodiment, as shown in fig. 12, the apparatus further comprises:
a classifying module 1108, configured to classify the first operating data set in the temporary cache space according to the transaction identifier to obtain n first data sets, where each first data set corresponds to one transmission transaction, and n is a positive integer greater than 1;
an obtaining module 1110, configured to obtain, according to the transaction identifier and the transmission type, a target priority and a target key set corresponding to the n first data sets, where the target key set includes at least one keyword;
a screening module 1112, configured to screen n first data sets according to the target key set, respectively, to obtain m second data sets, where m is less than or equal to n;
a determining module 1104, configured to determine a target storage manner of each second data set according to the target priority;
the storage module 1114 is configured to store the m second data sets according to the target storage manners.
In one embodiment, the screening module 1112 is further configured to: respectively matching data in a first data set i with at least one keyword to obtain an intermediate data set, wherein the intermediate data set comprises a plurality of pieces of first data, and the first data set i is any one of n first data sets; acquiring a preset value and a preset mean square error corresponding to at least one keyword; calculating a first difference value, wherein the first difference value is the difference value between the mean square error of the intermediate data set and a preset mean square error; determining a target adjusting factor corresponding to the first difference according to the mapping relation between the difference and the adjusting factor; adjusting the preset value according to the target adjusting factor to obtain a target value; determining a target degree of deviation between each first data in the intermediate data set and the target value; and screening the first data with the target deviation degree within a preset range to a second data set.
In one embodiment, the apparatus further comprises:
the obtaining module 1110 is further configured to obtain target timestamps of a plurality of second data, where the second data is first data whose target deviation value is not within a preset range;
a selecting module 1116, configured to select data corresponding to the target timestamp from each first data set, so as to obtain n third data sets, where each third data set includes at least one piece of first data;
the determining module 1104 is further configured to determine a target presentation manner of each third data set according to the transmission transaction corresponding to each first data set;
and an alarm module 1118 configured to alarm the third data set according to the target display mode.
The various modules in the data storage device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the relevant laws and regulations and standards of the relevant country and region.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include a Read-Only Memory (ROM), a Magnetic tape, a floppy disk, a flash Memory, an optical Memory, a high-density embedded nonvolatile Memory, a resistive Random Access Memory (ReRAM), a Magnetic Random Access Memory (MRAM), a Ferroelectric Random Access Memory (FRAM), a Phase Change Memory (PCM), a graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method of data storage, the method comprising:
caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by a ventricular assist device in a preset period; first data in the first operating data set comprises a first field used for indicating the transmission type of the first data and a second field used for indicating the transaction identification of the first data;
when the data volume of the first operation data set cached in the temporary cache space reaches a target quantity, determining a target data table from a target storage space, wherein the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operation data set, and the acquisition time of the second operation data set is shorter than that of the first operation data set;
classifying the first operating data sets in the temporary cache space according to the transaction identifiers to obtain n first data sets, wherein each first data set corresponds to one transmission transaction, and n is a positive integer greater than 1;
respectively acquiring target priority and a target key set corresponding to the n first data sets according to the transaction identifier and the transmission type, wherein the target key set comprises at least one keyword;
respectively matching data in a first data set i with the at least one keyword to obtain an intermediate data set, wherein the intermediate data set comprises a plurality of pieces of first data, the first data set i is any one of the n first data sets, and i is a positive integer;
acquiring a preset value and a preset mean square error corresponding to the at least one keyword;
calculating a first difference value, wherein the first difference value is the difference value between the mean square error of the intermediate data set and the preset mean square error;
determining a target adjusting factor corresponding to the first difference according to the mapping relation between the difference and the adjusting factor;
adjusting the preset value according to the target adjusting factor to obtain a target value;
determining a target degree of deviation between each first data in the intermediate data set and the target value;
screening the first data with the target deviation degree within a preset range to m second data sets, wherein m is smaller than or equal to n;
determining a target storage mode of each second data set according to the target priority;
and respectively writing the m second data sets into the target data table for storage according to the target storage mode.
2. The method of claim 1, wherein determining the target data table from the target storage space comprises:
acquiring the number of records of the data records in the second data table;
if the number of the records is larger than the number threshold, creating the first data table, and determining the first data table as the target data table; otherwise, the second data table is determined as the target data table.
3. The method of claim 1, wherein determining the target data table from the target storage space comprises:
calculating a first time duration, wherein the first time duration is a time duration required for collecting the target number of the first operation data sets;
acquiring a second time length according to the second data table, wherein the second time length is the time length required for writing the first operation data set in the temporary cache space into the second data table;
if the first time length is less than or equal to the second time length, creating the first data table, and determining the first data table as the target data table; otherwise, the second data table is determined as the target data table.
4. A method according to any of claims 1-3, wherein the transaction identifies functional and/or operational data defining a transaction in the ventricular assist device, and the first data is any data in the first set of operational data.
5. The method of claim 4, wherein the transaction comprises at least one of a pump control transaction, a real-time clock transaction, a controller command transaction, a real-time status transaction, a non-real-time status acquisition transaction, a patient configuration transaction, a log read transaction, an authentication transaction, or a power status transaction.
6. The method of claim 1, wherein determining the target data table from the target storage space comprises:
acquiring a preset data table establishing period;
determining the creation time of the data table according to the creation period of the data table;
if the data table creation time is up, creating the first data table, and determining the first data table as the target data table; otherwise, the second data table is determined as the target data table.
7. The method of claim 1, further comprising:
respectively acquiring target timestamps of a plurality of second data, wherein the second data are the first data of which the target deviation values are not in the preset range;
selecting data corresponding to the target timestamp from each first data set to obtain n third data sets, wherein each third data set at least comprises one piece of first data;
respectively determining a target display mode of each third data set according to the transmission transaction corresponding to each first data set;
and alarming the third data set according to the target display mode.
8. A data storage device, characterized in that the device comprises:
the cache module is used for caching a first operation data set in a temporary cache space, wherein the first operation data set is a set of operation data sent by the ventricular assist device in a preset period; first data in the first operating data set comprises a first field used for indicating the transmission type of the first data and a second field used for indicating the transaction identification of the first data;
the determining module is further configured to determine a target data table from a target storage space when the data amount of the first operating data set cached in the temporary cache space reaches a target amount, where the target data table is a first data table or a second data table, the first data table is a newly created historical data table, the second data table is a historical data table for storing a second operating data set, and the acquisition time of the second operating data set is shorter than that of the first operating data set;
the classification module is used for classifying the first operation data sets in the temporary cache space according to the transaction identifiers to obtain n first data sets, each first data set corresponds to one transmission transaction, and n is a positive integer greater than 1;
an obtaining module, configured to obtain, according to the transaction identifier and the transmission type, a target priority and a target key set corresponding to the n first data sets, where the target key set includes at least one keyword;
a screening module, configured to match data in a first data set i with the at least one keyword, respectively, to obtain an intermediate data set, where the intermediate data set includes multiple pieces of the first data, the first data set i is any one of the n first data sets, and i is a positive integer; acquiring a preset value and a preset mean square error corresponding to the at least one keyword; calculating a first difference value, wherein the first difference value is the difference value between the mean square error of the intermediate data set and the preset mean square error; determining a target adjusting factor corresponding to the first difference according to the mapping relation between the difference and the adjusting factor; adjusting the preset value according to the target adjusting factor to obtain a target value; determining a target degree of deviation between each first data in the intermediate data set and the target value; screening the first data with the target deviation degree within a preset range to m second data sets; m is less than or equal to n;
the determining module is further configured to determine a target storage manner of each second data set according to the target priority;
and the storage module is used for respectively writing the m second data sets into the target data table for storage according to the target storage mode.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202210756512.5A 2022-06-30 2022-06-30 Data storage method and device, computer equipment and storage medium Active CN114822804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210756512.5A CN114822804B (en) 2022-06-30 2022-06-30 Data storage method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210756512.5A CN114822804B (en) 2022-06-30 2022-06-30 Data storage method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114822804A CN114822804A (en) 2022-07-29
CN114822804B true CN114822804B (en) 2022-09-20

Family

ID=82523024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210756512.5A Active CN114822804B (en) 2022-06-30 2022-06-30 Data storage method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114822804B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115177860B (en) * 2022-09-08 2022-12-06 深圳核心医疗科技有限公司 Performance adjusting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108046A (en) * 2006-10-25 2008-05-08 Hitachi Information Systems Ltd Transaction processing system, transaction processing method and program therefor
CN108073349A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 The transmission method and device of data
CN109189785A (en) * 2018-08-10 2019-01-11 平安科技(深圳)有限公司 Date storage method, device, computer equipment and storage medium
CN113778911A (en) * 2021-08-04 2021-12-10 成都佰维存储科技有限公司 L2P data caching method and device, readable storage medium and electronic equipment
CN114564501A (en) * 2022-02-28 2022-05-31 天翼安全科技有限公司 Database data storage and query methods, devices, equipment and medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491450B (en) * 2018-02-26 2021-09-21 平安普惠企业管理有限公司 Data caching method, device, server and storage medium
CN114428692A (en) * 2022-01-25 2022-05-03 腾讯科技(深圳)有限公司 Data transmitting method, data receiving method, data transmitting device, data receiving device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108046A (en) * 2006-10-25 2008-05-08 Hitachi Information Systems Ltd Transaction processing system, transaction processing method and program therefor
CN108073349A (en) * 2016-11-08 2018-05-25 北京国双科技有限公司 The transmission method and device of data
CN109189785A (en) * 2018-08-10 2019-01-11 平安科技(深圳)有限公司 Date storage method, device, computer equipment and storage medium
CN113778911A (en) * 2021-08-04 2021-12-10 成都佰维存储科技有限公司 L2P data caching method and device, readable storage medium and electronic equipment
CN114564501A (en) * 2022-02-28 2022-05-31 天翼安全科技有限公司 Database data storage and query methods, devices, equipment and medium

Also Published As

Publication number Publication date
CN114822804A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
US20150347684A1 (en) Managing user information - data type extension
KR102446329B1 (en) Device For Providing Health Management Service and Method Thereof
KR20180127695A (en) Apparatus for securing storage space and method thereof
KR20170096904A (en) Electronic device and method for providing content according to skin type of user
WO2018118166A1 (en) System and method for testing program using user interaction
CN112527414B (en) Front-end-based data processing method, device, equipment and storage medium
CN114822804B (en) Data storage method and device, computer equipment and storage medium
CN106843912B (en) Page information acquisition method and device
CN108628537A (en) Monitoring data output method and device
CN115480987A (en) Link data display method and device and computer equipment
US11409648B2 (en) Electronic apparatus and controlling method for performing memory swapping to reduce resource usage
CN111857920B (en) Popup window processing method and device, computer equipment and storage medium
CN116431731A (en) Data asynchronous export method, device, equipment and storage medium thereof
US10749772B1 (en) Data reconciliation in a distributed data storage network
WO2022261042A1 (en) Prediction of post-operative pain using hosvd
CN115827383A (en) Data anomaly monitoring method and device
CN113900718B (en) Decoupling method, system and device for BMC and BIOS asset information
CN114186961A (en) Business approval process configuration method and device, computer equipment and storage medium
CN114424934A (en) Apnea event screening model training method and device and computer equipment
CN114496312A (en) Data processing method and device based on online inquiry and computer equipment
CN112256529A (en) Web crawler monitoring method and device, computer equipment and storage medium
CN112231232A (en) Method, device and equipment for determining test data model and generating test data
US9189160B2 (en) Transport agnostic sequential drive recovery with mode data snooping
CN111224936B (en) User abnormal request detection method, system, device and machine readable medium
US11151194B2 (en) Data collection and integration system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40075647

Country of ref document: HK

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 518051 1601, building D3, Nanshan Zhiyuan, No. 1001, Xueyuan Avenue, Changyuan community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong Province

Patentee after: Shenzhen Core Medical Technology Co.,Ltd.

Address before: 518051 1601, building D3, Nanshan Zhiyuan, No. 1001, Xueyuan Avenue, Changyuan community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong Province

Patentee before: SHENZHEN CORE MEDICAL TECHNOLOGY Co.,Ltd.