Wireless communication system for the pasting type insulin pump systems
Technical field
The present invention relates to a kind of wireless communication system for the pasting type insulin pump systems.
Background technology
Insulin pump is for simulating a kind of infusion of insulin system of human pancreas's excreting insulin, it makes the insulin that enters human body more meet the physiological change rule by trace, lasting infusion, better to control the daily blood sugar level of diabetics, also eliminated the patient and used the painful of needle cylinder injection insulin and bother.
The insulin pump used in clinical practice at present adopts medicine storage, injection mechanism more and controls the integrated design of display floater.Medicine storage has connected loading hose, and the loading hose other end has guide needle, during use, first guide needle is penetrated subcutaneously, restarts insulin pump, by the piston in pump housing motor pushing medicine storage, makes medicine enter continuously human body through loading hose.And to the control of insulin pump start and stop, the isoparametric setting of injection dose, and the information such as the current running status of system all must be operated and show by the control display floater on the pump housing.For ease of carrying, insulin pump designs comparatively small and exquisitely usually, this makes the control display floater can only be equipped with a undersized display screen and several simple button, can only show the most basic information, and can't provide abundanter usage data for the user.In addition, the problems such as obstruction or winding easily occur in the method for carrying out loading by flexible pipe, for the patient uses and makes troubles for a long time every day.
Above-mentioned shortcoming for traditional insulin pump, the WO2009125398 patent application has disclosed a kind of pasting type insulin pump systems, the design that this insulin pump systems has adopted the pump housing to separate with controller, used hand held controller to control the work of pasting type insulin pump, as shown in Figure 1.The pasting type insulin pump has been cancelled loading hose, during use, the pump housing is sticked on to the loading position on user's body, the medicine storage of the pump housing with penetrate in advance subcutaneous guide needle and directly be connected, guaranteed that the smoothness of drug conveying is reliable, also make to carry more convenient.Secondly, cancelled the control display floater on the pump housing, control and supervision to the pump housing are all carried out with wireless mode by the hand-held controller of similar PDA, this provides on the one hand more friendly man machine interface and has reduced user's operation easier, also make on the other hand the volume of the pump housing further dwindle, significantly improve the portability of system.
Yet the pasting type insulin pump belongs to implant into body; For supporting, sustaining life; Human body is had to potential danger, and the 3rd class medical apparatus and instruments that must strictly control its safety, effectiveness, therefore have high requirements to the safety and reliability of product.But the WO2009125398 patent application does not disclose the one-to-one relationship that how to ensure insulin pump and hand held controller, probably occur that a plurality of controllers occur disturbing situation about controlling to an insulin pump, exist hidden danger.In addition, the pump housing and hand held controller are all used battery powered, and need for a long time communication work incessantly, and equipment is had to strict low-power consumption requirement.Because rely on hand held controller to realize wirelessly the control of the pump housing fully with monitoring, so a kind of safe and reliable and wireless communications method low-power consumption just becomes the necessary guarantee of system normal operation.Although general Wi-Fi commonly used, bluetooth 2.0 and the wireless communication technology such as infrared have been widely used in various electronic products, have larger limitation aspect reliability or low-power consumption, are not suitable for the pasting type insulin pump systems.
Summary of the invention
Hand held controller and insulin pump are not carried out to strict coupling one by one for overcoming prior art, there is potential safety hazard, and communication system power consumption is large, be unfavorable for the long-time shortcoming of using, the invention provides and a kind ofly can guarantee an only corresponding insulin pump of a hand held controller, power consumption is little, is beneficial to the wireless communication system for the pasting type insulin pump systems of the safety of long-time use.
Wireless communication system for the pasting type insulin pump systems, comprise pasting type insulin pump and the hand held controller corresponding with insulin pump, and insulin pump is provided with and can carries out with hand held controller the communicator of radio communication; Communicator is connected with hand held controller by the low-power consumption bluetooth, records the pump housing serial number of unique sign insulin pump in communicator, records the controller serial number of unique this controller of sign in hand held controller;
Insulin pump comprises the following steps with communicating by letter of hand held controller:
1), set up the one-to-one relationship of insulin pump and hand held controller:
2), carry out data communication between insulin pump and corresponding hand held controller, data communication comprises between insulin pump and corresponding hand held controller and mutually sends between data and insulin pump and corresponding hand held controller reception data mutually;
Mutually send data and comprise that insulin pump is sent to corresponding hand held controller by the user data in the pump housing and hand held controller sends control command to corresponding insulin pump, mutually receive data and comprise that hand held controller receives the user data of corresponding insulin pump and the control command that insulin pump receives corresponding hand held controller;
While mutually sending data, first judge whether the length of data to be sent is greater than the maximum data length that low-power consumption bluetooth single can transmit, if will transmit after data sectional to be sent; If not, directly transmission;
While mutually receiving data, whether the data that judgement receives comprise a plurality of segment datas, if, segment data is combined to form to complete user data, if not, using current data as user data.
Further, the one-to-one relationship of setting up insulin pump and hand held controller in step 1) comprises the device authentication of hand held controller to insulin pump, and insulin pump is to the connection authentication of hand held controller; Only have insulin pump and hand held controller through after device authentication one to one, between insulin pump and hand held controller, just can carry out data communication;
The one-to-one relationship of setting up insulin pump and hand held controller specifically comprises the following steps:
(1.1), the communicator on insulin pump periodically sends wireless broadcast data, comprises pump housing serial number in this broadcast data:
(1.2), hand held controller receives broadcast data, obtains pump housing serial number; Prestore the serial number of the corresponding insulin pump housing in hand held controller, the pump housing serial number that contrast is obtained and the serial number prestored, if both are identical, the device authentication success of hand held controller to insulin pump, the insulin pump that hand held controller is corresponding to this sends connection request; If both are variant, match unsuccessfully, hand held controller continues to receive the broadcast data from insulin pump;
(1.3), insulin pump receives the connection request from hand held controller, judges the whether First Contact Connections request of current connection request, if record the controller serial number of current hand held controller, and directly confirm the hand held controller authentication success;
(1.4) if current connection request is not the First Contact Connections request, the controller serial number of storing in the controller serial number in current connection request and insulin pump is compared, if current controller serial number is consistent with the controller serial number of storage, authentication success; If inconsistent, authentification failure.Only store the controller serial number in the First Contact Connections request in insulin pump.
Further, step 2) in, the data sectional while mutually sending data adopts the form transmission of Frame, and the Frame of segment transmissions comprises frame head, frame length, segments, fragment sequence number, user data, check code and postamble successively; The length of the Frame of each segment transmissions is less than the maximum data length that low-power consumption bluetooth single can transmit; Wherein frame head and postamble are for beginning and the end of identification data frame; The data length that frame length is remainder except frame head, postamble; Segments means that user data is divided into how many sections transmission altogether, if user data does not need segmentation, segments is 0; Fragment sequence number means which segmentation current Frame belongs to, and sequentially increases progressively since 1, for the data recombination after receiving; User data is deposited the data of actual transmissions; Check code has adopted CRC (CRC), for the part to except frame head, postamble and frame length, carries out the correctness verification.
Further, segment transmissions comprises the following steps:
(2.1) when the length of data to be sent is greater than the maximum data length that low-power consumption bluetooth single can transmit, calculate segments N, the greatest length of the user data of segments N=(greatest length of the user data of the total length of data to be sent+each segmentation)/each segmentation; Because the maximum data length that frame length, segments, fragment sequence number, check code and postamble and low-power consumption bluetooth single can transmit is determined, so the greatest length of the user data of each segmentation is clear and definite; Data to be transmitted is divided into to the N section, and, to each segment assignments fragment sequence number, fragment sequence number sequentially increases progressively since 1;
When the length of data to be sent is less than the maximum data length that low-power consumption bluetooth single can transmit, segments is set to 0, data to be sent are inserted in user data, and fragment number is set to 1;
(2. 2), calculate the check code of each segment data;
(2. 3), according to the form assembled data frame of the Frame of segment transmissions;
(2.4), send in order segment data wait acknowledge;
(2.5) still confiscate recipient's confirmation, current segment data retransmitted if surpass default maximum latency;
(2.6) if the number of times that current segment data is retransmitted surpasses maximum number of retransmissions, point out user data to send unsuccessfully;
(2.7), if receive the confirmation that the recipient returns, judge whether last segment data of segment data that current acquisition confirms, if data are sent completely; If not, repeating step (2.4)-(2.7).
Further, step 2) in, the data combination while mutually accepting data specifically comprises the following steps:
(2.a) receive at every turn new segment data first check fragment sequence number and check code whether correct, fragment sequence number must increase progressively in order since 1, if fragment number occur to be jumped, thinks the fragment sequence number mistake;
If (2.b) fragment sequence number and check code are all correct, current segmentation to be sent to confirmation signal, and carry out the segment data restructuring, the step of data recombination comprises:
(2.b.1) according to segments distributing user data buffer storage;
(2.b.2) extract the user data in Frame, by fragment sequence number, sequentially insert successively from small to large user data cache;
(2.c) wait for next segmentation, until receive last data sectional, user data finishes receiving.
Technical conceive of the present invention is: using insulin pump as the bluetooth slave unit, (BLE Slave) carries out the wireless points point to-point communication with hand held controller as bluetooth master (BLE Master).Low-power consumption Bluetooth protocol regulation slave unit and main equipment start to need first to connect before formal transfer of data.
The present invention, in order to guarantee one-to-one relationship strict between insulin pump and hand held controller, has increased facility information authentication link in the process of connecting.One-to-one relationship refers to: each hand held controller can only communicate with a unique insulin pump through authentication, forbids insulin pump or other wireless device communications with unauthenticated; And each insulin pump can only communicate with a unique hand held controller through authentication, forbids hand held controller or other wireless device communications with unauthenticated.This has fundamentally been avoided controlling same insulin pump and the safety issue that may cause by a plurality of hand held controllers simultaneously, also can reduce to greatest extent impact and the invasion of other wireless devices on the system proper communication, ensure the safety in the insulin pump use procedure, ensure patient's life security.
Low-power consumption bluetooth (Bluetooth Low Energy, be called for short BLE) be a kind of wireless communication technology of applying for low-power consumption specially defined in bluetooth 4.0 standards, compare the traditional bluetooth technology defined in bluetooth 2.0 standards and can realize lower system power dissipation, extend the service time of supplying cell in insulin pump systems, avoid causing electric weight situation not enough, that threaten user life to occur because communication power consumption is large, can meet the requirement of the power consumption of pasting type insulin pump systems.In addition, the low-power consumption bluetooth is as the extension of traditional bluetooth technology and supplement, started at present to be applied in increasing electronic product, for example the iPhone 4S mobile phone of the up-to-date release of American apple company and iPad panel computer just have the low-power consumption function of Bluetooth communication.Therefore, adopt the pasting type insulin pump systems of low-power consumption Bluetooth technology likely with other electronic equipments such as mobile phone, notebook computers, realize exchanges data and interconnect, improved motility and the extensibility of product.
After insulin pump and hand held controller connect, the Frame of take carries out the wireless transmission of user data as unit.The link layer protocol of low-power consumption bluetooth has stipulated that the data greatest length that each packet can transmit is no more than 31 bytes, and this makes for the user data that surpasses 31 bytes and can not once be transmitted, and has in actual applications larger limitation and inconvenience.These characteristics that the present invention is directed to the low-power consumption Bluetooth protocol have added communication data send front segmentation and receive rear process of recombinating, and have defined relevant data frame structure.The total length that guarantees each Frame is no more than 31 bytes, can be by once being transmitted during with assurance communication.
In addition, for further improving data integrity and the reliability in wireless communication procedure, the present invention has introduced communication acknowledgement and overtime retransmission mechanism.This mechanism has been stipulated in data transmission procedure, transmit leg often complete a secondary data send all must be on the confirmation that obtains the recipient just can be carried out later once new transmission, do not receive confirmation if surpass certain hour, transmit leg need to be resend this secondary data; The recipient often receives that a Frame of transmit leg all must return a confirmation immediately, to guarantee communication, can proceed.Communication acknowledgement and overtime retransmission mechanism can obviously reduce on the one hand because wireless signal interrupts, is disturbed the communication failure or the loss of data that produce, have strengthened stability and the capacity of resisting disturbance of system; Also realized on the other hand data traffic control, avoided because the communicating pair data-handling capacity is not mated the system over loading problem caused.
The present invention has can guarantee an only corresponding insulin pump of a hand held controller, and power consumption is little, is beneficial to the advantage of the safety of long-time use.
The accompanying drawing explanation
Fig. 1 is pasting type insulin pump systems work schematic diagram.
Fig. 2 is pasting type insulin pump systems radio communication block diagram for software modules.
Fig. 3 is the flow chart that insulin pump and hand-held controller connect.
Fig. 4 is that hand-held controller carries out the flow process of device authentication to insulin pump.
Fig. 5 is that insulin pump carries out the flow process of device authentication to hand held controller.
Fig. 6 is the data frame format that insulin pump and hand held controller carry out the RFDC use.
Fig. 7 is the data transmission flow figure between insulin pump and hand held controller.
Fig. 8 is the data receiver flow chart between insulin pump and hand held controller.
The specific embodiment
With reference to accompanying drawing, further illustrate the present invention:
Wireless communication system for the pasting type insulin pump systems, comprise pasting type insulin pump and the hand held controller corresponding with insulin pump, the pasting type insulin pump adheres to human body skin, and hand held controller is communicated by letter with insulin pump by wireless network, as shown in Figure 1.
Insulin pump is provided with and can carries out with hand held controller the communicator of radio communication; Communicator is connected with hand held controller by the low-power consumption bluetooth, records the pump housing serial number of unique sign insulin pump in communicator, records the controller serial number of unique this controller of sign in hand held controller.
Insulin pump comprises the following steps with communicating by letter of hand held controller:
1), set up the one-to-one relationship of insulin pump and hand held controller, one-to-one relationship refers to: each hand held controller can only communicate with a unique insulin pump through authentication, forbids insulin pump or other wireless device communications with unauthenticated; And each insulin pump can only communicate with a unique hand held controller through authentication, forbids hand held controller or other wireless device communications with unauthenticated.
2), carry out data communication between insulin pump and corresponding hand held controller, data communication comprises between insulin pump and corresponding hand held controller and mutually sends between data and insulin pump and corresponding hand held controller reception data mutually;
Mutually send data and comprise that insulin pump is sent to corresponding hand held controller by the user data in the pump housing and hand held controller sends control command to corresponding insulin pump, mutually receive data and comprise that hand held controller receives the user data of corresponding insulin pump and the control command that insulin pump receives corresponding hand held controller;
While mutually sending data, first judge whether the length of data to be sent is greater than the maximum data length that low-power consumption bluetooth single can transmit, if will transmit after data sectional to be sent; If not, directly transmission;
While mutually receiving data, whether the data that judgement receives comprise a plurality of segment datas, if, segment data is combined to form to complete user data, if not, using current data as user data.
As shown in Figure 3, the one-to-one relationship of setting up insulin pump and hand held controller in step 1) comprises the device authentication of hand held controller to insulin pump, and insulin pump is to the connection authentication of hand held controller; Only have insulin pump and hand held controller through after device authentication one to one, between insulin pump and hand held controller, just can carry out data communication.
As shown in Figure 4 and Figure 5, the one-to-one relationship of setting up insulin pump and hand held controller specifically comprises the following steps:
(1.1), the communicator on insulin pump periodically sends wireless broadcast data, comprises pump housing serial number in this broadcast data:
(1.2), hand held controller receives broadcast data, obtains pump housing serial number; Prestore the serial number of the corresponding insulin pump housing in hand held controller, the pump housing serial number that contrast is obtained and the serial number prestored, if both are identical, the device authentication success of hand held controller to insulin pump, the insulin pump that hand held controller is corresponding to this sends connection request; If both are variant, match unsuccessfully, hand held controller continues to receive the broadcast data from insulin pump;
(1.3), insulin pump receives the connection request from hand held controller, judges the whether First Contact Connections request of current connection request, if record the controller serial number of current hand held controller, and directly confirm the hand held controller authentication success;
(1.4) if current connection request is not the First Contact Connections request, the controller serial number of storing in the controller serial number in current connection request and insulin pump is compared, if current controller serial number is consistent with the controller serial number of storage, authentication success; If inconsistent, authentification failure.Only store the controller serial number in the First Contact Connections request in insulin pump.
Step 2) in, the data sectional while mutually sending data adopts the form transmission of Frame, and the structure of the Frame of segment transmissions as shown in Figure 6.Frame comprises frame head, frame length, segments, fragment sequence number, user data, check code and postamble successively; The length of the Frame of each segment transmissions is less than the maximum data length that low-power consumption bluetooth single can transmit; Wherein frame head and postamble are for beginning and the end of identification data frame; The data length that frame length is remainder except frame head, postamble; Segments means that user data is divided into how many sections transmission altogether, if user data does not need segmentation, segments is 0; Fragment sequence number means which segmentation current Frame belongs to, and sequentially increases progressively since 1, for the data recombination after receiving; User data is deposited the data of actual transmissions; Check code has adopted CRC (CRC), for the part to except frame head, postamble and frame length, carries out the correctness verification.
As shown in Figure 7, segment transmissions comprises the following steps:
(2.1), when the length of data to be sent is greater than the maximum data length that low-power consumption bluetooth single can transmit, calculate segments N, the greatest length of the user data of segments N=(greatest length of the user data of the total length of data to be sent+each segmentation)/each segmentation; Because the maximum data length that frame length, segments, fragment sequence number, check code and postamble and low-power consumption bluetooth single can transmit is determined, so the greatest length of the user data of each segmentation is clear and definite; Data to be transmitted is divided into to the N section, and, to each segment assignments fragment sequence number, fragment sequence number sequentially increases progressively since 1;
When the length of data to be sent is less than the maximum data length that low-power consumption bluetooth single can transmit, segments is set to 0, data to be sent are inserted in user data, and fragment number is set to 1;
(2. 2), calculate the check code of each segment data;
(2. 3), according to the form assembled data frame of the Frame of segment transmissions;
(2.4), send in order segment data wait acknowledge;
(2.5) still confiscate recipient's confirmation, current segment data retransmitted if surpass default maximum latency;
(2.6) if the number of times that current segment data is retransmitted surpasses maximum number of retransmissions, point out user data to send unsuccessfully;
(2.7), if receive the confirmation that the recipient returns, judge whether last segment data of segment data that current acquisition confirms, if data are sent completely; If not, repeating step (2.4)-(2.7).
As shown in Figure 8, step 2) in, the data combination while mutually accepting data specifically comprises the following steps:
(2.a) receive at every turn new segment data first check fragment sequence number and check code whether correct, fragment sequence number must increase progressively in order since 1, if fragment number occur to be jumped, thinks the fragment sequence number mistake;
If (2.b) fragment sequence number and check code are all correct, current segmentation to be sent to confirmation signal, and carry out the segment data restructuring, the step of data recombination comprises:
(2.b.1) according to segments distributing user data buffer storage;
(2.b.2) extract the user data in Frame, by fragment sequence number, sequentially insert successively from small to large user data cache;
(2.c) wait for next segmentation, until receive last data sectional, user data finishes receiving.
Technical conceive of the present invention is: using insulin pump as the bluetooth slave unit, (BLE Slave) carries out the wireless points point to-point communication with hand held controller as bluetooth master (BLE Master).Low-power consumption Bluetooth protocol regulation slave unit and main equipment start to need first to connect before formal transfer of data.
The present invention, in order to guarantee one-to-one relationship strict between insulin pump and hand held controller, has increased facility information authentication link in the process of connecting.This has fundamentally been avoided controlling same insulin pump and the safety issue that may cause by a plurality of hand held controllers simultaneously, also can reduce to greatest extent impact and the invasion of other wireless devices on the system proper communication, ensure the safety in the insulin pump use procedure, ensure patient's life security.
Low-power consumption bluetooth (Bluetooth Low Energy, be called for short BLE) be a kind of wireless communication technology of applying for low-power consumption specially defined in bluetooth 4.0 standards, compare the traditional bluetooth technology defined in bluetooth 2.0 standards and can realize lower system power dissipation, extend the service time of supplying cell in insulin pump systems, avoid causing electric weight situation not enough, that threaten user life to occur because communication power consumption is large, substantially can meet the requirement of the power consumption of pasting type insulin pump systems.In addition, the low-power consumption bluetooth is as the extension of traditional bluetooth technology and supplement, started at present to be applied in increasing electronic product, for example the iPhone 4S mobile phone of the up-to-date release of American apple company and iPad panel computer just have the low-power consumption function of Bluetooth communication.Therefore, adopt the pasting type insulin pump systems of low-power consumption Bluetooth technology likely with other electronic equipments such as mobile phone, notebook computers, realize exchanges data and interconnect, improved motility and the extensibility of product.
After insulin pump and hand held controller connect, the Frame of take carries out the wireless transmission of user data as unit.The link layer protocol of low-power consumption bluetooth has stipulated that the data greatest length that each packet can transmit is no more than 31 bytes, and this makes for the user data that surpasses 31 bytes and can not once be transmitted, and has in actual applications larger limitation and inconvenience.These characteristics that the present invention is directed to the low-power consumption Bluetooth protocol have added communication data send front segmentation and receive rear process of recombinating, and have defined relevant data frame structure.The total length that guarantees each Frame is no more than 31 bytes, can be by once being transmitted during with assurance communication.
In addition, for further improving data integrity and the reliability in wireless communication procedure, the present invention has introduced communication acknowledgement and overtime retransmission mechanism.This mechanism has been stipulated in data transmission procedure, transmit leg often complete a secondary data send all must be on the confirmation that obtains the recipient just can be carried out later once new transmission, do not receive confirmation if surpass certain hour, transmit leg need to be resend this secondary data; The recipient often receives that a Frame of transmit leg all must return a confirmation immediately, to guarantee communication, can proceed.Communication acknowledgement and overtime retransmission mechanism can obviously reduce on the one hand because wireless signal interrupts, is disturbed the communication failure or the loss of data that produce, have strengthened stability and the capacity of resisting disturbance of system; Also realized on the other hand data traffic control, avoided because the communicating pair data-handling capacity is not mated the system over loading problem caused.
The present invention has can guarantee an only corresponding insulin pump of a hand held controller, and power consumption is little, is beneficial to the advantage of the safety of long-time use.
The described content of this description embodiment is only enumerating the way of realization of inventive concept; protection scope of the present invention should not be regarded as only limiting to the concrete form that embodiment states, protection scope of the present invention also reaches conceives the equivalent technologies means that can expect according to the present invention in those skilled in the art.