WO2021196763A1 - Information processing method and apparatus, and electronic device and computer readable storage medium - Google Patents

Information processing method and apparatus, and electronic device and computer readable storage medium Download PDF

Info

Publication number
WO2021196763A1
WO2021196763A1 PCT/CN2020/138374 CN2020138374W WO2021196763A1 WO 2021196763 A1 WO2021196763 A1 WO 2021196763A1 CN 2020138374 W CN2020138374 W CN 2020138374W WO 2021196763 A1 WO2021196763 A1 WO 2021196763A1
Authority
WO
WIPO (PCT)
Prior art keywords
smart terminal
ecg
ecg device
binding
measurement
Prior art date
Application number
PCT/CN2020/138374
Other languages
French (fr)
Chinese (zh)
Inventor
涂勇策
彭赛煌
张博
Original Assignee
出门问问信息科技有限公司
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
Priority claimed from CN202010255591.2A external-priority patent/CN111493861B/en
Priority claimed from CN202010255874.7A external-priority patent/CN111540458B/en
Priority claimed from CN202010256331.7A external-priority patent/CN111475870B/en
Priority claimed from CN202010255589.5A external-priority patent/CN111540457B/en
Application filed by 出门问问信息科技有限公司 filed Critical 出门问问信息科技有限公司
Publication of WO2021196763A1 publication Critical patent/WO2021196763A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/73Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers

Definitions

  • the present invention relates to the technical field of smart terminals, and in particular to an information processing method, device, electronic equipment, and computer-readable storage medium.
  • the present invention provides an information processing method and device, electronic equipment, and computer-readable storage medium to at least solve the above technical problems existing in the prior art.
  • the present invention provides an information processing method, which is applied to an ECG device, and the method includes:
  • control instruction being used to instruct to start creating a communication connection with the smart terminal
  • the communication connection process with the smart terminal is executed according to the third connection strategy.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the execution of the communication connection process with the smart terminal according to the first connection strategy includes:
  • the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
  • the execution of the communication connection process with the smart terminal according to the second connection strategy includes:
  • the bound smart terminal If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly.
  • the communication connection process is terminated.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the execution of the communication connection process with the smart terminal according to the first connection strategy includes:
  • the bound smart terminal If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly.
  • the communication connection process is terminated.
  • the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
  • the execution of the communication connection process with the smart terminal according to the second connection strategy includes:
  • the bound smart terminal If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly.
  • the communication connection process is terminated.
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the execution of the communication connection process with the smart terminal according to the third connection strategy includes:
  • the communication connection process is terminated.
  • the present invention provides an information processing device, which is applied to an electrocardiogram ECG device, and the device includes:
  • An obtaining unit configured to obtain a control instruction, the control instruction being used to instruct to start creating a communication connection with the smart terminal;
  • the execution unit in response to the control instruction, when it is determined that the first preset condition is currently met, executes the communication connection process with the smart terminal according to the first connection strategy; when it is determined that the second preset condition is currently met, press The second connection strategy executes the communication connection process with the smart terminal; when it is determined that the third preset condition is currently met, the third connection strategy executes the communication connection process with the smart terminal.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the execution unit is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
  • the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
  • the execution unit is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
  • the bound smart terminal If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly.
  • the communication connection process is terminated.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the execution unit is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
  • the bound smart terminal If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly.
  • the communication connection process is terminated.
  • the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
  • the execution unit is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
  • the bound smart terminal If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly.
  • the communication connection process is terminated.
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the execution unit is further configured to execute the communication connection process with the smart terminal according to the following third connection strategy:
  • the communication connection process is terminated.
  • the present invention provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the information processing method of the present invention.
  • the present invention provides an electronic device and a processor
  • a memory for storing executable instructions of the processor
  • the processor is configured to read the executable instructions from the memory and execute the instructions to implement the information processing method of the present invention.
  • the smart terminal is a smart wearable terminal
  • the ECG device is set on a wearable accessory of the smart wearable terminal
  • the wearable accessory is used to wear the smart wearable device to a user.
  • the problem of how to establish a connection between the smart terminal and the ECG equipment is solved, and the basis for the function development of the smart terminal and the ECG equipment is provided, and the connection scheme
  • the design of the mechanism is simple and efficient, but it does not occupy too much processor resources of the device, which is conducive to saving the processor resources and energy consumption of smart terminals and ECG devices, and realizes the connection establishment process with high efficiency and short time.
  • the present invention provides a reset method applied to an ECG device, the method includes:
  • the ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device;
  • the performing the reset operation on the ECG device side includes:
  • the binding information corresponding to the smart terminal is searched, and when binding information corresponding to the smart terminal is found, the binding information is deleted , And clear the binding relationship between the ECG device and the corresponding smart terminal.
  • the reset response message includes address information and an error code of the ECG device, and the error code is used to identify whether the reset on the ECG device side is successful.
  • the method further includes:
  • the ECG device After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the reset process;
  • the reset process of the ECG device if a second trigger instruction is obtained, the reset process is aborted; the second trigger instruction is used to instruct the reset process to be aborted.
  • the ECG device has a trigger electrode
  • the method further includes:
  • the ECG device When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  • the present invention provides a reset method applied to a smart terminal, and the method includes:
  • a reset response message returned by the ECG device is received, and when the reset response message indicates that the reset on the ECG device side is successful, a reset operation on the smart terminal side is performed.
  • the executing the reset operation on the side of the smart terminal includes:
  • the method further includes:
  • a timer After sending a reset request message to the ECG device, a timer is started. If the reset response message returned by the ECG device is not received after the timer expires, it is determined that the number of times the reset request message has been sent has not reached Retransmit the reset request message to the ECG device at a preset number of times; stop sending the reset request to the ECG device when it is determined that the number of times the reset request message has been sent reaches the preset number of times Message and abort the reset process.
  • the present invention provides a reset device, which is applied to an ECG device, and the device includes:
  • the first sending unit is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal.
  • the ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device;
  • the first receiving unit is configured to receive a reset request message sent by a smart terminal after receiving an ECG status notification message, where the reset request message at least includes identification information of the smart terminal;
  • the first processing unit is configured to perform a reset operation on the ECG device side
  • the second sending unit is configured to return a reset response message to the smart terminal after the reset operation is completed.
  • the present invention provides a reset device, which is applied to a smart terminal, and the device includes:
  • the second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
  • the third sending unit is configured to send a reset request message to the ECG device, where the reset request message includes at least the identification information of the smart terminal;
  • the third receiving unit is configured to receive the reset response message returned by the ECG device
  • the second processing unit is configured to perform a reset operation on the smart terminal side when the reset response message indicates that the reset on the ECG device side is successful.
  • the present invention provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the reset method of the present invention.
  • the present invention provides an electronic device and a processor
  • a memory for storing executable instructions of the processor
  • the processor is configured to read the executable instruction from the memory, and execute the instruction to implement the reset method of the present invention.
  • the problem of how to perform reset interaction between the smart terminal and the ECG device is solved, and the design of the reset scheme mechanism is simple and efficient, but does not occupy too much equipment.
  • the processor resources are conducive to saving the processor resources and energy consumption of smart terminals and ECG devices, and realizing a more efficient reset process.
  • the present invention provides a binding method applied to an ECG device, and the method includes:
  • an ECG status notification message is sent to the smart terminal, the ECG status notification message includes status data of the ECG device, and the status data includes the address of the ECG device information;
  • binding response message to the smart terminal, and store first binding information locally, where the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal;
  • the binding response message includes at least the address information of the ECG device.
  • the method further includes:
  • the ECG device After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the binding process;
  • the ECG device obtains the first trigger instruction, during the binding process, if the second trigger instruction is obtained, the binding process is suspended; the second trigger instruction is used to instruct to terminate the binding process.
  • the ECG device has a trigger electrode
  • the method further includes:
  • the ECG device When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  • the present invention provides a binding method applied to a smart terminal, and the method includes:
  • binding request message includes at least the identification information and address information of the smart terminal
  • the binding response message includes at least the address information of the ECG device.
  • the method before obtaining the ECG status notification message from the ECG device, the method further includes:
  • the binding interface is invoked, and the binding interface is used to update the state changes in the binding process in real time, including displaying the binding successful state on the binding interface after the binding is completed.
  • the method further includes:
  • a timer After sending a binding request message to the ECG device, a timer is started. If the timer expires and the binding response message returned by the ECG device is not received, it is determined that the number of times the binding request message has been sent has not exceeded Resend the binding request message to the ECG device at a preset number of times; stop sending the binding request to the ECG device when it is determined that the number of times the binding request message has been sent exceeds the preset number of times Message and abort the binding process with the corresponding ECG device.
  • the present invention provides a binding device, which is applied to an ECG device, and the device includes:
  • the first sending unit is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal.
  • the ECG status notification message includes the status data of the ECG device, and the status The data includes the address information of the ECG device;
  • the first receiving unit is configured to receive a binding request message sent by the smart terminal after receiving the ECG status notification message, where the binding request message includes at least the identification information and address information of the smart terminal;
  • the second sending unit is configured to return a binding response message to the smart terminal, where the binding response message includes at least the address information of the ECG device;
  • the first processing unit is configured to store first binding information locally, where the first binding information at least includes the binding relationship between the ECG device and the identification information of the corresponding smart terminal.
  • the present invention provides a binding device applied to a smart terminal, and the device includes:
  • the second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
  • the third sending unit is configured to send a binding request message to the ECG device, where the binding request message includes at least the identification information and address information of the smart terminal;
  • the third receiving unit is configured to receive a binding response message of the ECG device, where the binding response message at least includes address information of the ECG device;
  • the second processing unit is configured to locally store second binding information, where the second binding information at least includes a binding relationship between the address information of the smart terminal and the ECG device.
  • the present invention provides a computer-readable storage medium storing a computer program, and the computer program is used to execute the binding method of the present invention.
  • the present invention provides an electronic device, a processor
  • a memory for storing executable instructions of the processor
  • the processor is configured to read the executable instruction from the memory, and execute the instruction to implement the binding method of the present invention.
  • the problem of how to establish binding between the smart terminal and the ECG device is solved, which provides a basis for the functional development of the smart terminal and the ECG device, and the binding
  • the design of the fixed scheme mechanism is simple and efficient, but does not occupy the processor resources of the device, which is conducive to saving the processor resources and energy consumption of smart terminals and ECG devices, and realizes the binding establishment process with high efficiency and short time.
  • the present invention provides an electrocardiogram measurement method, which is applied to an electrocardiogram ECG device, and the method includes:
  • an ECG status notification message is sent to the smart terminal.
  • the ECG status notification message includes the status data of the ECG device, and the status data includes at least the status data of the ECG device. Identification information;
  • a measurement end message is sent to the smart terminal.
  • the measurement request message includes identification information of the smart terminal and measurement mode information; wherein, the measurement mode information is used to identify or describe measurement mode content;
  • the ECG measurement includes: executing a corresponding measurement item according to the measurement mode information carried in the measurement request message, and obtaining a measurement data message of the corresponding measurement item.
  • the measurement data message includes a measurement process and measurement data corresponding to the measurement process.
  • the method further includes:
  • the ECG device After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains a first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start a measurement process;
  • the second trigger instruction is used to instruct the suspension of the measurement process.
  • the ECG device has a trigger electrode
  • the method further includes:
  • the ECG device When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  • the present invention provides an electrocardiogram measurement method, which is applied to a smart terminal, and the method includes:
  • a measurement result is generated according to the obtained measurement data, and the measurement result is displayed through the interactive interface.
  • the method further includes:
  • a timer After sending a measurement request message to the ECG device, a timer is started. If the measurement start message returned by the ECG device is not received after the timer expires, it is determined that the number of times the measurement request message has been sent has not reached the preset number of times. When the measurement request message is retransmitted to the ECG device; when it is determined that the number of times the measurement request message has been sent reaches the preset number of times, stop sending the measurement request message to the ECG device, and stop the measurement process .
  • the present invention provides a binding device, which is applied to an ECG device, and the device includes:
  • the first sending unit after the ECG device establishes a communication connection with the smart terminal, sends an ECG status notification message to the smart terminal, where the ECG status notification message includes status data of the ECG device, and the status data includes At least include the identification information of the ECG device;
  • the first receiving unit is configured to receive a measurement request message sent by the smart terminal after receiving the ECG status notification message
  • the first processing unit is configured to start ECG measurement after obtaining the measurement request message
  • the second sending unit is configured to send a measurement start message to the smart terminal, and send a measurement data message to the smart terminal in real time during the ECG measurement process;
  • the third sending unit is configured to send a measurement end message to the smart terminal when the measurement ends.
  • the present invention provides an electrocardiogram measuring device, which is applied to a smart terminal, and the device includes:
  • the second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
  • a fourth sending unit configured to send a measurement request message to the ECG device
  • the third receiving unit is configured to receive a measurement start message and a measurement data message sent by the ECG device;
  • the second processing unit is used to display corresponding measurement data through an interactive interface
  • the fourth receiving unit is configured to receive the measurement end message of the smart terminal
  • the second processing unit is further configured to, when obtaining the measurement end message, generate a measurement result according to the obtained measurement data, and display the measurement result through the interactive interface.
  • the present invention provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the electrocardiogram measurement method of the present invention.
  • the present invention provides an electronic device and a processor
  • a memory for storing executable instructions of the processor
  • the processor is configured to read the executable instruction from the memory and execute the instruction to implement the electrocardiogram measurement method of the present invention.
  • the problem of how to perform ECG measurement interaction between the smart terminal and the ECG device is solved, and the design of the ECG measurement scheme mechanism is simple and efficient, but Occupying more processor resources of the device is conducive to saving processor resources and energy consumption of smart terminals and ECG devices, and realizing an efficient ECG measurement process.
  • FIG. 1 shows a schematic flowchart of an information processing method according to an embodiment of the present invention
  • FIG. 2 shows a schematic diagram of the composition structure of an information processing device according to an embodiment of the present invention
  • FIG. 3 shows a schematic diagram of an electronic device according to an embodiment of the present invention
  • FIG. 4 shows a schematic flowchart of a reset method implemented on the ECG device side according to an embodiment of the present invention
  • FIG. 5 shows a schematic flowchart of a reset method implemented on the side of the smart terminal according to an embodiment of the present invention
  • FIG. 6 shows a schematic flowchart of a binding method implemented on the ECG device side according to an embodiment of the present invention
  • FIG. 7 shows a schematic flowchart of a binding method implemented on the side of a smart terminal according to an embodiment of the present invention
  • FIG. 8 shows a schematic flowchart of a connection establishment method according to an embodiment of the present invention.
  • FIG. 9 shows a schematic diagram of the composition structure of a reset device according to an embodiment of the present invention.
  • FIG. 10 shows a schematic diagram of the composition structure of another reset device according to an embodiment of the present invention.
  • FIG. 11 shows a schematic diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 12 shows a schematic flowchart of a binding method implemented on the ECG device side according to an embodiment of the present invention
  • FIG. 13 shows a schematic flowchart of a binding method implemented on the side of a smart terminal according to an embodiment of the present invention
  • FIG. 14 shows a schematic flowchart of a connection establishment method according to an embodiment of the present invention.
  • FIG. 15 shows a schematic diagram of the composition structure of a binding device according to an embodiment of the present invention.
  • FIG. 16 shows a schematic diagram of the composition structure of another binding apparatus according to an embodiment of the present invention.
  • FIG. 17 shows a schematic diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 18 shows a schematic flowchart of an electrocardiogram measurement method implemented on the ECG device side according to an embodiment of the present invention
  • FIG. 19 shows a schematic flowchart of an electrocardiogram measurement method implemented on the side of a smart terminal in an embodiment of the present invention
  • FIG. 20 shows a schematic flowchart of a binding method implemented on the ECG device side according to an embodiment of the present invention
  • FIG. 21 shows a schematic flowchart of a binding method implemented on the side of a smart terminal according to an embodiment of the present invention
  • FIG. 22 shows a schematic flowchart of a method for establishing a connection according to an embodiment of the present invention
  • FIG. 23 shows a schematic diagram of the composition structure of an electrocardiogram measurement device according to an embodiment of the present invention.
  • FIG. 24 shows a schematic diagram of the composition structure of another electrocardiogram measurement device according to an embodiment of the present invention.
  • FIG. 25 shows a schematic diagram of an electronic device according to an embodiment of the present invention.
  • an embodiment of the present invention provides an information processing method, which is applied to an ECG device, and the method mainly includes:
  • Step 1101 Obtain a control instruction, where the control instruction is used to instruct to start establishing a communication connection with the smart terminal.
  • the ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on.
  • the information processing method of the embodiment of the present invention is used to provide a connection establishment solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
  • the method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways.
  • the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation.
  • the ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures.
  • the method of triggering the control instruction is not limited in the embodiment of the present invention.
  • After the ECG device obtains the control instruction it starts to execute the process of establishing a communication connection with the smart terminal.
  • This connection is preferably a wireless connection.
  • the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
  • Step 1102 In response to the control instruction, determine the preset condition that is currently shown to be satisfied.
  • the preset conditions include at least: the first preset condition shown in 1102a, the second preset condition shown in 1102b, and the third preset condition shown in 1102c.
  • Step 1103 Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal.
  • the connection strategy includes at least: 1103a a first connection strategy corresponding to the first preset condition, 1103b a second connection strategy corresponding to the second preset condition, and 1103c a third connection strategy corresponding to the third preset condition.
  • the communication connection between the ECG device and the smart terminal can adopt the Bluetooth Low Energy (BLE, Bluetooth Low Energy) connection mode.
  • BLE Bluetooth Low Energy
  • the embodiment of the present invention is not limited to the BLE connection mode. Others can be used in practical applications. Any connection mode of the connection establishment mechanism in the embodiment of the present invention should also fall within the protection scope of the embodiment of the present invention.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection response returned by the bound smart terminal receives the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
  • the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal.
  • the terminal initiates a connection request.
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time
  • the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection request Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
  • connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
  • an embodiment of the present invention also provides an information processing device, including:
  • the obtaining unit 110 is configured to obtain a control instruction, and the control instruction is used to instruct to start establishing a communication connection with the smart terminal;
  • the execution unit 120 in response to the control instruction, when determining that the first preset condition is currently met, executes the communication connection process with the smart terminal according to the first connection strategy; when it is determined that the second preset condition is currently met, press the second connection The strategy executes the communication connection process with the smart terminal; when it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
  • the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not a public address;
  • the execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
  • the communication connection process is terminated.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
  • connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
  • the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not a public address;
  • the execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following third connection strategy:
  • the communication connection process is terminated.
  • the electronic device 111 includes one or more processors 1111 and a memory 1112.
  • the processor 1111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 111 to perform desired functions.
  • CPU central processing unit
  • the processor 1111 may control other components in the electronic device 111 to perform desired functions.
  • the memory 1112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include random access memory (RAM) and/or cache memory (cache), for example.
  • the non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like.
  • One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function.
  • Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
  • the electronic device 111 may further include: an input device 1113 and an output device 1114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
  • the input device 1113 may include, for example, a keyboard, a mouse, and so on.
  • the output device 1114 can output various information to the outside, including determined distance information, direction information, and so on.
  • the output device 1114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
  • the electronic device 111 may also include any other appropriate components.
  • An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch.
  • the ECG device has at least two electrodes.
  • the first electrode is set on the first surface of the wristband, and the first surface is the wristband.
  • the side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer.
  • the information processing method in the embodiment of the present invention is used to provide an implementation solution for establishing a communication connection between the smart watch and the ECG device on the wristband.
  • the way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. Electrodes, etc., are not limited in the embodiment of the present invention.
  • an ECG device in the embodiment of the present invention can be configured as a smart bracelet.
  • the ECG device has at least two electrodes.
  • the first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand.
  • the side of the ring used for contact with the user's skin when worn;
  • the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate.
  • the information processing method of the embodiment of the present invention can be used to provide an implementation solution for establishing a communication connection between a smart terminal such as a smart phone or a smart tablet and an ECG device on a smart bracelet.
  • the way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above.
  • it can also be other trigger methods, and it can also be other electrodes, such as ECG devices.
  • the third electrode, etc. are not limited in the embodiment of the present invention.
  • the embodiments of the present application may also be computer program products, which include computer program instructions that, when run by a processor, cause the processor to execute the “exemplary method” described above in this specification.
  • the steps in the method according to various embodiments of the present application are described in the section.
  • the computer program product may use any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application.
  • the programming languages include object-oriented programming languages, such as Java, C++, etc. , Also includes conventional procedural programming languages, such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the embodiment of the present application may also be a computer-readable storage medium, on which computer program instructions are stored.
  • the processor executes the "exemplary method" part of this specification. The steps in the method according to various embodiments of the application are described in.
  • the computer-readable storage medium may adopt any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • an embodiment of the present invention provides a reset method implemented on the ECG device side, including:
  • Step 2101 After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal.
  • the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
  • the ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on. The method of the embodiment of the present invention is used to provide a reset solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
  • the reset method in the embodiment of the present invention is completed on the basis that the ECG device has been bound to the smart terminal, and the process of establishing the binding between the ECG device and the smart terminal will be described in detail later in the embodiment of the present invention.
  • the EcgStatus message format may include the following fields: EcgDataContract.TYPE_DEVICE_ID, which represents the device identification of the ECG device.
  • EcgDataContract.TYPE_BT_ADDRESS indicates the address information of the ECG device.
  • the Bluetooth Low Energy (BLE, Bluetooth Low Energy) connection method can be used between the ECG device and the smart terminal. Therefore, the embodiment of the present invention can set the Bluetooth address (BT_ADDRESS) of the ECG device ) Is used as the address information of the ECG device.
  • BT_ADDRESS Bluetooth address
  • the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
  • the ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states.
  • EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation of the ECG device and the smart terminal is completed. Before the binding operation is completed, the ECG device may not be carried in the message sent to the smart terminal EcgDataContract.TYPE_DEVICE_ID.
  • Step 2102 Receive a reset request message sent by the smart terminal after receiving the ECG status notification message, where the reset request message includes at least the identification information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a reset request message to the corresponding ECG device based on the identification information of the ECG device carried in the EcgStatus message, and the reset request message carries the identification information of the smart terminal.
  • the reset request message will be referred to as ResetRequest message for short in the following.
  • the ResetRequest message format can include the following fields:
  • EcgDataContract.TYPE_DEVICE_ID indicates the identification information of the smart terminal.
  • Step 2103 Perform a reset operation on the ECG device side, and return a reset response message to the smart terminal after the reset operation is completed.
  • the ECG device After receiving the ResetRequest message sent by the smart terminal, the ECG device confirms that it is the ResetRequest message sent by the bound smart terminal, and then starts the reset operation; The terminal returns a reset response message, and the error code carried in the message is used to identify that the device is not bound and cannot be reset.
  • the ECG device searches for the binding information of the corresponding smart terminal according to the identification information of the smart terminal carried in the reset request message, and when it finds the binding information of the corresponding smart terminal, confirms that it is sent by the bound smart terminal
  • the ResetRequest message starts the reset operation, deletes the binding information of the ECG device and the corresponding smart terminal, and clears the binding relationship between the ECG device and the corresponding smart terminal. If the binding information of the corresponding smart terminal cannot be found, it is confirmed that it is not the ResetRequest message sent by the bound smart terminal, and an incorrect reset response message is returned.
  • the reset response message will be referred to as ResetResponse message in the following.
  • the ResetResponse message format can include the following fields:
  • EcgDataContract.TYPE_ERROR_CODE represents the error code, used to identify the error code corresponding to the cause of the error when an error occurs during the reset process.
  • the value of the EcgDataContract.TYPE_ERROR_CODE field can be the default value. For example: during the binding process on the ECG device side, if the device is not bound and cannot be reset, the ResetResponse message is used to carry the following fields to characterize this situation EcgDataContract.ERROR_CODE_NOT_BOND to notify the smart terminal side.
  • the method further includes:
  • the ECG device After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the reset process;
  • the second trigger instruction is used to instruct to abort the reset process.
  • the ECG device needs to obtain a trigger instruction to trigger related operations to start the reset process; in addition, if a trigger instruction to abort the reset is obtained during the reset process, the reset process can be immediately aborted.
  • triggering modes such as: triggering by physical keys, triggering by virtual keys, voice control, touch, and gesture triggering, etc.
  • the embodiment of the present invention does not limit the triggering modes.
  • the ECG device has a trigger electrode
  • the method further includes:
  • the ECG device When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  • the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the reset process ends. If the user releases the trigger electrode before the end, the reset process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the reset process, and when the user touches the trigger electrode again, the reset process is aborted.
  • an embodiment of the present invention provides a reset method implemented on the side of a smart terminal, and the method includes:
  • Step 2201 Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
  • Step 2202 Send a reset request message to the ECG device, where the reset request message includes at least the identification information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message from the ECG device, the smart terminal can call the reset interface to display the reset process and send a reset request message to the ECG device to request the ECG device to start the reset operation.
  • the invocation of the reset interface can also be triggered by user operations.
  • Step 2203 Receive a reset response message returned by the ECG device, and perform a reset operation on the smart terminal side when the reset response message indicates that the reset on the ECG device side is successful.
  • the smart terminal side When the reset response message indicates that the reset on the ECG device side is successful, the smart terminal side also performs the corresponding reset operation, including: searching for the binding information of the corresponding ECG device according to the address information of the ECG device carried in the reset response message , When the binding information of the corresponding ECG device is found, the binding information is deleted, and the binding relationship between the smart terminal and the corresponding ECG device is cleared. At the same time, the status of successful reset or prompt information is displayed through the reset interface of the smart terminal.
  • the method further includes: after sending a reset request message to the ECG device, starting a timer, and if the reset response message returned by the ECG device is not received after the timer expires, determining the reset request message When the number of sending of the reset request message has not reached the preset number of times, the reset request message is re-sent to the ECG device; when it is determined that the sending number of the reset request message reaches the preset number of times, stop sending the reset request message to the ECG device and abort the reset process .
  • the preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
  • an embodiment of the present invention provides a binding method implemented on the ECG device side.
  • the method mainly includes:
  • Step 2301 After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal.
  • the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
  • the binding method in the embodiment of the present invention is completed on the basis of establishing a communication connection between the ECG device and the smart terminal.
  • the embodiment of the present invention will subsequently elaborate on the process of establishing a communication connection between the ECG device and the smart terminal.
  • the EcgStatus message format can include the following fields: EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device.
  • the BLE connection mode can be used between the ECG device and the smart terminal, so
  • the Bluetooth address (BT_ADDRESS) of the ECG device can be used as the address information of the ECG device.
  • the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
  • EcgDataContract.TYPE_DEVICE_ID indicates the device ID of the ECG device.
  • the ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states.
  • EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation is completed. Before the binding operation is completed, the ECG device may not carry EcgDataContract.TYPE_DEVICE_ID in the message sent to the smart terminal.
  • Step 2302 Receive a binding request message sent by the smart terminal after receiving the ECG status notification message.
  • the binding request message includes at least the identification information and address information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a binding request message to the ECG device corresponding to the address based on the address information of the ECG device carried in the EcgStatus message.
  • the binding request message carries the identification information and address of the smart terminal information.
  • the binding request message will be referred to as BindRequest message for short later.
  • the BindRequest message format can include the following fields:
  • EcgDataContract.TYPE_IS_PUBLIC_ADDRESS indicates the address information of the ECG device, and the address information can be the public address information of the ECG device.
  • Step 2303 Return a binding response message to the smart terminal, and save the first binding information locally.
  • the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; the binding response message Include at least the address information of the ECG device.
  • BindResponse message format may include the following fields: EcgDataContract.TYPE_BT_ADDRESS.
  • the BindResponse message can also include the following fields: EcgDataContract.TYPE_ERROR_CODE, which represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process.
  • EcgDataContract.TYPE_ERROR_CODE represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process.
  • the EcgDataContract.TYPE_ERROR_CODE field The value can be the default value.
  • the ECG device after the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains a third trigger instruction, it sends an ECG status notification message to the smart terminal; the third trigger instruction is used to instruct to start binding process;
  • the ECG device obtains the third trigger instruction
  • the fourth trigger instruction is obtained, the binding process is terminated; the fourth trigger instruction is used to instruct the termination of the binding process.
  • the ECG device needs to obtain a trigger instruction to trigger related operations to start the binding process; in addition, during the binding process, if a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated.
  • a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated.
  • the embodiment of the present invention does not limit the triggering modes.
  • the ECG device has a trigger electrode.
  • the ECG device obtains a third trigger instruction, and when the trigger electrode is stopped, the ECG device obtains a fourth trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the third trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the fourth trigger instruction.
  • the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the binding process ends. If the user releases the trigger electrode before the end, the binding process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the binding process, and when the user touches the trigger electrode again, the binding process is terminated.
  • the trigger mode of the trigger instruction during the binding process may be different from the trigger mode of the trigger instruction during the reset process.
  • Embodiment 1 of the present invention provides a binding method implemented on the side of a smart terminal, and the method includes:
  • Step 2401 Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
  • the method may further include:
  • the fifth trigger instruction is used to instruct to start the binding process
  • the binding interface is invoked, and the binding interface is used for real-time update of the state change during the binding process, including displaying the successful binding state on the binding interface after the binding is completed.
  • the smart terminal needs to first start the binding program and call the corresponding binding interface, so that each state in the binding process can be displayed in real time through the interface.
  • Step 2402 Send a binding request message to the ECG device.
  • the binding request message includes at least the identification information and address information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message from the ECG device, the smart terminal sends a BindRequest message to the ECG device.
  • the operation of sending the BindRequest message to the ECG device may be triggered by a specific instruction or operation.
  • Step 2403 Receive the binding response message of the ECG device, and save the second binding information locally.
  • the second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; the binding response message includes at least Including the address information of the ECG device.
  • the smart terminal After receiving the BindResponse message from the ECG device, the smart terminal performs the binding operation on the smart terminal side, and locally saves the binding relationship between the smart terminal and the address information of the ECG device. After the binding is successful, the binding interface is used The status of successful binding is displayed to remind the user.
  • the timer is started. If the BindResponse message returned by the ECG device is not received after the timer expires, when it is determined that the number of times the BindRequest message has been sent does not exceed the preset number of times, Resend the binding request message to the ECG device; when it is determined that the number of times of sending the binding request message exceeds the preset number of times, stop sending the binding request message to the ECG device, and terminate the binding process with the corresponding ECG device.
  • the preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
  • the binding method of the embodiment of the present invention is established on the basis of establishing a communication connection between the ECG device and the smart terminal.
  • the communication connection between the ECG device and the smart terminal is established in the embodiment of the present invention.
  • the process includes:
  • Step 2501 Obtain a control instruction, which is used to instruct to start establishing a communication connection with the smart terminal.
  • the method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways.
  • the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation.
  • the ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures.
  • the method of triggering the control instruction is not limited in the embodiment of the present invention.
  • After the ECG device obtains the control instruction it starts to execute the process of establishing a communication connection with the smart terminal.
  • This connection is preferably a wireless connection.
  • the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
  • Step 2502 in response to the control instruction, determine the preset condition that is currently shown to be satisfied.
  • the preset conditions include at least: the first preset condition shown in 2502a, the second preset condition shown in 2502b, and the third preset condition shown in 2502c.
  • Step 2503 Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal.
  • the connection strategy includes at least: a first connection strategy 2503a corresponding to the first preset condition, a second connection strategy 2503b corresponding to the second preset condition, and a third connection strategy 2503c corresponding to the third preset condition.
  • the communication connection between the ECG device and the smart terminal may adopt the BLE connection mode.
  • the embodiment of the present invention is not limited to the BLE connection mode.
  • other connection establishment mechanisms of the embodiment of the present invention may be used. Any connection manner should also fall within the protection scope of the embodiments of the present invention.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection response returned by the bound smart terminal receives the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
  • the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal.
  • the terminal initiates a connection request.
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time
  • the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection request Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
  • connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
  • an embodiment of the present invention also provides a reset device applied to an ECG device end, including:
  • the first sending unit 2601 is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal.
  • the ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device ;
  • the first receiving unit 2602 is configured to receive a reset request message sent by the smart terminal after receiving the ECG status notification message, and the reset request message includes at least the identification information of the smart terminal;
  • the first processing unit 2603 is configured to perform a reset operation on the ECG device side
  • the second sending unit 2604 is configured to return a reset response message to the smart terminal after the reset operation is completed.
  • the reset operation includes:
  • the binding information of the corresponding smart terminal According to the identification information of the smart terminal carried in the reset request message, search for the binding information of the corresponding smart terminal. When the binding information of the corresponding smart terminal is found, the binding information is deleted, and the relationship between the ECG device and the corresponding smart terminal is cleared The binding relationship.
  • the reset response message includes the address information and error code of the ECG device, and the error code is used to identify whether the reset on the ECG device side is successful.
  • the first processing unit 2603 is configured to notify the first sending unit 2601 to send an ECG status notification message to the smart terminal when the ECG device obtains the first trigger instruction after the ECG device establishes a communication connection with the smart terminal;
  • the first trigger instruction is used to instruct to start the reset process;
  • the second trigger instruction is used to instruct to abort the reset process.
  • the ECG device has a trigger electrode.
  • the first processing unit 2603 obtains the first trigger instruction, and when the trigger electrode stops triggering, the first processing unit 2603 obtains the second trigger. instruction;
  • the first processing unit 2603 obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the first processing unit 2603 obtains the second trigger instruction.
  • an embodiment of the present invention also provides a reset device applied to the smart terminal side, including:
  • the second receiving unit 2701 is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
  • the third sending unit 2702 is configured to send a reset request message to the ECG device, and the reset request message includes at least the identification information of the smart terminal;
  • the third receiving unit 2703 is configured to receive the reset response message returned by the ECG device
  • the second processing unit 2704 is configured to perform a reset operation on the smart terminal side when the reset response message indicates that the reset on the ECG device side is successful.
  • the reset operation includes:
  • the binding information of the corresponding ECG device According to the address information of the ECG device carried in the reset response message, search for the binding information of the corresponding ECG device. When the binding information of the corresponding ECG device is found, the binding information is deleted, and the gap between the smart terminal and the corresponding ECG device is cleared The binding relationship.
  • the third sending unit 2702 is further configured to start a timer after sending a reset request message to the ECG device, and if the reset response message returned by the ECG device is not received after the timer expires, it is determined When the number of sending reset request messages has not reached the preset number of times, the reset request message is resent to the ECG device; when it is determined that the sending times of the reset request message reaches the preset number of times, stop sending the reset request message to the ECG device, and The reset process is aborted.
  • the electronic device 211 includes one or more processors 2111 and a memory 2112.
  • the processor 2111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 211 to perform desired functions.
  • CPU central processing unit
  • the processor 2111 may control other components in the electronic device 211 to perform desired functions.
  • the memory 2112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include random access memory (RAM) and/or cache memory (cache), for example.
  • the non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like.
  • One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 2111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function.
  • Various contents such as input signal, signal component, noise component, etc. can also be stored in the computer-readable storage medium.
  • the electronic device 211 may further include: an input device 2113 and an output device 2114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
  • the input device 2113 may include, for example, a keyboard, a mouse, and so on.
  • the output device 2114 can output various information to the outside, including determined distance information, direction information, and so on.
  • the output device 2114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
  • the electronic device 211 may also include any other appropriate components according to specific application conditions.
  • An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch.
  • the ECG device has at least two electrodes.
  • the first electrode is set on the first surface of the wristband, and the first surface is the wristband.
  • the side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer.
  • connection establishment method, binding method, and reset method in the embodiments of the present invention are used to provide an implementation solution for interaction between the smart watch and the ECG device on the wristband.
  • the way to trigger the ECG device to obtain instructions can be long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. And so on, the embodiment of the present invention does not limit it.
  • an ECG device in the embodiment of the present invention can be configured as a smart bracelet.
  • the ECG device has at least two electrodes.
  • the first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand.
  • the side of the ring used for contact with the user's skin when worn;
  • the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate.
  • connection establishment method, binding method, and reset method of the embodiments of the present invention can be used to provide an implementation solution for interaction between smart terminals such as smart phones and smart tablets and ECG devices on smart bracelets.
  • the way to trigger the ECG device to obtain instructions can be a long press, short press, or multiple pressing of the second electrode mentioned above.
  • it can also be other triggering methods, and it can also be other electrodes, such as those of an ECG device.
  • the third electrode and so on are not limited in the embodiment of the present invention.
  • an embodiment of the present invention provides a binding method implemented on the ECG device side, and the method mainly includes:
  • Step 3101 After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal.
  • the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
  • the ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on. The method of the embodiment of the present invention is used to provide a binding solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
  • the binding method in the embodiment of the present invention is completed on the basis of establishing a communication connection between the ECG device and the smart terminal.
  • the embodiment of the present invention will subsequently elaborate on the process of establishing a communication connection between the ECG device and the smart terminal.
  • EcgStatus message For the convenience of description, the ECG status notification message will be referred to as EcgStatus message.
  • the EcgStatus message format can include the following fields: EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device.
  • Bluetooth low energy (BLE, BLE, Bluetooth Low Energy) connection mode therefore, the embodiment of the present invention can use the Bluetooth address (BT_ADDRESS) of the ECG device as the address information of the ECG device.
  • BT_ADDRESS Bluetooth address
  • the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
  • EcgDataContract.TYPE_DEVICE_ID indicates the device ID of the ECG device.
  • the ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states.
  • EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation is completed. Before the binding operation is completed, the ECG device may not carry EcgDataContract.TYPE_DEVICE_ID in the message sent to the smart terminal.
  • Step 3102 Receive a binding request message sent by the smart terminal after receiving the ECG status notification message.
  • the binding request message includes at least the identification information and address information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a binding request message to the ECG device corresponding to the address based on the address information of the ECG device carried in the EcgStatus message.
  • the binding request message carries the identification information and address of the smart terminal information.
  • the binding request message will be referred to as BindRequest message for short later.
  • the BindRequest message format can include the following fields:
  • EcgDataContract.TYPE_IS_PUBLIC_ADDRESS indicates the address information of the ECG device, and the address information can be the public address information of the ECG device.
  • Step 3103 Return a binding response message to the smart terminal, and save the first binding information locally.
  • the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; the binding response message Include at least the address information of the ECG device.
  • BindResponse message format may include the following fields: EcgDataContract.TYPE_BT_ADDRESS.
  • the BindResponse message can also include the following fields: EcgDataContract.TYPE_ERROR_CODE, which represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process.
  • EcgDataContract.TYPE_ERROR_CODE represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process.
  • the EcgDataContract.TYPE_ERROR_CODE field The value can be the default value.
  • the ECG device after the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start binding process;
  • the ECG device obtains the first trigger instruction, during the execution of the binding process, if the second trigger instruction is obtained, the binding process is terminated; the second trigger instruction is used to instruct the termination of the binding process.
  • the ECG device needs to obtain a trigger instruction to trigger related operations to start the binding process; in addition, during the binding process, if a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated.
  • a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated.
  • the embodiment of the present invention does not limit the triggering modes.
  • the ECG device has a trigger electrode.
  • the ECG device obtains the first trigger instruction, and when the trigger electrode is stopped, the ECG device obtains the second trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  • the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the binding process ends. If the user releases the trigger electrode before the end, the binding process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the binding process, and when the user touches the trigger electrode again, the binding process is terminated.
  • an embodiment of the present invention provides a binding method implemented on the side of a smart terminal, and the method includes:
  • Step 3201 Receive an ECG status notification message from the ECG device.
  • the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
  • the method may further include:
  • the third trigger instruction is used to instruct to start the binding process
  • the binding interface is invoked, and the binding interface is used to update the state changes in the binding process in real time, including displaying the binding successful state on the binding interface after the binding is completed.
  • the smart terminal needs to first start the binding program and call the corresponding binding interface, so that each state in the binding process can be displayed in real time through the interface.
  • Step 3202 Send a binding request message to the ECG device.
  • the binding request message includes at least the identification information and address information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message from the ECG device, the smart terminal sends a BindRequest message to the ECG device.
  • the operation of sending the BindRequest message to the ECG device may be triggered by a specific instruction or operation.
  • Step 3203 Receive the binding response message of the ECG device, and save the second binding information locally.
  • the second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; the binding response message includes at least Including the address information of the ECG device.
  • the smart terminal After receiving the BindResponse message from the ECG device, the smart terminal performs the binding operation on the smart terminal side, and locally saves the binding relationship between the smart terminal and the address information of the ECG device. After the binding is successful, the binding interface is used The status of successful binding is displayed to remind the user.
  • the timer is started. If the BindResponse message returned by the ECG device is not received after the timer expires, when it is determined that the number of times the BindRequest message has been sent does not exceed the preset number of times, Resend the binding request message to the ECG device; when it is determined that the number of times of sending the binding request message exceeds the preset number of times, stop sending the binding request message to the ECG device, and terminate the binding process with the corresponding ECG device.
  • the preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
  • the binding method of the embodiment of the present invention is established on the basis of establishing a communication connection between the ECG device and the smart terminal.
  • the process includes:
  • Step 3301 Obtain a control instruction, where the control instruction is used to instruct to start establishing a communication connection with the smart terminal.
  • the ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on.
  • the information processing method of the embodiment of the present invention is used to provide a connection establishment solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
  • the method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways.
  • the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation.
  • the ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures.
  • the method of triggering the control instruction is not limited in the embodiment of the present invention.
  • After the ECG device obtains the control instruction it starts to execute the process of establishing a communication connection with the smart terminal.
  • This connection is preferably a wireless connection.
  • the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
  • Step 3302 in response to the control instruction, determine the preset condition that is currently shown to be satisfied.
  • the preset conditions include at least: the first preset condition shown in 3302a, the second preset condition shown in 3302b, and the third preset condition shown in 3302c.
  • Step 3303 Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal.
  • the connection strategy includes at least: a first connection strategy 3303a corresponding to the first preset condition, a second connection strategy 3303b corresponding to the second preset condition, and a third connection strategy 3303c corresponding to the third preset condition.
  • the communication connection between the ECG device and the smart terminal may adopt the BLE connection mode.
  • the embodiment of the present invention is not limited to the BLE connection mode.
  • other connection establishment mechanisms of the embodiment of the present invention may be used. Any connection manner should also fall within the protection scope of the embodiments of the present invention.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection response returned by the bound smart terminal receives the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
  • the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal.
  • the terminal initiates a connection request.
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time
  • the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection request Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
  • connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
  • an embodiment of the present invention also provides a binding device applied to an ECG device end, including:
  • the first sending unit 3401 is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal.
  • the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
  • the first receiving unit 3402 is configured to receive a binding request message sent by the smart terminal after receiving the ECG status notification message, and the binding request message includes at least the identification information and address information of the smart terminal;
  • the second sending unit 3403 is configured to return a binding response message to the smart terminal, and the binding response message includes at least the address information of the ECG device;
  • the first processing unit 3404 is configured to store the first binding information locally, and the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal.
  • the first sending unit 3401 is further configured to send an ECG status notification message to the smart terminal when the ECG device obtains the first trigger instruction after the ECG device establishes a communication connection with the smart terminal; the first trigger instruction is used for Start the binding process at the instruction;
  • the first processing unit 3404 is further configured to: after the ECG device obtains the first trigger instruction, during the binding process, if the second trigger instruction is obtained, the binding process is terminated; the second trigger instruction is used to instruct the termination of the binding process. Set process.
  • the ECG device has trigger electrodes
  • the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  • an embodiment of the present invention also provides a binding device applied to the smart terminal side, including:
  • the second receiving unit 3501 is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
  • the third sending unit 3502 is configured to send a binding request message to the ECG device, and the binding request message includes at least the identification information and address information of the smart terminal;
  • the third receiving unit 3503 is configured to receive a binding response message of the ECG device, and the binding response message includes at least the address information of the ECG device;
  • the second processing unit 3504 is configured to store the second binding information locally, and the second binding information at least includes the binding relationship between the address information of the smart terminal and the ECG device.
  • the second processing unit 3504 is further configured to obtain a third trigger instruction before obtaining the ECG status notification message from the ECG device, and the third trigger instruction is used to instruct to start the binding process; in response to The third trigger instruction is to call the binding interface.
  • the binding interface is used to update the state changes in the binding process in real time, including displaying the successful binding state on the binding interface after the binding is completed.
  • the third sending unit 3502 is further configured to start a timer after sending the binding request message to the ECG device. If the timer expires and the binding response message returned by the ECG device is not received, then When it is determined that the number of times of sending the binding request message has not reached the preset number of times, the binding request message is resent to the ECG device; when it is determined that the number of times of sending the binding request message reaches the preset number of times, the sending of the binding request to the ECG device is stopped Message and abort the binding process with the corresponding ECG device.
  • the electronic device 311 includes one or more processors 3111 and a memory 3112.
  • the processor 3111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 311 to perform desired functions.
  • CPU central processing unit
  • the memory 3112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include random access memory (RAM) and/or cache memory (cache), for example.
  • the non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like.
  • One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 3111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function.
  • Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
  • the electronic device 311 may further include: an input device 3113 and an output device 3114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
  • the input device 3113 may include, for example, a keyboard, a mouse, and so on.
  • the output device 3114 can output various information to the outside, including determined distance information, direction information, and so on.
  • the output device 3114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
  • FIG. 17 only shows some of the components related to the present application in the electronic device 311, and omits components such as a bus, an input/output interface, and the like.
  • the electronic device 311 may also include any other appropriate components.
  • An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch.
  • the ECG device has at least two electrodes.
  • the first electrode is set on the first surface of the wristband, and the first surface is the wristband.
  • the side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer.
  • the binding method in the embodiment of the present invention is used to provide an implementation solution for establishing binding between the smart watch and the ECG device on the wristband.
  • the way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. Electrodes, etc., are not limited in the embodiment of the present invention.
  • an ECG device in the embodiment of the present invention can be configured as a smart bracelet.
  • the ECG device has at least two electrodes.
  • the first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand.
  • the side of the ring used for contact with the user's skin when worn;
  • the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate.
  • the binding method of the embodiment of the present invention can be used to provide an implementation solution for establishing binding between smart terminals such as smart phones and smart tablets and ECG devices on smart bracelets.
  • the way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above.
  • it can also be other trigger methods, and it can also be other electrodes, such as ECG devices.
  • the third electrode, etc., are not limited in the embodiment of the present invention.
  • an embodiment of the present invention provides an ECG measurement method implemented on an ECG device, including:
  • Step 4101 After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal.
  • the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
  • the ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on.
  • the method of the embodiment of the present invention is used to provide an electrocardiogram measurement solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
  • the electrocardiogram measurement method in the embodiment of the present invention is completed on the basis that the ECG device has been bound to the smart terminal, and the process of establishing the binding between the ECG device and the smart terminal will be described in detail later in the embodiment of the present invention.
  • the EcgStatus message format may include the following fields: EcgDataContract.TYPE_DEVICE_ID, which represents the device identification of the ECG device.
  • EcgDataContract.TYPE_BT_ADDRESS indicates the address information of the ECG device.
  • the Bluetooth Low Energy (BLE, Bluetooth Low Energy) connection method can be used between the ECG device and the smart terminal. Therefore, the embodiment of the present invention can set the Bluetooth address (BT_ADDRESS) of the ECG device ) Is used as the address information of the ECG device.
  • BT_ADDRESS Bluetooth address
  • the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
  • the ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states.
  • EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation of the ECG device and the smart terminal is completed. Before the binding operation is completed, the ECG device may not be carried in the message sent to the smart terminal EcgDataContract.TYPE_DEVICE_ID.
  • Step 4102 Receive a measurement request message sent by the smart terminal after receiving the ECG status notification message, start ECG measurement, and send a measurement start message to the smart terminal.
  • the smart terminal After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a measurement request message to the corresponding ECG device based on the identification information of the ECG device carried in the EcgStatus message, and the measurement request message carries the identification information of the smart terminal.
  • the measurement request message will be referred to as the MeasureRequest message in the following.
  • the MeasureRequest message format can include the following fields:
  • EcgDataContract.TYPE_MEASURE_MODE which represents the measurement mode information, used to identify or describe the measurement mode content. Different measurement modes can correspond to different measurement item content, display styles, and so on.
  • the ECG device After receiving the MeasureRequest message, the ECG device confirms that it is the MeasureRequest message sent by the bound smart terminal, and then starts the ECG measurement operation and sends a measurement start message to the smart terminal.
  • the measurement start message will be referred to as MeasureStart message for short in the following.
  • the format of the MeasureStart message may include the following fields:
  • Step 4103 During the ECG measurement process, the measurement data message is sent to the smart terminal in real time.
  • the ECG device executes the corresponding measurement item content according to the measurement mode information carried in the measurement request message, obtains the measurement data message of the corresponding measurement item, and sends the measurement data message to the smart terminal in real time.
  • the corresponding relationship between the specific measurement mode and the content of the measurement item can be set according to actual needs, which is not limited in the embodiment of the present invention.
  • the measurement data message can be represented by MeasureData, and its format can include the following fields:
  • EcgDataContract.TYPE_MEASURE_DATA indicates the measurement data corresponding to the measurement process.
  • Step 4104 When the measurement ends, send a measurement end message to the smart terminal.
  • the MeastureEnd message format may include the following fields:
  • EcgDataContract.TYPE_ERROR_CODE represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the measurement process.
  • the value of the EcgDataContract.TYPE_ERROR_CODE field can be the default value.
  • the method further includes:
  • the ECG device After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the measurement process;
  • the ECG device when the ECG device is performing a measurement process, if a second trigger instruction is obtained, the measurement process is suspended; the second trigger instruction is used to instruct the suspension of the measurement process.
  • the ECG device needs to obtain a trigger instruction to trigger related operations to start the measurement process; in addition, during the measurement process, if a trigger instruction to stop the measurement is obtained, the measurement process can be immediately suspended.
  • triggering modes such as: triggering through physical buttons, triggering virtual buttons, voice control, touch, and gesture triggering, etc.
  • the embodiment of the present invention does not limit the triggering modes.
  • the ECG device has a trigger electrode
  • the method further includes:
  • the ECG device When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  • the command trigger process completed by the trigger electrode can have multiple control logics, which can be that the user keeps pressing the trigger electrode until the measurement process ends. If the user releases the trigger electrode before the end, the measurement process is immediately terminated; also It can be that the user touches the trigger electrode once to start the measurement process, and when the user touches the trigger electrode again, the measurement process is stopped.
  • an embodiment of the present invention provides an electrocardiogram measurement method implemented on the side of a smart terminal, and the method includes:
  • Step 4201 Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
  • Step 4202 Send a measurement request message to the ECG device.
  • the smart terminal After receiving the EcgStatus message from the ECG device, the smart terminal can call the interactive interface for real-time update of status changes and data changes during the measurement process, and send a measurement request message to the ECG device to request the ECG device to start execution ECG measurement operation.
  • Step 4203 Receive the measurement start message and the measurement data message sent by the ECG device, and display the corresponding measurement data through the interactive interface.
  • the ECG device After receiving the measurement start message sent by the ECG device, start to receive the real-time measurement data message from the ECG device. After receiving the real-time measurement data message, analyze the corresponding measurement data and pass it according to the display strategy on the smart terminal side.
  • the interactive interface displays the corresponding measurement data in real time.
  • the specific display strategy can be set according to actual needs, which is not limited in the embodiment of the present invention.
  • Step 4204 When receiving the measurement end message of the smart terminal, generate a measurement result according to the obtained measurement data, and display the measurement result through an interactive interface.
  • the ECG device will send a measurement end message to the smart terminal at the end of the measurement.
  • the smart terminal After the smart terminal receives the measurement end message from the ECG device, it will generate measurement results based on all measurement data received during the measurement process and display them through the interactive interface
  • the measurement results are available for users to view.
  • the display mode (chart, etc.), type, style, etc. of the measurement result can be set according to actual needs, and the embodiment of the present invention does not limit it.
  • the method further includes: starting a timer after sending the measurement request message to the ECG device, and if the measurement start message returned by the ECG device is not received after the timer expires, determining the number of times the measurement request message is sent When the preset number of times is not reached, the measurement request message is retransmitted to the ECG device; when it is determined that the number of sending the measurement request message reaches the preset number of times, the measurement request message is stopped to the ECG device and the measurement process is suspended.
  • the preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
  • an embodiment of the present invention provides a binding method implemented on the ECG device side.
  • the method mainly includes:
  • Step 4301 After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal.
  • the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
  • the binding method in the embodiment of the present invention is completed on the basis of establishing a communication connection between the ECG device and the smart terminal.
  • the embodiment of the present invention will subsequently elaborate on the process of establishing a communication connection between the ECG device and the smart terminal.
  • EcgStatus message For the convenience of description, the ECG status notification message will be referred to as EcgStatus message.
  • the EcgStatus message format can include the following fields: EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device.
  • Bluetooth low energy (BLE, BLE, Bluetooth Low Energy) connection mode therefore, the embodiment of the present invention can use the Bluetooth address (BT_ADDRESS) of the ECG device as the address information of the ECG device.
  • BT_ADDRESS Bluetooth address
  • the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
  • EcgDataContract.TYPE_DEVICE_ID indicates the device ID of the ECG device.
  • the ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states.
  • EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation is completed. Before the binding operation is completed, the ECG device may not carry EcgDataContract.TYPE_DEVICE_ID in the message sent to the smart terminal.
  • Step 4302 Receive a binding request message sent by the smart terminal after receiving the ECG status notification message.
  • the binding request message includes at least the identification information and address information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a binding request message to the ECG device corresponding to the address based on the address information of the ECG device carried in the EcgStatus message.
  • the binding request message carries the identification information and address of the smart terminal information.
  • the binding request message will be referred to as BindRequest message for short later.
  • the BindRequest message format can include the following fields:
  • EcgDataContract.TYPE_IS_PUBLIC_ADDRESS indicates the address information of the ECG device, and the address information can be the public address information of the ECG device.
  • Step 4303 Return a binding response message to the smart terminal, and save the first binding information locally.
  • the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; the binding response message Include at least the address information of the ECG device.
  • BindResponse message format may include the following fields: EcgDataContract.TYPE_BT_ADDRESS.
  • the BindResponse message can also include the following fields: EcgDataContract.TYPE_ERROR_CODE, which represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process.
  • EcgDataContract.TYPE_ERROR_CODE represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process.
  • the EcgDataContract.TYPE_ERROR_CODE field The value can be the default value.
  • the ECG device after the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains a third trigger instruction, it sends an ECG status notification message to the smart terminal; the third trigger instruction is used to instruct to start binding process;
  • the ECG device obtains the third trigger instruction
  • the fourth trigger instruction is obtained, the binding process is terminated; the fourth trigger instruction is used to instruct the termination of the binding process.
  • the ECG device needs to obtain a trigger instruction to trigger related operations to start the binding process; in addition, during the binding process, if a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated.
  • a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated.
  • the embodiment of the present invention does not limit the triggering modes.
  • the ECG device has a trigger electrode.
  • the ECG device obtains a third trigger instruction, and when the trigger electrode is stopped, the ECG device obtains a fourth trigger instruction;
  • the ECG device when the trigger electrode is triggered for the first time, the ECG device obtains the third trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the fourth trigger instruction.
  • the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the binding process ends. If the user releases the trigger electrode before the end, the binding process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the binding process, and when the user touches the trigger electrode again, the binding process is terminated.
  • the trigger mode of the trigger command during the binding process may be different from the trigger mode of the trigger command during the ECG measurement process.
  • the first embodiment of the present invention provides a binding method implemented on the side of a smart terminal, and the method includes:
  • Step 4401 Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
  • the method may further include:
  • the fifth trigger instruction is used to instruct to start the binding process
  • the binding interface is invoked, and the binding interface is used for real-time update of the state change during the binding process, including displaying the successful binding state on the binding interface after the binding is completed.
  • the smart terminal needs to first start the binding program and call the corresponding binding interface, so that each state in the binding process can be displayed in real time through the interface.
  • Step 4402 Send a binding request message to the ECG device.
  • the binding request message includes at least the identification information and address information of the smart terminal.
  • the smart terminal After receiving the EcgStatus message from the ECG device, the smart terminal sends a BindRequest message to the ECG device.
  • the operation of sending the BindRequest message to the ECG device may be triggered by a specific instruction or operation.
  • Step 4403 Receive the binding response message of the ECG device, and save the second binding information locally.
  • the second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; the binding response message includes at least Including the address information of the ECG device.
  • the smart terminal After receiving the BindResponse message from the ECG device, the smart terminal performs the binding operation on the smart terminal side, and locally saves the binding relationship between the smart terminal and the address information of the ECG device. After the binding is successful, the binding interface is used The status of successful binding is displayed to remind the user.
  • the timer is started. If the BindResponse message returned by the ECG device is not received after the timer expires, when it is determined that the number of times the BindRequest message has been sent does not exceed the preset number of times, Resend the binding request message to the ECG device; when it is determined that the number of times of sending the binding request message exceeds the preset number of times, stop sending the binding request message to the ECG device, and terminate the binding process with the corresponding ECG device.
  • the preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
  • the binding method of the embodiment of the present invention is established on the basis of establishing a communication connection between the ECG device and the smart terminal.
  • the communication connection between the ECG device and the smart terminal is established in the embodiment of the present invention.
  • the process includes:
  • Step 4501 Obtain a control instruction, where the control instruction is used to instruct to start establishing a communication connection with the smart terminal.
  • the method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways.
  • the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation.
  • the ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures.
  • the method of triggering the control instruction is not limited in the embodiment of the present invention.
  • After the ECG device obtains the control instruction it starts to execute the process of establishing a communication connection with the smart terminal.
  • This connection is preferably a wireless connection.
  • the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
  • Step 4502 in response to the control instruction, determine the preset condition that is currently shown to be satisfied.
  • the preset conditions include at least: the first preset condition shown in 4502a, the second preset condition shown in 4502b, and the third preset condition shown in 4502c.
  • Step 4503 Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal.
  • the connection strategy includes at least: 4503a a first connection strategy corresponding to the first preset condition, 4503b a second connection strategy corresponding to the second preset condition, and 4503c a third connection strategy corresponding to the third preset condition.
  • the communication connection between the ECG device and the smart terminal may adopt the BLE connection mode.
  • the embodiment of the present invention is not limited to the BLE connection mode.
  • other connection establishment mechanisms of the embodiment of the present invention may be used. Any connection manner should also fall within the protection scope of the embodiments of the present invention.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection response returned by the bound smart terminal receives the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
  • the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal.
  • the terminal initiates a connection request.
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time
  • the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
  • the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
  • the communication connection process with the smart terminal is executed according to the first connection strategy, including:
  • connection request Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
  • connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
  • the communication connection process with the smart terminal is executed according to the second connection strategy, including:
  • the bound smart terminal If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
  • the third preset condition is: there is no smart terminal bound to the ECG device;
  • the communication connection process with the smart terminal is executed according to the third connection strategy, including:
  • connection response returned by the scanned smart terminal and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
  • the communication connection process is terminated.
  • the ECG device can initiate a connection request to each of the scanned smart terminals in turn.
  • a smart terminal successfully establishes a connection
  • the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
  • the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
  • an embodiment of the present invention also provides an electrocardiogram measurement device applied to an ECG device end, including:
  • the first sending unit 4601 after the ECG device establishes a communication connection with the smart terminal, sends an ECG status notification message to the smart terminal.
  • the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
  • the first receiving unit 4602 is configured to receive a measurement request message sent by the smart terminal after receiving the ECG status notification message
  • the first processing unit 4603 is configured to start ECG measurement after obtaining the measurement request message
  • the second sending unit 4604 is configured to send a measurement start message to the smart terminal, and during the ECG measurement process, send the measurement data message to the smart terminal in real time;
  • the third sending unit 4605 is configured to send a measurement end message to the smart terminal when the measurement ends.
  • the measurement request message includes identification information of the smart terminal and measurement mode information; wherein, the measurement mode information is used to identify or describe the measurement mode content;
  • the first processing unit 4603 is further configured to execute a corresponding measurement item according to the measurement mode information carried in the measurement request message, and obtain a measurement data message of the corresponding measurement item.
  • the measurement data message includes a measurement process and measurement data corresponding to the measurement process.
  • the first processing unit 4603 is configured to notify the first sending unit 4601 to send to the smart terminal when the ECG device obtains the first trigger instruction after the ECG device establishes a communication connection with the smart terminal ECG status notification message; the first trigger instruction is used to instruct to start the measurement process;
  • the second trigger instruction is used to instruct the suspension of the measurement process.
  • the ECG device has a trigger electrode.
  • the first processing unit 4603 obtains the first trigger instruction, and when the trigger electrode stops triggering, the first processing unit 4603 obtains the second trigger instruction;
  • the first processing unit 4603 obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the first processing unit 4603 obtains the second trigger instruction.
  • an embodiment of the present invention also provides a binding device applied to the smart terminal side, including:
  • the second receiving unit 4701 is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
  • the fourth sending unit 4702 is configured to send a measurement request message to the ECG device
  • the third receiving unit 4703 is configured to receive a measurement start message and a measurement data message sent by the ECG device;
  • the second processing unit 4704 is configured to display corresponding measurement data through an interactive interface
  • the fourth receiving unit 4705 is configured to receive the measurement end message of the smart terminal
  • the second processing unit 4704 is further configured to, when obtaining the measurement end message, generate a measurement result according to the obtained measurement data, and display the measurement result through the interactive interface.
  • the fourth sending unit 4702 is further configured to start a timer after sending the measurement request message to the ECG device. If the timer expires and the measurement start message returned by the ECG device is not received, it is determined that the number of times the measurement request message has been sent has not reached When the preset number of times, the measurement request message is retransmitted to the ECG device; when it is determined that the number of sending the measurement request message reaches the preset number of times, stop sending the measurement request message to the ECG device, and stop the measurement process.
  • the electronic device 411 includes one or more processors 4111 and a memory 4112.
  • the processor 4111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 411 to perform desired functions.
  • CPU central processing unit
  • the memory 4112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include random access memory (RAM) and/or cache memory (cache), for example.
  • the non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like.
  • One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 4111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function.
  • Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
  • the electronic device 411 may further include: an input device 4113 and an output device 4114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
  • the input device 4113 may include, for example, a keyboard, a mouse, and so on.
  • the output device 4114 can output various information to the outside, including determined distance information, direction information, and so on.
  • the output device 4114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
  • the electronic device 411 may also include any other appropriate components.
  • An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch.
  • the ECG device has at least two electrodes.
  • the first electrode is set on the first surface of the wristband, and the first surface is the wristband.
  • the side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer.
  • connection establishment method, the binding method, and the electrocardiogram measurement method in the embodiments of the present invention are used to provide an implementation solution for the electrocardiogram measurement interaction between the smart watch and the ECG device on the wristband.
  • the way to trigger the ECG device to obtain instructions can be long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. And so on, the embodiment of the present invention does not limit it.
  • an ECG device in the embodiment of the present invention can be configured as a smart bracelet.
  • the ECG device has at least two electrodes.
  • the first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand.
  • the side of the ring used for contact with the user's skin when worn;
  • the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface.
  • the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate.
  • connection establishment method, binding method, and electrocardiogram measurement method of the embodiments of the present invention can be used to provide an implementation solution for electrocardiogram measurement interaction between smart terminals such as smart phones and smart tablets and ECG devices on smart bracelets.
  • the way to trigger the ECG device to obtain instructions can be a long press, short press, or multiple pressing of the second electrode mentioned above.
  • it can also be other triggering methods, and it can also be other electrodes, such as those of an ECG device.
  • the third electrode and so on are not limited in the embodiment of the present invention.
  • the embodiments of the present application may also be computer program products, which include computer program instructions that, when run by a processor, cause the processor to execute the “exemplary method” described above in this specification.
  • the steps in the method according to various embodiments of the present application are described in the section.
  • the computer program product may use any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application.
  • the programming languages include object-oriented programming languages, such as Java, C++, etc. , Also includes conventional procedural programming languages, such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
  • the embodiment of the present application may also be a computer-readable storage medium, on which computer program instructions are stored.
  • the processor executes the "exemplary method" part of this specification. The steps in the method according to various embodiments of the application are described in.
  • the computer-readable storage medium may adopt any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • each component or each step can be decomposed and/or recombined.
  • decompositions and/or recombinations shall be regarded as equivalent solutions of this application.

Abstract

Disclosed in the present invention are an information processing method and apparatus, and an electronic device and a computer readable storage medium, applied to an ECG device. The method comprises: obtaining a control instruction, the control instruction being used for instructing to establish communication connection with an intelligent terminal; in response to the control instruction, executing a communication connection process with the intelligent terminal according to a first connection policy when it is determined that a first preset condition is currently satisfied; when it is determined that a second preset condition is currently satisfied, executing a communication connection process with the intelligent terminal according to a second connection policy; and when it is determined that a third preset condition is currently satisfied, executing a communication connection process with the intelligent terminal according to a third connection policy. Implementation of the present invention resolves the problem of establishing connection between the intelligent terminal and the ECG device, and provides a basis for intelligent terminal and ECG device function development.

Description

信息处理方法、装置、电子设备和计算机可读存储介质Information processing method, device, electronic equipment and computer readable storage medium
本申请要求了2020年4月2日提交的、申请号为202010255874.7、发明名称为“一种信息处理方法和装置、电子设备和计算机存储介质”,2020年4月2日提交的、申请号为202010256331.7、发明名称为“一种重置方法和装置、电子设备和计算机存储介质”,2020年4月2日提交的、申请号为202010255589.5、发明名称为“一种绑定方法和装置、电子设备和计算机存储介质”,以及2020年4月2日提交的、申请号为202010255591.2、发明名称为“一种心电测量方法和装置、电子设备和计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires that the application number is 202010255874.7, and the invention title is "an information processing method and device, electronic equipment and computer storage medium" submitted on April 2, 2020, and the application number submitted on April 2, 2020 is 202010256331.7, the title of the invention is "a reset method and device, electronic equipment and computer storage medium", and the application number is 202010255589.5 submitted on April 2, 2020, and the title of the invention is "a binding method and device, electronic equipment" And computer storage media”, and the priority of the Chinese patent application filed on April 2, 2020, with the application number 202010255591.2, and the invention title “an electrocardiographic measurement method and device, electronic equipment and computer storage medium”, which The entire content is incorporated into this application by reference.
技术领域Technical field
本发明涉及智能终端技术领域,尤其涉及一种信息处理方法、装置、电子设备和计算机可读存储介质。The present invention relates to the technical field of smart terminals, and in particular to an information processing method, device, electronic equipment, and computer-readable storage medium.
背景技术Background technique
随着智能终端的发展以及智能终端在各个领域和应用场景中的使用,智能终端的种类和功能也变得丰富和多样。通过智能终端和心电图(ECG,Electro Cardio Grams)设备方便实现用户心电图的测量,是智能终端在又一技术领域和应用场景中的功能扩展。在此创新概念下,怎样实现智能终端与ECG设备间的连接,连接方案机制应当怎样设计,是亟待解决的技术问题。With the development of smart terminals and their use in various fields and application scenarios, the types and functions of smart terminals have become rich and diverse. It is convenient to measure the user's ECG through smart terminals and electrocardiograph (ECG, Electrocardio Grams) equipment, which is a functional extension of smart terminals in another technical field and application scenario. Under this innovative concept, how to realize the connection between the smart terminal and the ECG device, and how the connection scheme mechanism should be designed, are technical problems to be solved urgently.
发明内容Summary of the invention
本发明提供一种信息处理方法和装置、电子设备和计算机可读存储介质,以至少解决现有技术中存在的以上技术问题。The present invention provides an information processing method and device, electronic equipment, and computer-readable storage medium to at least solve the above technical problems existing in the prior art.
第一方面,本发明提供一种信息处理方法,应用于心电图ECG设备,所述方法包括:In the first aspect, the present invention provides an information processing method, which is applied to an ECG device, and the method includes:
获得控制指令,所述控制指令用于指示开始创建与智能终端的通信连接;Obtaining a control instruction, the control instruction being used to instruct to start creating a communication connection with the smart terminal;
响应于所述控制指令,在确定当前满足第一预设条件时,按第一连接策略执行与所述智能终端间的通信连接过程;In response to the control instruction, when it is determined that the first preset condition is currently met, execute the communication connection process with the smart terminal according to the first connection strategy;
在确定当前满足第二预设条件时,按第二连接策略执行与所述智能终端间的通信连接过程;When it is determined that the second preset condition is currently met, execute the communication connection process with the smart terminal according to the second connection strategy;
在确定当前满足第三预设条件时,按第三连接策略执行与所述智能终端间的通信连接过程。When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy.
在一可实施方式中,所述第一预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址为公共地址;In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
相应的,所述按第一连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the first connection strategy includes:
向所述已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
在一可实施方式中,所述第二预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址不是所述公共地址;In an implementable manner, the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
相应的,所述按第二连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the second connection strategy includes:
发起对所述已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
若未扫描到已绑定的所述智能终端,则中止所述通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
在一可实施方式中,所述第一预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址为公共地址;In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
相应的,所述按第一连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the first connection strategy includes:
向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;Initiate a connection request to the bound smart terminal, receive a connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly;
若与所述已绑定的智能终端件的连接建立失败,则发起对所述已绑定智能终端的扫描;If the establishment of the connection with the bound smart terminal fails, initiate a scan of the bound smart terminal;
若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
若到扫描超时,未扫描到所述已绑定的智能终端,而仅扫描到未绑定的智能终端,则向所述未绑定的智能终端发起连接请求,接收所述未绑定的智能终端返回的连接响应,并依此创建与所述未绑定的智能终端间的连接通路;If the scan timeout is reached and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the unbound smart terminal is received. The connection response returned by the terminal, and a connection path with the unbound smart terminal is created accordingly;
若扫描超时仍未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned after the scan timeout, the communication connection process is terminated.
在一可实施方式中,所述第二预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址不是所述公共地址;In an implementable manner, the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
相应的,所述按第二连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the second connection strategy includes:
发起对所述已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
若到扫描超时,未扫描到所述已绑定的智能终端,而仅扫描到未绑定的智能终端,则向所述未绑定的智能终端发起连接请求,接收所述未绑定的智能终端返回的连接响应,并依此创建与所述未绑定的智能终端间的连接通路;If the scan timeout is reached and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the unbound smart terminal is received. The connection response returned by the terminal, and a connection path with the unbound smart terminal is created accordingly;
若扫描超时仍未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned after the scan timeout, the communication connection process is terminated.
在一可实施方式中,所述第三预设条件为:所述ECG设备没有绑定的智能终端;In an implementation manner, the third preset condition is: there is no smart terminal bound to the ECG device;
相应的,所述按第三连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the third connection strategy includes:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收所述扫描到的智能终端返回的连接响应,并依此创建与所述扫描到的智能终端间的连接通路;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly;
若未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
第二方面,本发明提供一种信息处理装置,应用于心电图ECG设备,所述装置包括:In a second aspect, the present invention provides an information processing device, which is applied to an electrocardiogram ECG device, and the device includes:
获得单元,用于获得控制指令,所述控制指令用于指示开始创建与智能终端的通信连接;An obtaining unit, configured to obtain a control instruction, the control instruction being used to instruct to start creating a communication connection with the smart terminal;
执行单元,响应于所述控制指令,在确定当前满足第一预设条件时,按第一连接策略执行与所述智能终端间的通信连接过程;在确定当前满足第二预设条件时,按第二连接策略执行与所述智能终端间的通信连接过程;在确定当前满足第三预设条件时,按第三连接策略执行与所述智能终端间的通信连接过程。The execution unit, in response to the control instruction, when it is determined that the first preset condition is currently met, executes the communication connection process with the smart terminal according to the first connection strategy; when it is determined that the second preset condition is currently met, press The second connection strategy executes the communication connection process with the smart terminal; when it is determined that the third preset condition is currently met, the third connection strategy executes the communication connection process with the smart terminal.
在一可实施方式中,所述第一预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址为公共地址;In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
所述执行单元进一步用于,按以下第一连接策略执行与所述智能终端间的通信连接过程:The execution unit is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
向所述已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
在一可实施方式中,所述第二预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址不是所述公共地址;In an implementable manner, the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
所述执行单元进一步用于,按以下第二连接策略执行与所述智能终端间的通信连接过程:The execution unit is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
发起对所述已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
若未扫描到已绑定的所述智能终端,则中止所述通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
在一可实施方式中,所述第一预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址为公共地址;In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
所述执行单元进一步用于,按以下第一连接策略执行与所述智能终端间的通信连接过程:The execution unit is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;Initiate a connection request to the bound smart terminal, receive a connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly;
若与所述已绑定的智能终端件的连接建立失败,则发起对所述已绑定智能终端的扫描;If the establishment of the connection with the bound smart terminal fails, initiate a scan of the bound smart terminal;
若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
若到扫描超时,未扫描到所述已绑定的智能终端,而仅扫描到未绑定的智能终端,则向所述未绑定的智能终端发起连接请求,接收所述未绑定的智能终端返回的连接响应,并依此创建与所述未绑定的智能终端间的连接通路;If the scan timeout is reached and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the unbound smart terminal is received. The connection response returned by the terminal, and a connection path with the unbound smart terminal is created accordingly;
若扫描超时仍未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned after the scan timeout, the communication connection process is terminated.
在一可实施方式中,所述第二预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址不是所述公共地址;In an implementable manner, the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the public address;
所述执行单元进一步用于,按以下第二连接策略执行与所述智能终端间的通信连接过程:The execution unit is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
发起对所述已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
若到扫描超时,未扫描到所述已绑定的智能终端,而仅扫描到未绑定的智能终端,则向所述未绑定的智能终端发起连接请求,接收所述未绑定的智能终端返回的连接响应,并依此创建与所述未绑定的智能终端间的连接通路;If the scan timeout is reached and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the unbound smart terminal is received. The connection response returned by the terminal, and a connection path with the unbound smart terminal is created accordingly;
若扫描超时仍未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned after the scan timeout, the communication connection process is terminated.
在一可实施方式中,所述第三预设条件为:所述ECG设备没有绑定的智能终端;In an implementation manner, the third preset condition is: there is no smart terminal bound to the ECG device;
所述执行单元进一步用于,按以下第三连接策略执行与所述智能终端间的通信连接过程:The execution unit is further configured to execute the communication connection process with the smart terminal according to the following third connection strategy:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收所述扫描到的智能终端返回的连接响应,并依此创建与所述扫描到的智能终端间的连接通路;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly;
若未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
第三方面,本发明提供一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行本发明所述的信息处理方法。In a third aspect, the present invention provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the information processing method of the present invention.
第四方面,本发明提供一种电子设备,处理器;In a fourth aspect, the present invention provides an electronic device and a processor;
用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现本发明所述的信息处理方法。The processor is configured to read the executable instructions from the memory and execute the instructions to implement the information processing method of the present invention.
在一可实施方式中,所述智能终端为智能穿戴终端,所述ECG设备设置于所述智能穿戴终端的穿戴配件上,所述穿戴配件用于将所述智能穿戴设备穿戴于用户。In an implementation manner, the smart terminal is a smart wearable terminal, the ECG device is set on a wearable accessory of the smart wearable terminal, and the wearable accessory is used to wear the smart wearable device to a user.
通过实施本发明的信息处理方法和装置、电子设备和计算机可读存储介质,解决了智能终端与ECG设备间如何建立连接的问题,为智能终端和ECG设备的功能开发提供了基础,且连接方案机制的设计简洁高效,不过多占用设备的处理器资源,有利于节省智能终端和ECG设备的处理器资源和能耗,实现效率高、时间短连接建立过程。By implementing the information processing method and device, electronic equipment, and computer-readable storage medium of the present invention, the problem of how to establish a connection between the smart terminal and the ECG equipment is solved, and the basis for the function development of the smart terminal and the ECG equipment is provided, and the connection scheme The design of the mechanism is simple and efficient, but it does not occupy too much processor resources of the device, which is conducive to saving the processor resources and energy consumption of smart terminals and ECG devices, and realizes the connection establishment process with high efficiency and short time.
第五方面,本发明提供一种重置方法,应用于心电图ECG设备,所述方法包括:In a fifth aspect, the present invention provides a reset method applied to an ECG device, the method includes:
在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息;After the ECG device establishes a communication connection with the smart terminal, send an ECG status notification message to the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device;
接收智能终端在收到ECG状态通知消息后发送的重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;Receiving a reset request message sent by a smart terminal after receiving an ECG status notification message, where the reset request message includes at least the identification information of the smart terminal;
执行所述ECG设备侧的重置操作,并在所述重置操作完成后向所述智能终端返回重置响应消息。Perform a reset operation on the ECG device side, and return a reset response message to the smart terminal after the reset operation is completed.
在一可实施方式中,所述执行ECG设备侧的重置操作,包括:In a possible implementation, the performing the reset operation on the ECG device side includes:
根据所述重置请求消息中携带的所述智能终端的标识信息,查找对应所述智能终端的绑定信息,在查找到对应所述智能终端的绑定信息时,将所述绑定信息删除,并清除所述ECG设备与相应智能终端间的绑定关系。According to the identification information of the smart terminal carried in the reset request message, the binding information corresponding to the smart terminal is searched, and when binding information corresponding to the smart terminal is found, the binding information is deleted , And clear the binding relationship between the ECG device and the corresponding smart terminal.
在一可实施方式中,所述重置响应消息中包括所述ECG设备的地址信息和错误码,所述错误码用于标识所述ECG设备侧的重置是否成功。In an implementation manner, the reset response message includes address information and an error code of the ECG device, and the error code is used to identify whether the reset on the ECG device side is successful.
在一可实施方式中,所述方法还包括:In a possible implementation, the method further includes:
在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,向所述智能终端发送ECG状态通知消息;所述第一触发指令用于指示开始重置过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the reset process;
相应的,在所述ECG设备执行重置过程中,若获得第二触发指令,则中止所述重置过程;所述第二触发指令用于指示中止重置过程。Correspondingly, during the reset process of the ECG device, if a second trigger instruction is obtained, the reset process is aborted; the second trigger instruction is used to instruct the reset process to be aborted.
在一可实施方式中,所述ECG设备具有触发电极,所述方法还包括:In a possible implementation manner, the ECG device has a trigger electrode, and the method further includes:
当所述触发电极被触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被停止触发时,所述ECG设备获得所述第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
或者,当所述触发电极被第一次触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被第二次触发时,所述ECG设备获得所述第二触发指令。Alternatively, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
第六方面,本发明提供一种重置方法,应用于智能终端,所述方法包括:In a sixth aspect, the present invention provides a reset method applied to a smart terminal, and the method includes:
接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;Receiving an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
向所述ECG设备发送重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;Sending a reset request message to the ECG device, where the reset request message includes at least the identification information of the smart terminal;
接收所述ECG设备返回的重置响应消息,在所述重置响应消息表明所述ECG设备侧的重置成功时,执行所述智能终端侧的重置操作。A reset response message returned by the ECG device is received, and when the reset response message indicates that the reset on the ECG device side is successful, a reset operation on the smart terminal side is performed.
在一可实施方式中,所述执行智能终端侧的重置操作,包括:In an implementation manner, the executing the reset operation on the side of the smart terminal includes:
根据所述重置响应消息中携带的所述ECG设备的地址信息,查找对应所述ECG设备的绑定信息,在查找到对应所述ECG设备的绑定信息时,将所述绑定信息删除,并清除所述智能终端与相应ECG设备间的绑定关系。Find the binding information corresponding to the ECG device according to the address information of the ECG device carried in the reset response message, and delete the binding information when the binding information corresponding to the ECG device is found , And clear the binding relationship between the smart terminal and the corresponding ECG device.
在一可实施方式中,所述方法还包括:In a possible implementation, the method further includes:
在向所述ECG设备发送重置请求消息后,启动定时器,若定时器超时仍未收到所述ECG设备返回的重置响应消息,则在确定所述重置请求消息的发送次数未达到预设次数时,向所述ECG设备重发所述重置请求消息;在确定所述重置请求消息的发送次数达到所述预设次数时,停止向所述ECG设备发送所述重置请求消息,并中止重置过程。After sending a reset request message to the ECG device, a timer is started. If the reset response message returned by the ECG device is not received after the timer expires, it is determined that the number of times the reset request message has been sent has not reached Retransmit the reset request message to the ECG device at a preset number of times; stop sending the reset request to the ECG device when it is determined that the number of times the reset request message has been sent reaches the preset number of times Message and abort the reset process.
第七方面,本发明提供一种重置装置,应用于心电图ECG设备,所述装置包括:In a seventh aspect, the present invention provides a reset device, which is applied to an ECG device, and the device includes:
第一发送单元,用于在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息;The first sending unit is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device;
第一接收单元,用于接收智能终端在收到ECG状态通知消息后发送的重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;The first receiving unit is configured to receive a reset request message sent by a smart terminal after receiving an ECG status notification message, where the reset request message at least includes identification information of the smart terminal;
第一处理单元,用于执行所述ECG设备侧的重置操作;The first processing unit is configured to perform a reset operation on the ECG device side;
第二发送单元,用于在所述重置操作完成后向所述智能终端返回重置响应消息。The second sending unit is configured to return a reset response message to the smart terminal after the reset operation is completed.
第八方面,本发明提供一种重置装置,应用于智能终端,所述装置包括:In an eighth aspect, the present invention provides a reset device, which is applied to a smart terminal, and the device includes:
第二接收单元,用于接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;The second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
第三发送单元,用于向所述ECG设备发送重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;The third sending unit is configured to send a reset request message to the ECG device, where the reset request message includes at least the identification information of the smart terminal;
第三接收单元,用于接收所述ECG设备返回的重置响应消息;The third receiving unit is configured to receive the reset response message returned by the ECG device;
第二处理单元,用于在所述重置响应消息表明所述ECG设备侧的重置成功时,执行所述智能终端侧的重置操作。The second processing unit is configured to perform a reset operation on the smart terminal side when the reset response message indicates that the reset on the ECG device side is successful.
第九方面,本发明提供一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行本发明所述的重置方法。In a ninth aspect, the present invention provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the reset method of the present invention.
第十方面,本发明提供一种电子设备,处理器;In a tenth aspect, the present invention provides an electronic device and a processor;
用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现本发明所述的重置方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the reset method of the present invention.
通过实施本发明的重置方法和装置、电子设备和计算机可读存储介质,解决了智能终端与ECG设备间如何进行重置交互的问题,且重置方案机制的设计简洁高效,不过多占用设备的处理器资源,有利于节省智能终端和ECG设备的处理器资源和能耗,实现效率较高的重置过程。By implementing the reset method and device, electronic equipment, and computer-readable storage medium of the present invention, the problem of how to perform reset interaction between the smart terminal and the ECG device is solved, and the design of the reset scheme mechanism is simple and efficient, but does not occupy too much equipment. The processor resources are conducive to saving the processor resources and energy consumption of smart terminals and ECG devices, and realizing a more efficient reset process.
第十一方面,本发明提供一种绑定方法,应用于心电图ECG设备,所述方法包括:In an eleventh aspect, the present invention provides a binding method applied to an ECG device, and the method includes:
在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal, the ECG status notification message includes status data of the ECG device, and the status data includes the address of the ECG device information;
接收所述智能终端在收到所述ECG状态通知消息后发送的绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;Receiving a binding request message sent by the smart terminal after receiving the ECG status notification message, where the binding request message includes at least the identification information and address information of the smart terminal;
向所述智能终端返回绑定响应消息,并在本地保存第一绑定信息,所述第一绑定信息中至少包括所述ECG设备与相应智能终端的标识信息之间的绑定关系;所述绑定响应消息中至少包括所述ECG设备的地址信息。Return a binding response message to the smart terminal, and store first binding information locally, where the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; The binding response message includes at least the address information of the ECG device.
在一可实施方式中,所述方法还包括:In a possible implementation, the method further includes:
在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,向所述智能终端发送ECG状态通知消息;所述第一触发指令用于指示开始绑定过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the binding process;
相应的,在所述ECG设备获得所述第一触发指令后,执行绑定过程中,若获得第二触发指令,则中止所述绑定过程;所述第二触发指令用于指示中止绑定过程。Correspondingly, after the ECG device obtains the first trigger instruction, during the binding process, if the second trigger instruction is obtained, the binding process is suspended; the second trigger instruction is used to instruct to terminate the binding process.
在一可实施方式中,所述ECG设备具有触发电极,所述方法还包括:In a possible implementation manner, the ECG device has a trigger electrode, and the method further includes:
当所述触发电极被触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被停止触发时,所述ECG设备获得所述第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
或者,当所述触发电极被第一次触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被第二次触发时,所述ECG设备获得所述第二触发指令。Alternatively, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
第十二方面,本发明提供一种绑定方法,应用于智能终端,所述方法包括:In a twelfth aspect, the present invention provides a binding method applied to a smart terminal, and the method includes:
接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;Receiving an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
向所述ECG设备发送绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;Sending a binding request message to the ECG device, where the binding request message includes at least the identification information and address information of the smart terminal;
接收所述ECG设备的绑定响应消息,在本地保存第二绑定信息,所述第二绑定信息中至少包括所述智能终端与所述ECG设备的地址信息之间的绑定关系;所述绑定响应消息中至少包括所述ECG设备的地址信息。Receiving the binding response message of the ECG device, and storing second binding information locally, where the second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; The binding response message includes at least the address information of the ECG device.
在一可实施方式中,在获得来自心电图ECG设备的ECG状态通知消息之前,所述方法还包括:In an implementation manner, before obtaining the ECG status notification message from the ECG device, the method further includes:
获得第三触发指令,所述第三触发指令用于指示开始绑定过程;Obtaining a third trigger instruction, where the third trigger instruction is used to instruct to start the binding process;
响应于所述第三触发指令,调用绑定界面,所述绑定界面用于实时更新绑定过程中的状态变化,包括在绑定完成后在所述绑定界面展示绑定成功的状态。In response to the third triggering instruction, the binding interface is invoked, and the binding interface is used to update the state changes in the binding process in real time, including displaying the binding successful state on the binding interface after the binding is completed.
在一可实施方式中,所述方法还包括:In a possible implementation, the method further includes:
在向所述ECG设备发送绑定请求消息后,启动定时器,若定时器超时仍未收到所述ECG设备返回的绑定响应消息,则在确定所述绑定请求消息的发送次数未超出预设次数时,向所述ECG设备重发所述绑定请求消息;在确定所述绑定请求消息的发送次数超出所述预设次数时,停止向所述ECG设备发送所述绑定请求消息,并中止与对应ECG设备的绑定过程。After sending a binding request message to the ECG device, a timer is started. If the timer expires and the binding response message returned by the ECG device is not received, it is determined that the number of times the binding request message has been sent has not exceeded Resend the binding request message to the ECG device at a preset number of times; stop sending the binding request to the ECG device when it is determined that the number of times the binding request message has been sent exceeds the preset number of times Message and abort the binding process with the corresponding ECG device.
第十三方面,本发明提供一种绑定装置,应用于心电图ECG设备,所述装置包括:In a thirteenth aspect, the present invention provides a binding device, which is applied to an ECG device, and the device includes:
第一发送单元,用于在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;The first sending unit is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status The data includes the address information of the ECG device;
第一接收单元,用于接收所述智能终端在收到所述ECG状态通知消息后发送的绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;The first receiving unit is configured to receive a binding request message sent by the smart terminal after receiving the ECG status notification message, where the binding request message includes at least the identification information and address information of the smart terminal;
第二发送单元,用于向所述智能终端返回绑定响应消息,所述绑定响应消息中至少包括所述ECG设备的地址信息;The second sending unit is configured to return a binding response message to the smart terminal, where the binding response message includes at least the address information of the ECG device;
第一处理单元,用于在本地保存第一绑定信息,所述第一绑定信息中至少包括所述ECG设备与相应智能终端的标识信息之间的绑定关系。The first processing unit is configured to store first binding information locally, where the first binding information at least includes the binding relationship between the ECG device and the identification information of the corresponding smart terminal.
第十四方面,本发明提供一种绑定装置,应用于智能终端,所述装置包括:In a fourteenth aspect, the present invention provides a binding device applied to a smart terminal, and the device includes:
第二接收单元,用于接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;The second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
第三发送单元,用于向所述ECG设备发送绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;The third sending unit is configured to send a binding request message to the ECG device, where the binding request message includes at least the identification information and address information of the smart terminal;
第三接收单元,用于接收所述ECG设备的绑定响应消息,所述绑定响应消息中至少包括所述ECG设备的地址信息;The third receiving unit is configured to receive a binding response message of the ECG device, where the binding response message at least includes address information of the ECG device;
第二处理单元,用于在本地保存第二绑定信息,所述第二绑定信息中至少包括所述智能终端与所述ECG设备的地址信息之间的绑定关系。The second processing unit is configured to locally store second binding information, where the second binding information at least includes a binding relationship between the address information of the smart terminal and the ECG device.
第十五方面,本发明提供一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行本发明所述的绑定方法。In a fifteenth aspect, the present invention provides a computer-readable storage medium storing a computer program, and the computer program is used to execute the binding method of the present invention.
第十六方面,本发明提供一种电子设备,处理器;In a sixteenth aspect, the present invention provides an electronic device, a processor;
用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现本发明所述的绑定方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the binding method of the present invention.
通过实施本发明的绑定方法和装置、电子设备和计算机可读存储介质,解决了智能终端与ECG设备间如何建立绑定的问题,为智能终端和ECG设备的功能开发提供了基础,且绑定方案机制的设计简洁高效,不过多占用设备的处理器资源,有利于节省智能终端和ECG设备的处理器资源和能耗,实现效率高、时间短的绑定建立过程。By implementing the binding method and device, electronic equipment, and computer-readable storage medium of the present invention, the problem of how to establish binding between the smart terminal and the ECG device is solved, which provides a basis for the functional development of the smart terminal and the ECG device, and the binding The design of the fixed scheme mechanism is simple and efficient, but does not occupy the processor resources of the device, which is conducive to saving the processor resources and energy consumption of smart terminals and ECG devices, and realizes the binding establishment process with high efficiency and short time.
第十七方面,本发明提供一种心电测量方法,应用于心电图ECG设备,所述方法包括:In a seventeenth aspect, the present invention provides an electrocardiogram measurement method, which is applied to an electrocardiogram ECG device, and the method includes:
在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status data includes at least the status data of the ECG device. Identification information;
接收所述智能终端在收到所述ECG状态通知消息后发送的测量请求消息,开始ECG测量,并向所述智能终端发送测量开始消息;Receiving a measurement request message sent by the smart terminal after receiving the ECG status notification message, starting ECG measurement, and sending a measurement start message to the smart terminal;
在ECG测量过程中,将测量数据报文实时发送给所述智能终端;In the ECG measurement process, sending measurement data messages to the smart terminal in real time;
在测量结束时,向所述智能终端发送测量结束消息。At the end of the measurement, a measurement end message is sent to the smart terminal.
在一可实施方式中,所述测量请求消息中包括所述智能终端的标识信息、和测量模式信息;其中,所述测量模式信息用于标识或描述测量的模式内容;In an implementation manner, the measurement request message includes identification information of the smart terminal and measurement mode information; wherein, the measurement mode information is used to identify or describe measurement mode content;
相应的,所述ECG测量包括:根据所述测量请求消息中携带的测量模式信息,执行对应的测量项目,并获得相应测量项目的测量数据报文。Correspondingly, the ECG measurement includes: executing a corresponding measurement item according to the measurement mode information carried in the measurement request message, and obtaining a measurement data message of the corresponding measurement item.
在一可实施方式中,所述测量数据报文中包括测量进程、及与所述测量进程对应的测量数据。In a possible implementation, the measurement data message includes a measurement process and measurement data corresponding to the measurement process.
在一可实施方式中,所述方法还包括:In a possible implementation, the method further includes:
在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,向所述智能终端发送ECG状态通知消息;所述第一触发指令用于指示开始测量过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains a first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start a measurement process;
相应的,在所述ECG设备执行测量过程中,若获得第二触发指令,则中止所述测量过程;所述第二触发指令用于指示中止测量过程。Correspondingly, during the measurement process performed by the ECG device, if a second trigger instruction is obtained, the measurement process is suspended; the second trigger instruction is used to instruct the suspension of the measurement process.
在一可实施方式中,所述ECG设备具有触发电极,所述方法还包括:In a possible implementation manner, the ECG device has a trigger electrode, and the method further includes:
当所述触发电极被触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被停止触发时,所述ECG设备获得所述第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
或者,当所述触发电极被第一次触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被第二次触发时,所述ECG设备获得所述第二触发指令。Alternatively, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
第十八方面,本发明提供一种心电测量方法,应用于智能终端,所述方法包括:In an eighteenth aspect, the present invention provides an electrocardiogram measurement method, which is applied to a smart terminal, and the method includes:
接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所 述状态数据中至少包括ECG设备的标识信息;Receiving an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
向所述ECG设备发送测量请求消息;Sending a measurement request message to the ECG device;
接收所述ECG设备发送的测量开始消息及测量数据报文,并通过交互界面展示相应测量数据;Receiving a measurement start message and a measurement data message sent by the ECG device, and displaying the corresponding measurement data through an interactive interface;
在收到所述智能终端的测量结束消息时,根据获得的所述测量数据生成测量结果,并通过所述交互界面展示所述测量结果。When receiving the measurement end message of the smart terminal, a measurement result is generated according to the obtained measurement data, and the measurement result is displayed through the interactive interface.
在一可实施方式中,所述方法还包括:In a possible implementation, the method further includes:
在向所述ECG设备发送测量请求消息后,启动定时器,若定时器超时仍未收到所述ECG设备返回的测量开始消息,则在确定所述测量请求消息的发送次数未达到预设次数时,向所述ECG设备重发所述测量请求消息;在确定所述测量请求消息的发送次数达到所述预设次数时,停止向所述ECG设备发送所述测量请求消息,并中止测量过程。After sending a measurement request message to the ECG device, a timer is started. If the measurement start message returned by the ECG device is not received after the timer expires, it is determined that the number of times the measurement request message has been sent has not reached the preset number of times. When the measurement request message is retransmitted to the ECG device; when it is determined that the number of times the measurement request message has been sent reaches the preset number of times, stop sending the measurement request message to the ECG device, and stop the measurement process .
第十九方面,本发明提供一种绑定装置,应用于心电图ECG设备,所述装置包括:In a nineteenth aspect, the present invention provides a binding device, which is applied to an ECG device, and the device includes:
第一发送单元,在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;The first sending unit, after the ECG device establishes a communication connection with the smart terminal, sends an ECG status notification message to the smart terminal, where the ECG status notification message includes status data of the ECG device, and the status data includes At least include the identification information of the ECG device;
第一接收单元,用于接收所述智能终端在收到所述ECG状态通知消息后发送的测量请求消息,The first receiving unit is configured to receive a measurement request message sent by the smart terminal after receiving the ECG status notification message,
第一处理单元,用于在获得所述测量请求消息后开始ECG测量;The first processing unit is configured to start ECG measurement after obtaining the measurement request message;
第二发送单元,用于向所述智能终端发送测量开始消息,在ECG测量过程中,将测量数据报文实时发送给所述智能终端;The second sending unit is configured to send a measurement start message to the smart terminal, and send a measurement data message to the smart terminal in real time during the ECG measurement process;
第三发送单元,用于在测量结束时,向所述智能终端发送测量结束消息。The third sending unit is configured to send a measurement end message to the smart terminal when the measurement ends.
第二十方面,本发明提供一种心电测量装置,应用于智能终端,所述装置包括:In a twentieth aspect, the present invention provides an electrocardiogram measuring device, which is applied to a smart terminal, and the device includes:
第二接收单元,用于接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;The second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
第四发送单元,用于向所述ECG设备发送测量请求消息;A fourth sending unit, configured to send a measurement request message to the ECG device;
第三接收单元,用于接收所述ECG设备发送的测量开始消息及测量数据报文;The third receiving unit is configured to receive a measurement start message and a measurement data message sent by the ECG device;
第二处理单元,用于通过交互界面展示相应测量数据;The second processing unit is used to display corresponding measurement data through an interactive interface;
第四接收单元,用于接收所述智能终端的测量结束消息;The fourth receiving unit is configured to receive the measurement end message of the smart terminal;
所述第二处理单元还用于,在获得所述测量结束消息时,根据获得的所述测量数据生成测量结果,并通过所述交互界面展示所述测量结果。The second processing unit is further configured to, when obtaining the measurement end message, generate a measurement result according to the obtained measurement data, and display the measurement result through the interactive interface.
第二十一方面,本发明提供一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行本发明所述的心电测量方法。In a twenty-first aspect, the present invention provides a computer-readable storage medium, the storage medium stores a computer program, and the computer program is used to execute the electrocardiogram measurement method of the present invention.
第二十二方面,本发明提供一种电子设备,处理器;In the twenty-second aspect, the present invention provides an electronic device and a processor;
用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现本发明所述的心电测量方法。The processor is configured to read the executable instruction from the memory and execute the instruction to implement the electrocardiogram measurement method of the present invention.
通过实施本发明的心电测量方法和装置、电子设备和计算机可读存储介质,解决了智能终端与ECG设备间如何进行心电测量交互的问题,且心电测量方案机制的设计简洁高效,不过多占用设备的处理器资源,有利于节省智能终端和ECG设备的处理器资源和能耗,实现效率高的心电测量过程。By implementing the ECG measurement method and device, electronic equipment, and computer-readable storage medium of the present invention, the problem of how to perform ECG measurement interaction between the smart terminal and the ECG device is solved, and the design of the ECG measurement scheme mechanism is simple and efficient, but Occupying more processor resources of the device is conducive to saving processor resources and energy consumption of smart terminals and ECG devices, and realizing an efficient ECG measurement process.
附图说明Description of the drawings
图1示出了本发明实施例的一种信息处理方法的流程示意图;FIG. 1 shows a schematic flowchart of an information processing method according to an embodiment of the present invention;
图2示出了本发明实施例的一种信息处理装置的组成结构示意图;FIG. 2 shows a schematic diagram of the composition structure of an information processing device according to an embodiment of the present invention;
图3示出了本发明实施例的一种电子设备示意图;FIG. 3 shows a schematic diagram of an electronic device according to an embodiment of the present invention;
图4示出了本发明实施例在ECG设备侧实施的一种重置方法的流程示意图;FIG. 4 shows a schematic flowchart of a reset method implemented on the ECG device side according to an embodiment of the present invention;
图5示出了本发明实施例在智能终端侧实施的一种重置方法的流程示意图;FIG. 5 shows a schematic flowchart of a reset method implemented on the side of the smart terminal according to an embodiment of the present invention;
图6示出了本发明实施例的一种在ECG设备侧实施的绑定方法的流程示意图;FIG. 6 shows a schematic flowchart of a binding method implemented on the ECG device side according to an embodiment of the present invention;
图7示出了本发明实施例的一种在智能终端侧实施的绑定方法的流程示意图;FIG. 7 shows a schematic flowchart of a binding method implemented on the side of a smart terminal according to an embodiment of the present invention;
图8示出了本发明实施例的一种连接建立方法的流程示意图;FIG. 8 shows a schematic flowchart of a connection establishment method according to an embodiment of the present invention;
图9示出了本发明实施例的一种重置装置的组成结构示意图;FIG. 9 shows a schematic diagram of the composition structure of a reset device according to an embodiment of the present invention;
图10示出了本发明实施例的另一种重置装置的组成结构示意图;FIG. 10 shows a schematic diagram of the composition structure of another reset device according to an embodiment of the present invention;
图11示出了本发明实施例的一种电子设备示意图;FIG. 11 shows a schematic diagram of an electronic device according to an embodiment of the present invention;
图12示出了本发明实施例的一种在ECG设备侧实施的绑定方法的流程示意图;FIG. 12 shows a schematic flowchart of a binding method implemented on the ECG device side according to an embodiment of the present invention;
图13示出了本发明实施例的一种在智能终端侧实施的绑定方法的流程示意图;FIG. 13 shows a schematic flowchart of a binding method implemented on the side of a smart terminal according to an embodiment of the present invention;
图14示出了本发明实施例的一种连接建立方法的流程示意图;FIG. 14 shows a schematic flowchart of a connection establishment method according to an embodiment of the present invention;
图15示出了本发明实施例的一种绑定装置的组成结构示意图;FIG. 15 shows a schematic diagram of the composition structure of a binding device according to an embodiment of the present invention;
图16示出了本发明实施例的另一种绑定装置的组成结构示意图;FIG. 16 shows a schematic diagram of the composition structure of another binding apparatus according to an embodiment of the present invention;
图17示出了本发明实施例的一种电子设备示意图;FIG. 17 shows a schematic diagram of an electronic device according to an embodiment of the present invention;
图18示出了本发明实施例在ECG设备侧实施的一种心电测量方法的流程示意图;FIG. 18 shows a schematic flowchart of an electrocardiogram measurement method implemented on the ECG device side according to an embodiment of the present invention;
图19示出了本发明实施例在智能终端侧实施的一种心电测量方法的流程示意图;FIG. 19 shows a schematic flowchart of an electrocardiogram measurement method implemented on the side of a smart terminal in an embodiment of the present invention;
图20示出了本发明实施例的一种在ECG设备侧实施的绑定方法的流程示意图;FIG. 20 shows a schematic flowchart of a binding method implemented on the ECG device side according to an embodiment of the present invention;
图21示出了本发明实施例的一种在智能终端侧实施的绑定方法的流程示意图;FIG. 21 shows a schematic flowchart of a binding method implemented on the side of a smart terminal according to an embodiment of the present invention;
图22示出了本发明实施例的一种连接建立方法的流程示意图;FIG. 22 shows a schematic flowchart of a method for establishing a connection according to an embodiment of the present invention;
图23示出了本发明实施例的一种心电测量装置的组成结构示意图;FIG. 23 shows a schematic diagram of the composition structure of an electrocardiogram measurement device according to an embodiment of the present invention;
图24示出了本发明实施例的另一种心电测量装置的组成结构示意图;FIG. 24 shows a schematic diagram of the composition structure of another electrocardiogram measurement device according to an embodiment of the present invention; FIG.
图25示出了本发明实施例的一种电子设备示意图。FIG. 25 shows a schematic diagram of an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only a part of the embodiments of the present invention, but not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the protection scope of the present invention.
实施例一Example one
参见图1所示,本发明实施例提供一种信息处理方法,应用于ECG设备,方法主要包括:As shown in FIG. 1, an embodiment of the present invention provides an information processing method, which is applied to an ECG device, and the method mainly includes:
步骤1101,获得控制指令,控制指令用于指示开始创建与智能终端的通信连接。Step 1101: Obtain a control instruction, where the control instruction is used to instruct to start establishing a communication connection with the smart terminal.
本发明实施例的ECG设备是指用于测量用户ECG数据的设备,需要说明的是,本发明实施例并不限制ECG设备的类型和种类,可以是医院使用的ECG设备,也可以是家用ECG设备,当然也可以是具有一定创新性设计的可穿戴式ECG设备,如腕带式ECG设备或其他佩戴式ECG设备等等。ECG设备还可以应用在智能设备中,如智能手机、智能平板等等。本发明实施例的信息处理方法用于提供智能终端与ECG设备之间的连接建立方案,而不用于限制智能终端和ECG设备的类型和种类。The ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on. The information processing method of the embodiment of the present invention is used to provide a connection establishment solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
本实施例的方法应用于ECG设备,ECG设备获得控制指令的方式可以有多种,如用户通过物理按键或电极触发操作的方式触发ECG设备获得控制指令,或者,用户通过虚拟按键操作的方式触发ECG设备获得控制指令,甚至可以是通过语音手势等操作的方式触发ECG设备获得控制指令,对于控制指令的触发方式本发明实施例不做限制。ECG设备在获得控制指令后,开始执行与智能终端建立通信连接的过程,这种连接优选为无线连接方式,当然,若有线连接方式也适用于本发明实施例的情况下,本发明实施例的保护范围也覆盖有线连接方式的情形。The method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways. For example, the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation. The ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures. The method of triggering the control instruction is not limited in the embodiment of the present invention. After the ECG device obtains the control instruction, it starts to execute the process of establishing a communication connection with the smart terminal. This connection is preferably a wireless connection. Of course, if the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
步骤1102,响应于控制指令,确定当前所示满足的预设条件。其中,预设条件至少包括:1102a所示的第一预设条件、1102b所示的第二预设条件、1102c所示的第三预设条件。Step 1102: In response to the control instruction, determine the preset condition that is currently shown to be satisfied. The preset conditions include at least: the first preset condition shown in 1102a, the second preset condition shown in 1102b, and the third preset condition shown in 1102c.
步骤1103,执行与所满足的预设条件相对应的连接策略,从而建立与智能终端间的通信连接。其中,连接策略至少包括:1103a与第一预设条件对应的第一连接策略、1103b与第二预设条件对应的第二连接策略、1103c与第三预设条件对应的第三连接策略。Step 1103: Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal. The connection strategy includes at least: 1103a a first connection strategy corresponding to the first preset condition, 1103b a second connection strategy corresponding to the second preset condition, and 1103c a third connection strategy corresponding to the third preset condition.
本发明实施例中,ECG设备与智能终端间的通信连接可以采用蓝牙低能耗(BLE,Bluetooth Low  Energy)连接方式,当然,本发明实施例并不仅限于BLE的连接方式,实际应用中其他可使用本发明实施例的连接建立机制的任意连接方式,应当也都属于本发明实施例的保护范围。In the embodiment of the present invention, the communication connection between the ECG device and the smart terminal can adopt the Bluetooth Low Energy (BLE, Bluetooth Low Energy) connection mode. Of course, the embodiment of the present invention is not limited to the BLE connection mode. Others can be used in practical applications. Any connection mode of the connection establishment mechanism in the embodiment of the present invention should also fall within the protection scope of the embodiment of the present invention.
在一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为智能终端的公共地址(public address);In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路。在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;如果连接建立失败,则中止上述通信连接过程。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly. After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,且绑定的智能终端地址为public address,则直接尝试向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal. The terminal initiates a connection request.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是智能终端的公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若未扫描到已绑定的智能终端,则中止通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,但绑定的智能终端地址不是public address,则先发起对绑定智能终端的扫描,如能扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其没有绑定的智能终端,则需要发起对智能终端的扫描过程,向扫描到的智能终端发起连接请求。That is, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身具备或可实现强制重置的功能,或者ECG设备的扫描和连接用时较长,则可优选此实施方式的方案。因为,以上实施方式的方案机制设计简洁,不占用过多处理器资源,效率高、时间短,在ECG设备自身的扫描和连接用时较长情况下,能保证整个连接建立过程的时效性,提升用户体验。再有,在ECG设备自身可实现强制重置功能的情况下,连接过程的设计无需过多操作流程,一些异常情况可以通过ECG设备强制重置的方式来解决。In addition, if the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time, the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
在另一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为公共地址;In another implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑 定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
若与已绑定的智能终端件的连接建立失败,则发起对已绑定智能终端的扫描;If the connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身不具备或无法实现强制重置的功能,且ECG设备的扫描和连接用时较短,则可优选此实施方式的方案。因为,上述实施方式虽然相比前一实施方式的操作流程复杂一些,但在不具备强制重置的ECG设备上实施本方案,能够覆盖多种异常情形的解决方案,并且能够保证整个连接建立过程的高效性和用时短。In addition, if the ECG device itself does not have or cannot realize the function of forced reset, and the scanning and connection time of the ECG device is relatively short, the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
实施例二Example two
参见图2所示,本发明实施例还提供了一种信息处理装置,包括:Referring to FIG. 2, an embodiment of the present invention also provides an information processing device, including:
获得单元110,用于获得控制指令,控制指令用于指示开始创建与智能终端的通信连接;The obtaining unit 110 is configured to obtain a control instruction, and the control instruction is used to instruct to start establishing a communication connection with the smart terminal;
执行单元120,响应于控制指令,在确定当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程;在确定当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程;在确定当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程。The execution unit 120, in response to the control instruction, when determining that the first preset condition is currently met, executes the communication connection process with the smart terminal according to the first connection strategy; when it is determined that the second preset condition is currently met, press the second connection The strategy executes the communication connection process with the smart terminal; when it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy.
在一可实施方式中,第一预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址为公共地址;In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
执行单元120进一步用于,按以下第一连接策略执行与智能终端间的通信连接过程:The execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
向已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
在一可实施方式中,第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是公共地址;In an implementation manner, the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not a public address;
执行单元120进一步用于,按以下第二连接策略执行与智能终端间的通信连接过程:The execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ;
若未扫描到已绑定的智能终端,则中止通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
在另一可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为公共地址;In another implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
执行单元120进一步用于,按以下第一连接策略执行与智能终端间的通信连接过程:The execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following first connection strategy:
向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly;
若与已绑定的智能终端件的连接建立失败,则发起对已绑定智能终端的扫描;If the connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
在另一可实施方式中,第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是公共地址;In another implementable manner, the second preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not a public address;
执行单元120进一步用于,按以下第二连接策略执行与智能终端间的通信连接过程:The execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following second connection strategy:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
在又一可实施方式中,第三预设条件为:ECG设备没有绑定的智能终端;In another possible implementation manner, the third preset condition is: there is no smart terminal bound to the ECG device;
执行单元120进一步用于,按以下第三连接策略执行与智能终端间的通信连接过程:The execution unit 120 is further configured to execute the communication connection process with the smart terminal according to the following third connection strategy:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
下面,参考图3来描述根据本申请实施例的电子设备111。Hereinafter, an electronic device 111 according to an embodiment of the present application will be described with reference to FIG. 3.
如图3所示,电子设备111包括一个或多个处理器1111和存储器1112。As shown in FIG. 3, the electronic device 111 includes one or more processors 1111 and a memory 1112.
处理器1111可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备111中的其他组件以执行期望的功能。The processor 1111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 111 to perform desired functions.
存储器1112可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取 存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器1111可以运行所述程序指令,以实现上文所述的本申请的各个实施例的方法以及/或者其他期望的功能。在所述计算机可读存储介质中还可以存储诸如输入信号、信号分量、噪声分量等各种内容。The memory 1112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include random access memory (RAM) and/or cache memory (cache), for example. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function. Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
在一个示例中,电子设备111还可以包括:输入装置1113和输出装置1114,这些组件通过总线系统和/或其他形式的连接机构(未示出)互连。In an example, the electronic device 111 may further include: an input device 1113 and an output device 1114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
该输入设备1113可以包括例如键盘、鼠标等等。The input device 1113 may include, for example, a keyboard, a mouse, and so on.
该输出装置1114可以向外部输出各种信息,包括确定出的距离信息、方向信息等。该输出设备1114可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出设备等等。The output device 1114 can output various information to the outside, including determined distance information, direction information, and so on. The output device 1114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
当然,为了简化,图3中仅示出了该电子设备111中与本申请有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备111还可以包括任何其他适当的组件。Of course, for simplicity, only some of the components related to the present application in the electronic device 111 are shown in FIG. 3, and components such as buses, input/output interfaces, etc. are omitted. In addition, according to specific application conditions, the electronic device 111 may also include any other appropriate components.
本发明实施例中一种ECG设备的形式,可以是设置在智能手表的腕带上,ECG设备具有至少两个电极,第一电极设置在腕带的第一表面上,第一表面为腕带佩戴时用于与用户皮肤接触的那一面;第二电极设置在腕带的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手表时,腕带上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的信息处理方式则用于提供智能手表与腕带上ECG设备之间建立通信连接的实现方案。触发ECG设备获得控制指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch. The ECG device has at least two electrodes. The first electrode is set on the first surface of the wristband, and the first surface is the wristband. The side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface. When the user wears the smart watch, the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer. Then, the information processing method in the embodiment of the present invention is used to provide an implementation solution for establishing a communication connection between the smart watch and the ECG device on the wristband. The way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. Electrodes, etc., are not limited in the embodiment of the present invention.
本发明实施例中一种ECG设备的另一形式,可以是设置成智能手环,ECG设备具有至少两个电极,第一电极设置在智能手环的第一表面上,第一表面为智能手环佩戴时用于与用户皮肤接触的那一面;第二电极设置在智能手环的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手环时,智能手环上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的信息处理方式则可用于提供智能手机、智能平板等智能终端与智能手环上ECG设备之间建立通信连接的实现方案。同样的,触发ECG设备获得控制指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。Another form of an ECG device in the embodiment of the present invention can be configured as a smart bracelet. The ECG device has at least two electrodes. The first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand. The side of the ring used for contact with the user's skin when worn; the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface. When the user wears the smart bracelet, the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate. Then, the information processing method of the embodiment of the present invention can be used to provide an implementation solution for establishing a communication connection between a smart terminal such as a smart phone or a smart tablet and an ECG device on a smart bracelet. Similarly, the way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as ECG devices. The third electrode, etc., are not limited in the embodiment of the present invention.
除了上述方法和设备以外,本申请的实施例还可以是计算机程序产品,其包括计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述“示例性方法”部分中描述的根据本申请各种实施例的方法中的步骤。In addition to the above-mentioned methods and devices, the embodiments of the present application may also be computer program products, which include computer program instructions that, when run by a processor, cause the processor to execute the “exemplary method” described above in this specification. The steps in the method according to various embodiments of the present application are described in the section.
所述计算机程序产品可以以一种或多种程序设计语言的任意组合来编写用于执行本申请实施例操作的程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、C++等,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。The computer program product may use any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application. The programming languages include object-oriented programming languages, such as Java, C++, etc. , Also includes conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
此外,本申请的实施例还可以是计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述“示例性方法”部分中描述的根据本申请各种实施例的方法中的步骤。In addition, the embodiment of the present application may also be a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the "exemplary method" part of this specification. The steps in the method according to various embodiments of the application are described in.
所述计算机可读存储介质可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式 可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The computer-readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
实施例三Example three
参见图4所示,本发明实施例提供一种在ECG设备端实施的重置方法,包括:Referring to FIG. 4, an embodiment of the present invention provides a reset method implemented on the ECG device side, including:
步骤2101,在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息。Step 2101: After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal. The ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
本发明实施例的ECG设备是指用于测量用户ECG数据的设备,需要说明的是,本发明实施例并不限制ECG设备的类型和种类,可以是医院使用的ECG设备,也可以是家用ECG设备,当然也可以是具有一定创新性设计的可穿戴式ECG设备,如腕带式ECG设备或其他佩戴式ECG设备等等。ECG设备还可以应用在智能设备中,如智能手机、智能平板等等。本发明实施例的方法用于提供智能终端与ECG设备之间的重置方案,而不用于限制智能终端和ECG设备的类型和种类。The ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on. The method of the embodiment of the present invention is used to provide a reset solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
本发明实施例的重置方法是建立在ECG设备已绑定智能终端的基础上完成,本发明实施例后续将对ECG设备与智能终端之间建立绑定的过程进行详细阐述。The reset method in the embodiment of the present invention is completed on the basis that the ECG device has been bound to the smart terminal, and the process of establishing the binding between the ECG device and the smart terminal will be described in detail later in the embodiment of the present invention.
为描述方便,后续将ECG状态通知消息简称为EcgStatus消息,EcgStatus消息格式可以包括以下字段:EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的设备标识。For the convenience of description, the ECG status notification message will be referred to as the EcgStatus message in the following. The EcgStatus message format may include the following fields: EcgDataContract.TYPE_DEVICE_ID, which represents the device identification of the ECG device.
EcgStatus消息还可包括以下字段中的一种或多种:The EcgStatus message may also include one or more of the following fields:
EcgDataContract.TYPE_ECG_VENDOR,表示ECG设备的供应商信息;EcgDataContract.TYPE_ECG_VENDOR, which represents the supplier information of ECG equipment;
EcgDataContract.TYPE_ECG_MODEL,表示ECG设备的型号;EcgDataContract.TYPE_ECG_MODEL, which represents the model of the ECG device;
EcgDataContract.TYPE_COLOR,表示ECG设备的颜色;EcgDataContract.TYPE_COLOR, which represents the color of the ECG device;
EcgDataContract.TYPE_BATTERY,表示ECG设备的电池信息;EcgDataContract.TYPE_BATTERY, which represents the battery information of the ECG device;
EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息,这里ECG设备与智能终端之间可以采用蓝牙低能耗(BLE,Bluetooth Low Energy)的连接方式,因此,本发明实施例可以将ECG设备的蓝牙地址(BT_ADDRESS)作为ECG设备的地址信息使用。当然,本发明实施例不仅限于将BT_ADDRESS作为ECG设备的地址信息,也可以为其他适用的地址信息。EcgDataContract.TYPE_BT_ADDRESS indicates the address information of the ECG device. Here, the Bluetooth Low Energy (BLE, Bluetooth Low Energy) connection method can be used between the ECG device and the smart terminal. Therefore, the embodiment of the present invention can set the Bluetooth address (BT_ADDRESS) of the ECG device ) Is used as the address information of the ECG device. Of course, the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
ECG设备告知以上信息给智能终端,便于智能终端根据不同的ECG设备信息状态,调取相适应的通信、交互、显示、维护等等策略方案。其中,EcgDataContract.TYPE_DEVICE_ID可以在完成ECG设备与智能终端的绑定操作后,在ECG设备发送给智能终端的消息中携带,在完成绑定操作之前,ECG设备可以不在发送给智能终端的消息中携带EcgDataContract.TYPE_DEVICE_ID。The ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states. Among them, EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation of the ECG device and the smart terminal is completed. Before the binding operation is completed, the ECG device may not be carried in the message sent to the smart terminal EcgDataContract.TYPE_DEVICE_ID.
步骤2102,接收智能终端在收到ECG状态通知消息后发送的重置请求消息,重置请求消息中至少包括智能终端的标识信息。Step 2102: Receive a reset request message sent by the smart terminal after receiving the ECG status notification message, where the reset request message includes at least the identification information of the smart terminal.
智能终端在收到ECG设备发送的EcgStatus消息后,基于EcgStatus消息中携带的ECG设备的标识信息,向对应的ECG设备发送重置请求消息,重置请求消息中携带智能终端的标识信息。为描述方便,后续将重置请求消息简称为ResetRequest消息。ResetRequest消息格式可以包括以下字段:After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a reset request message to the corresponding ECG device based on the identification information of the ECG device carried in the EcgStatus message, and the reset request message carries the identification information of the smart terminal. For the convenience of description, the reset request message will be referred to as ResetRequest message for short in the following. The ResetRequest message format can include the following fields:
EcgDataContract.TYPE_DEVICE_ID,表示智能终端的标识信息。EcgDataContract.TYPE_DEVICE_ID indicates the identification information of the smart terminal.
步骤2103,执行ECG设备侧的重置操作,并在所述重置操作完成后向所述智能终端返回重置响应消息。Step 2103: Perform a reset operation on the ECG device side, and return a reset response message to the smart terminal after the reset operation is completed.
ECG设备在收到智能终端发送的ResetRequest消息后,确认是绑定的智能终端发来的ResetRequest消息,则开始重置操作;若确认不是绑定的智能终端发来的ResetRequest消息,则向对应智能终端返回重置响应消息,消息中用携带的错误码来标识设备未绑定,不能重置。After receiving the ResetRequest message sent by the smart terminal, the ECG device confirms that it is the ResetRequest message sent by the bound smart terminal, and then starts the reset operation; The terminal returns a reset response message, and the error code carried in the message is used to identify that the device is not bound and cannot be reset.
具体的,ECG设备根据重置请求消息中携带的智能终端的标识信息,查找对应智能终端的绑定信息,在查找到对应智能终端的绑定信息时,确认是绑定的智能终端发来的ResetRequest消息,从而开始执行重置操作,将ECG设备与对应智能终端的绑定信息删除,并清除ECG设备与相应智能终端间的绑定关系。若查找不到对应智能终端的绑定信息,则确认不是绑定的智能终端发来的ResetRequest消息, 从而返回错误的重置响应消息。为描述方便,后续将重置响应消息简称为ResetResponse消息。ResetResponse消息格式可以包括以下字段:Specifically, the ECG device searches for the binding information of the corresponding smart terminal according to the identification information of the smart terminal carried in the reset request message, and when it finds the binding information of the corresponding smart terminal, confirms that it is sent by the bound smart terminal The ResetRequest message starts the reset operation, deletes the binding information of the ECG device and the corresponding smart terminal, and clears the binding relationship between the ECG device and the corresponding smart terminal. If the binding information of the corresponding smart terminal cannot be found, it is confirmed that it is not the ResetRequest message sent by the bound smart terminal, and an incorrect reset response message is returned. For the convenience of description, the reset response message will be referred to as ResetResponse message in the following. The ResetResponse message format can include the following fields:
EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息;EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device;
EcgDataContract.TYPE_ERROR_CODE,表示错误码,用于在重置过程中出错时标识与出错原因相对应的错误码,当然,在重置过程正常时,EcgDataContract.TYPE_ERROR_CODE字段的取值可以为缺省值。例如:在ECG设备侧执行绑定过程中,若出现设备未绑定,不能重置的情形,则ResetResponse消息中用于携带以下字段来表征这种情况EcgDataContract.ERROR_CODE_NOT_BOND,用以通知智能终端侧。EcgDataContract.TYPE_ERROR_CODE represents the error code, used to identify the error code corresponding to the cause of the error when an error occurs during the reset process. Of course, when the reset process is normal, the value of the EcgDataContract.TYPE_ERROR_CODE field can be the default value. For example: during the binding process on the ECG device side, if the device is not bound and cannot be reset, the ResetResponse message is used to carry the following fields to characterize this situation EcgDataContract.ERROR_CODE_NOT_BOND to notify the smart terminal side.
在一可实施方式中,方法还包括:In a possible implementation, the method further includes:
在ECG设备与智能终端建立通信连接后,ECG设备获得第一触发指令时,向智能终端发送ECG状态通知消息;第一触发指令用于指示开始重置过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the reset process;
相应的,在ECG设备执行重置过程中,若获得第二触发指令,则中止重置过程;第二触发指令用于指示中止重置过程。Correspondingly, during the reset process of the ECG device, if the second trigger instruction is obtained, the reset process is aborted; the second trigger instruction is used to instruct to abort the reset process.
也就是说,ECG设备需要获得触发指令,来触发开始重置过程的相关操作;另外,在执行重置的过程中,若获得中止重置的触发指令,则可立即中止重置过程。触发的方式可以有多种,如:通过物理按键的触发、虚拟按键的触发、声控、触摸、手势的触发等等,本发明实施例不对触发方式进行限制。In other words, the ECG device needs to obtain a trigger instruction to trigger related operations to start the reset process; in addition, if a trigger instruction to abort the reset is obtained during the reset process, the reset process can be immediately aborted. There may be many triggering modes, such as: triggering by physical keys, triggering by virtual keys, voice control, touch, and gesture triggering, etc. The embodiment of the present invention does not limit the triggering modes.
在一可实施方式中,ECG设备具有触发电极,方法还包括:In a possible embodiment, the ECG device has a trigger electrode, and the method further includes:
当触发电极被触发时,ECG设备获得第一触发指令,当触发电极被停止触发时,ECG设备获得第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
或者,当触发电极被第一次触发时,ECG设备获得第一触发指令,当触发电极被第二次触发时,ECG设备获得第二触发指令。Or, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
也就是说,通过触发电极完成的指令触发过程可以有多种控制逻辑,可以是用户持续长按触发电极,直到重置过程结束,若在结束之前用户松开触发电极,则重置过程立即中止;也可以是用户触按一下触发电极,开始重置过程,当用户再触按一下触发电极时,中止重置过程。That is to say, the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the reset process ends. If the user releases the trigger electrode before the end, the reset process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the reset process, and when the user touches the trigger electrode again, the reset process is aborted.
实施例四Example four
参见图5所示,本发明实施例提供一种在智能终端侧实施的重置方法,该方法包括:Referring to FIG. 5, an embodiment of the present invention provides a reset method implemented on the side of a smart terminal, and the method includes:
步骤2201,接收来自ECG设备的ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息。Step 2201: Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
步骤2202,向ECG设备发送重置请求消息,重置请求消息中至少包括智能终端的标识信息。Step 2202: Send a reset request message to the ECG device, where the reset request message includes at least the identification information of the smart terminal.
智能终端在收到来自ECG设备的EcgStatus消息后,可以调用重置界面,用于显示重置过程,并向ECG设备发送重置请求消息,用于请求ECG设备开始执行重置操作。当然,重置界面的调用也可以通过用户操作的方式来触发。After receiving the EcgStatus message from the ECG device, the smart terminal can call the reset interface to display the reset process and send a reset request message to the ECG device to request the ECG device to start the reset operation. Of course, the invocation of the reset interface can also be triggered by user operations.
步骤2203,接收ECG设备返回的重置响应消息,在重置响应消息表明ECG设备侧的重置成功时,执行智能终端侧的重置操作。Step 2203: Receive a reset response message returned by the ECG device, and perform a reset operation on the smart terminal side when the reset response message indicates that the reset on the ECG device side is successful.
当重置响应消息表明ECG设备侧的重置成功时,智能终端侧也执行相应的重置操作,包括:根据重置响应消息中携带的ECG设备的地址信息,查找对应ECG设备的绑定信息,在查找到对应ECG设备的绑定信息时,将绑定信息删除,并清除智能终端与相应ECG设备间的绑定关系。同时,通过智能终端的重置界面展示重置成功的状态或提示信息。When the reset response message indicates that the reset on the ECG device side is successful, the smart terminal side also performs the corresponding reset operation, including: searching for the binding information of the corresponding ECG device according to the address information of the ECG device carried in the reset response message , When the binding information of the corresponding ECG device is found, the binding information is deleted, and the binding relationship between the smart terminal and the corresponding ECG device is cleared. At the same time, the status of successful reset or prompt information is displayed through the reset interface of the smart terminal.
在一可实施方式中,方法还包括:在向ECG设备发送重置请求消息后,启动定时器,若定时器超时仍未收到ECG设备返回的重置响应消息,则在确定重置请求消息的发送次数未达到预设次数时,向ECG设备重发重置请求消息;在确定重置请求消息的发送次数达到预设次数时,停止向ECG设备发送重置请求消息,并中止重置过程。预设次数可以设定为两次、三次等等,不做限制,根据实际需要进行设定。In an implementation manner, the method further includes: after sending a reset request message to the ECG device, starting a timer, and if the reset response message returned by the ECG device is not received after the timer expires, determining the reset request message When the number of sending of the reset request message has not reached the preset number of times, the reset request message is re-sent to the ECG device; when it is determined that the sending number of the reset request message reaches the preset number of times, stop sending the reset request message to the ECG device and abort the reset process . The preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
前面实施例中提到,重置方法是建立在ECG设备已绑定智能终端的基础上完成,下面对智能终端 与ECG设备间建立绑定的具体过程进行阐述。参见图6所示,本发明实施例提供的一种在ECG设备侧实施的绑定方法,方法主要包括:As mentioned in the previous embodiment, the reset method is completed on the basis that the ECG device has been bound to the smart terminal. The specific process of establishing the binding between the smart terminal and the ECG device is described below. Referring to FIG. 6, an embodiment of the present invention provides a binding method implemented on the ECG device side. The method mainly includes:
步骤2301,在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中包括ECG设备的地址信息。Step 2301: After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal. The ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
本发明实施例的绑定方法是建立在ECG设备与智能终端建立通信连接的基础上完成,本发明实施例后续将对ECG设备与智能终端之间建立通信连接的过程进行详细阐述。The binding method in the embodiment of the present invention is completed on the basis of establishing a communication connection between the ECG device and the smart terminal. The embodiment of the present invention will subsequently elaborate on the process of establishing a communication connection between the ECG device and the smart terminal.
为描述方便,后续将ECG状态通知消息简称为EcgStatus消息,EcgStatus消息格式可以包括以下字段:EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息,这里ECG设备与智能终端之间可以采用BLE的连接方式,因此,本发明实施例可以将ECG设备的蓝牙地址(BT_ADDRESS)作为ECG设备的地址信息使用。当然,本发明实施例不仅限于将BT_ADDRESS作为ECG设备的地址信息,也可以为其他适用的地址信息。For the convenience of description, the ECG status notification message will be referred to as the EcgStatus message. The EcgStatus message format can include the following fields: EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device. Here, the BLE connection mode can be used between the ECG device and the smart terminal, so In the embodiment of the present invention, the Bluetooth address (BT_ADDRESS) of the ECG device can be used as the address information of the ECG device. Of course, the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
EcgStatus消息还可包括以下字段中的一种或多种:The EcgStatus message may also include one or more of the following fields:
EcgDataContract.TYPE_ECG_VENDOR,表示ECG设备的供应商信息;EcgDataContract.TYPE_ECG_VENDOR, which represents the supplier information of ECG equipment;
EcgDataContract.TYPE_ECG_MODEL,表示ECG设备的型号;EcgDataContract.TYPE_ECG_MODEL, which represents the model of the ECG device;
EcgDataContract.TYPE_COLOR,表示ECG设备的颜色;EcgDataContract.TYPE_COLOR, which represents the color of the ECG device;
EcgDataContract.TYPE_BATTERY,表示ECG设备的电池信息;EcgDataContract.TYPE_BATTERY, which represents the battery information of the ECG device;
EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的设备标识。EcgDataContract.TYPE_DEVICE_ID indicates the device ID of the ECG device.
ECG设备告知以上信息给智能终端,便于智能终端根据不同的ECG设备信息状态,调取相适应的通信、交互、显示、维护等等策略方案。其中,EcgDataContract.TYPE_DEVICE_ID可以在完成绑定操作后,在ECG设备发送给智能终端的消息中携带,在完成绑定操作之前,ECG设备可以不在发送给智能终端的消息中携带EcgDataContract.TYPE_DEVICE_ID。The ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states. Among them, EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation is completed. Before the binding operation is completed, the ECG device may not carry EcgDataContract.TYPE_DEVICE_ID in the message sent to the smart terminal.
步骤2302,接收智能终端在收到ECG状态通知消息后发送的绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息。Step 2302: Receive a binding request message sent by the smart terminal after receiving the ECG status notification message. The binding request message includes at least the identification information and address information of the smart terminal.
智能终端在收到ECG设备发送的EcgStatus消息后,基于EcgStatus消息中携带的ECG设备的地址信息,向地址对应的ECG设备发送绑定请求消息,绑定请求消息中携带智能终端的标识信息和地址信息。为描述方便,后续将绑定请求消息简称为BindRequest消息。BindRequest消息格式可以包括以下字段:After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a binding request message to the ECG device corresponding to the address based on the address information of the ECG device carried in the EcgStatus message. The binding request message carries the identification information and address of the smart terminal information. For the convenience of description, the binding request message will be referred to as BindRequest message for short later. The BindRequest message format can include the following fields:
EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的标识信息;EcgDataContract.TYPE_DEVICE_ID, which represents the identification information of the ECG device;
EcgDataContract.TYPE_IS_PUBLIC_ADDRESS,表示ECG设备的地址信息,该地址信息可以是ECG设备的公共地址信息。EcgDataContract.TYPE_IS_PUBLIC_ADDRESS indicates the address information of the ECG device, and the address information can be the public address information of the ECG device.
步骤2303,向智能终端返回绑定响应消息,并在本地保存第一绑定信息,第一绑定信息中至少包括ECG设备与相应智能终端的标识信息之间的绑定关系;绑定响应消息中至少包括ECG设备的地址信息。Step 2303: Return a binding response message to the smart terminal, and save the first binding information locally. The first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; the binding response message Include at least the address information of the ECG device.
在收到来自智能终端的BindRequest消息后,ECG设备执行相应绑定操作,并本地保存ECG设备与相应智能终端的标识信息之间的绑定关系,在绑定完成后,向智能终端返回绑定响应消息。为描述方便,后续将绑定响应消息简称为BindResponse消息,BindResponse消息格式可以包括以下字段:EcgDataContract.TYPE_BT_ADDRESS。After receiving the BindRequest message from the smart terminal, the ECG device performs the corresponding binding operation, and locally saves the binding relationship between the ECG device and the identification information of the corresponding smart terminal, and returns the binding to the smart terminal after the binding is completed Response message. For the convenience of description, the binding response message will be referred to as BindResponse message for short later. The BindResponse message format may include the following fields: EcgDataContract.TYPE_BT_ADDRESS.
BindResponse消息还可包括以下字段:EcgDataContract.TYPE_ERROR_CODE,表示错误码字段,用于在绑定过程中出错时标识与出错原因相对应的错误码,当然,在绑定过程正常时,EcgDataContract.TYPE_ERROR_CODE字段的取值可以为缺省值。The BindResponse message can also include the following fields: EcgDataContract.TYPE_ERROR_CODE, which represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process. Of course, when the binding process is normal, the EcgDataContract.TYPE_ERROR_CODE field The value can be the default value.
在一可实施方式中,在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第三触发指令时,向智能终端发送ECG状态通知消息;第三触发指令用于指示开始绑定过程;In an implementation manner, after the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains a third trigger instruction, it sends an ECG status notification message to the smart terminal; the third trigger instruction is used to instruct to start binding process;
相应的,在ECG设备获得第三触发指令后,执行绑定过程中,若获得第四触发指令,则中止绑定 过程;第四触发指令用于指示中止绑定过程。Correspondingly, after the ECG device obtains the third trigger instruction, during the execution of the binding process, if the fourth trigger instruction is obtained, the binding process is terminated; the fourth trigger instruction is used to instruct the termination of the binding process.
也就是说,ECG设备需要获得触发指令,来触发开始绑定过程的相关操作;另外,在执行绑定的过程中,若获得中止绑定的触发指令,则可立即中止绑定过程。触发的方式可以有多种,如:通过物理按键的触发、虚拟按键的触发、声控、触摸、手势的触发等等,本发明实施例不对触发方式进行限制。In other words, the ECG device needs to obtain a trigger instruction to trigger related operations to start the binding process; in addition, during the binding process, if a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated. There may be multiple triggering modes, such as: triggering through physical buttons, triggering virtual buttons, voice control, touch, and gesture triggering, etc. The embodiment of the present invention does not limit the triggering modes.
在一可实施方式中,ECG设备具有触发电极,当触发电极被触发时,ECG设备获得第三触发指令,当触发电极被停止触发时,ECG设备获得第四触发指令;In an implementation manner, the ECG device has a trigger electrode. When the trigger electrode is triggered, the ECG device obtains a third trigger instruction, and when the trigger electrode is stopped, the ECG device obtains a fourth trigger instruction;
或者,当触发电极被第一次触发时,ECG设备获得第三触发指令,当触发电极被第二次触发时,ECG设备获得第四触发指令。Or, when the trigger electrode is triggered for the first time, the ECG device obtains the third trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the fourth trigger instruction.
也就是说,通过触发电极完成的指令触发过程可以有多种控制逻辑,可以是用户持续长按触发电极,直到绑定过程结束,若在结束之前用户松开触发电极,则绑定过程立即中止;也可以是用户触按一下触发电极,开始绑定过程,当用户再触按一下触发电极时,中止绑定过程。在绑定过程中触发指令的触发方式可以与重置过程中触发指令的触发方式不同。That is to say, the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the binding process ends. If the user releases the trigger electrode before the end, the binding process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the binding process, and when the user touches the trigger electrode again, the binding process is terminated. The trigger mode of the trigger instruction during the binding process may be different from the trigger mode of the trigger instruction during the reset process.
参见图7所示,本发明实施例一提供一种在智能终端侧实施的绑定方法,该方法包括:Referring to FIG. 7, Embodiment 1 of the present invention provides a binding method implemented on the side of a smart terminal, and the method includes:
步骤2401,接收来自ECG设备的ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中包括ECG设备的地址信息。Step 2401: Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
在获得来自ECG设备的ECG状态通知消息之前,方法还可包括:Before obtaining the ECG status notification message from the ECG device, the method may further include:
获得第五触发指令,第五触发指令用于指示开始绑定过程;Obtain the fifth trigger instruction, the fifth trigger instruction is used to instruct to start the binding process;
响应于第五触发指令,调用绑定界面,绑定界面用于实时更新绑定过程中的状态变化,包括在绑定完成后在绑定界面展示绑定成功的状态。In response to the fifth trigger instruction, the binding interface is invoked, and the binding interface is used for real-time update of the state change during the binding process, including displaying the successful binding state on the binding interface after the binding is completed.
也就是说,需要智能终端首先启动绑定程序,并调用相应的绑定界面,从而能够通过界面实时展示绑定过程中的各个状态。In other words, the smart terminal needs to first start the binding program and call the corresponding binding interface, so that each state in the binding process can be displayed in real time through the interface.
步骤2402,向ECG设备发送绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息。Step 2402: Send a binding request message to the ECG device. The binding request message includes at least the identification information and address information of the smart terminal.
智能终端在收到来自ECG设备的EcgStatus消息后,向ECG设备发送BindRequest消息。其中,向ECG设备发送BindRequest消息的操作可以是由特定指令或操作来触发的。After receiving the EcgStatus message from the ECG device, the smart terminal sends a BindRequest message to the ECG device. Among them, the operation of sending the BindRequest message to the ECG device may be triggered by a specific instruction or operation.
步骤2403,接收ECG设备的绑定响应消息,在本地保存第二绑定信息,第二绑定信息中至少包括智能终端与ECG设备的地址信息之间的绑定关系;绑定响应消息中至少包括ECG设备的地址信息。Step 2403: Receive the binding response message of the ECG device, and save the second binding information locally. The second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; the binding response message includes at least Including the address information of the ECG device.
智能终端在收到来自ECG设备的BindResponse消息后,执行智能终端侧的绑定操作,并本地保存智能终端与ECG设备的地址信息之间的绑定关系,在绑定成功后,通过绑定界面显示绑定成功的状态,以提醒用户。After receiving the BindResponse message from the ECG device, the smart terminal performs the binding operation on the smart terminal side, and locally saves the binding relationship between the smart terminal and the address information of the ECG device. After the binding is successful, the binding interface is used The status of successful binding is displayed to remind the user.
在一可实施方式中,在向ECG设备发送BindRequest消息后,启动定时器,若定时器超时仍未收到ECG设备返回的BindResponse消息,则在确定BindRequest消息的发送次数未超出预设次数时,向ECG设备重发绑定请求消息;在确定绑定请求消息的发送次数超出预设次数时,停止向ECG设备发送绑定请求消息,并中止与对应ECG设备的绑定过程。预设次数可以设定为两次、三次等等,不做限制,根据实际需要进行设定。In an implementation manner, after sending the BindRequest message to the ECG device, the timer is started. If the BindResponse message returned by the ECG device is not received after the timer expires, when it is determined that the number of times the BindRequest message has been sent does not exceed the preset number of times, Resend the binding request message to the ECG device; when it is determined that the number of times of sending the binding request message exceeds the preset number of times, stop sending the binding request message to the ECG device, and terminate the binding process with the corresponding ECG device. The preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
前面提到,本发明实施例的绑定方法是建立在ECG设备与智能终端建立通信连接的基础上完成,参见图8所示,本发明实施例中ECG设备与智能终端之间建立通信连接的过程,包括:As mentioned earlier, the binding method of the embodiment of the present invention is established on the basis of establishing a communication connection between the ECG device and the smart terminal. As shown in FIG. 8, the communication connection between the ECG device and the smart terminal is established in the embodiment of the present invention. The process includes:
步骤2501,获得控制指令,控制指令用于指示开始创建与智能终端的通信连接。Step 2501: Obtain a control instruction, which is used to instruct to start establishing a communication connection with the smart terminal.
本实施例的方法应用于ECG设备,ECG设备获得控制指令的方式可以有多种,如用户通过物理按键或电极触发操作的方式触发ECG设备获得控制指令,或者,用户通过虚拟按键操作的方式触发ECG设备获得控制指令,甚至可以是通过语音手势等操作的方式触发ECG设备获得控制指令,对于控制指令的触发方式本发明实施例不做限制。ECG设备在获得控制指令后,开始执行与智能终端建立通信连接的过程,这种连接优选为无线连接方式,当然,若有线连接方式也适用于本发明实施例的情况下,本发 明实施例的保护范围也覆盖有线连接方式的情形。The method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways. For example, the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation. The ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures. The method of triggering the control instruction is not limited in the embodiment of the present invention. After the ECG device obtains the control instruction, it starts to execute the process of establishing a communication connection with the smart terminal. This connection is preferably a wireless connection. Of course, if the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
步骤2502,响应于控制指令,确定当前所示满足的预设条件。其中,预设条件至少包括:2502a所示的第一预设条件、2502b所示的第二预设条件、2502c所示的第三预设条件。Step 2502, in response to the control instruction, determine the preset condition that is currently shown to be satisfied. The preset conditions include at least: the first preset condition shown in 2502a, the second preset condition shown in 2502b, and the third preset condition shown in 2502c.
步骤2503,执行与所满足的预设条件相对应的连接策略,从而建立与智能终端间的通信连接。其中,连接策略至少包括:2503a与第一预设条件对应的第一连接策略、2503b与第二预设条件对应的第二连接策略、2503c与第三预设条件对应的第三连接策略。Step 2503: Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal. The connection strategy includes at least: a first connection strategy 2503a corresponding to the first preset condition, a second connection strategy 2503b corresponding to the second preset condition, and a third connection strategy 2503c corresponding to the third preset condition.
本发明实施例中,ECG设备与智能终端间的通信连接可以采用BLE连接方式,当然,本发明实施例并不仅限于BLE的连接方式,实际应用中其他可使用本发明实施例的连接建立机制的任意连接方式,应当也都属于本发明实施例的保护范围。In the embodiment of the present invention, the communication connection between the ECG device and the smart terminal may adopt the BLE connection mode. Of course, the embodiment of the present invention is not limited to the BLE connection mode. In practical applications, other connection establishment mechanisms of the embodiment of the present invention may be used. Any connection manner should also fall within the protection scope of the embodiments of the present invention.
在一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为智能终端的公共地址(public address);In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路。在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;如果连接建立失败,则中止上述通信连接过程。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly. After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,且绑定的智能终端地址为public address,则直接尝试向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal. The terminal initiates a connection request.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是智能终端的公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若未扫描到已绑定的智能终端,则中止通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,但绑定的智能终端地址不是public address,则先发起对绑定智能终端的扫描,如能扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其没有绑定的智能终端,则需要发起对智能终端的扫描过程,向扫描到的智能终端发起连接请求。That is, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身具备或可实现强制重置的功能,或者ECG设备的扫描和连接用时较长,则可优选此实施方式的方案。因为,以上实施方式的方案机制设计简洁,不占用过多处理器资源,效 率高、时间短,在ECG设备自身的扫描和连接用时较长情况下,能保证整个连接建立过程的时效性,提升用户体验。再有,在ECG设备自身可实现强制重置功能的情况下,连接过程的设计无需过多操作流程,一些异常情况可以通过ECG设备强制重置的方式来解决。In addition, if the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time, the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
在另一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为公共地址;In another implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
若与已绑定的智能终端件的连接建立失败,则发起对已绑定智能终端的扫描;If the connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身不具备或无法实现强制重置的功能,且ECG设备的扫描和连接用时较短,则可优选此实施方式的方案。因为,上述实施方式虽然相比前一实施方式的操作流程复杂一些,但在不具备强制重置的ECG设备上实施本方案,能够覆盖多种异常情形的解决方案,并且能够保证整个连接建立过程的高效性和用时短。In addition, if the ECG device itself does not have or cannot realize the function of forced reset, and the scanning and connection time of the ECG device is relatively short, the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
参见图9,本发明实施例还提供了一种应用于ECG设备端的重置装置,包括:Referring to FIG. 9, an embodiment of the present invention also provides a reset device applied to an ECG device end, including:
第一发送单元2601,用于在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知 消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息;The first sending unit 2601 is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device ;
第一接收单元2602,用于接收智能终端在收到ECG状态通知消息后发送的重置请求消息,重置请求消息中至少包括智能终端的标识信息;The first receiving unit 2602 is configured to receive a reset request message sent by the smart terminal after receiving the ECG status notification message, and the reset request message includes at least the identification information of the smart terminal;
第一处理单元2603,用于执行ECG设备侧的重置操作;The first processing unit 2603 is configured to perform a reset operation on the ECG device side;
第二发送单元2604,用于在重置操作完成后向智能终端返回重置响应消息。The second sending unit 2604 is configured to return a reset response message to the smart terminal after the reset operation is completed.
在一可实施方式中,重置操作包括:In a possible implementation, the reset operation includes:
根据重置请求消息中携带的智能终端的标识信息,查找对应智能终端的绑定信息,在查找到对应智能终端的绑定信息时,将绑定信息删除,并清除ECG设备与相应智能终端间的绑定关系。According to the identification information of the smart terminal carried in the reset request message, search for the binding information of the corresponding smart terminal. When the binding information of the corresponding smart terminal is found, the binding information is deleted, and the relationship between the ECG device and the corresponding smart terminal is cleared The binding relationship.
在一可实施方式中,重置响应消息中包括ECG设备的地址信息和错误码,错误码用于标识ECG设备侧的重置是否成功。In an implementation manner, the reset response message includes the address information and error code of the ECG device, and the error code is used to identify whether the reset on the ECG device side is successful.
在一可实施方式中,第一处理单元2603用于,在ECG设备与智能终端建立通信连接后,ECG设备获得第一触发指令时,通知第一发送单元2601向智能终端发送ECG状态通知消息;第一触发指令用于指示开始重置过程;In an implementation manner, the first processing unit 2603 is configured to notify the first sending unit 2601 to send an ECG status notification message to the smart terminal when the ECG device obtains the first trigger instruction after the ECG device establishes a communication connection with the smart terminal; The first trigger instruction is used to instruct to start the reset process;
相应的,在ECG设备执行重置过程中,若获得第二触发指令,则中止重置过程;第二触发指令用于指示中止重置过程。Correspondingly, during the reset process of the ECG device, if the second trigger instruction is obtained, the reset process is aborted; the second trigger instruction is used to instruct to abort the reset process.
在一可实施方式中,ECG设备具有触发电极,可以是在触发电极被触发时,第一处理单元2603获得第一触发指令,在触发电极被停止触发时,第一处理单元2603获得第二触发指令;In an implementation manner, the ECG device has a trigger electrode. When the trigger electrode is triggered, the first processing unit 2603 obtains the first trigger instruction, and when the trigger electrode stops triggering, the first processing unit 2603 obtains the second trigger. instruction;
或者,在触发电极被第一次触发时,第一处理单元2603获得第一触发指令,在触发电极被第二次触发时,第一处理单元2603获得第二触发指令。Or, when the trigger electrode is triggered for the first time, the first processing unit 2603 obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the first processing unit 2603 obtains the second trigger instruction.
参见图10,本发明实施例还提供了一种应用于智能终端侧的重置装置,包括:Referring to FIG. 10, an embodiment of the present invention also provides a reset device applied to the smart terminal side, including:
第二接收单元2701,用于接收来自ECG设备的ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息;The second receiving unit 2701 is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
第三发送单元2702,用于向ECG设备发送重置请求消息,重置请求消息中至少包括智能终端的标识信息;The third sending unit 2702 is configured to send a reset request message to the ECG device, and the reset request message includes at least the identification information of the smart terminal;
第三接收单元2703,用于接收ECG设备返回的重置响应消息;The third receiving unit 2703 is configured to receive the reset response message returned by the ECG device;
第二处理单元2704,用于在重置响应消息表明ECG设备侧的重置成功时,执行智能终端侧的重置操作。The second processing unit 2704 is configured to perform a reset operation on the smart terminal side when the reset response message indicates that the reset on the ECG device side is successful.
在一实施方式中,重置操作包括:In one embodiment, the reset operation includes:
根据重置响应消息中携带的ECG设备的地址信息,查找对应ECG设备的绑定信息,在查找到对应ECG设备的绑定信息时,将绑定信息删除,并清除智能终端与相应ECG设备间的绑定关系。According to the address information of the ECG device carried in the reset response message, search for the binding information of the corresponding ECG device. When the binding information of the corresponding ECG device is found, the binding information is deleted, and the gap between the smart terminal and the corresponding ECG device is cleared The binding relationship.
在一实施方式中,第三发送单元2702进一步用于,在向ECG设备发送重置请求消息后,启动定时器,若定时器超时仍未收到ECG设备返回的重置响应消息,则在确定重置请求消息的发送次数未达到预设次数时,向ECG设备重发重置请求消息;在确定重置请求消息的发送次数达到预设次数时,停止向ECG设备发送重置请求消息,并中止重置过程。In one embodiment, the third sending unit 2702 is further configured to start a timer after sending a reset request message to the ECG device, and if the reset response message returned by the ECG device is not received after the timer expires, it is determined When the number of sending reset request messages has not reached the preset number of times, the reset request message is resent to the ECG device; when it is determined that the sending times of the reset request message reaches the preset number of times, stop sending the reset request message to the ECG device, and The reset process is aborted.
下面,参考图11来描述根据本申请实施例的电子设备211。Hereinafter, an electronic device 211 according to an embodiment of the present application will be described with reference to FIG. 11.
如图11所示,电子设备211包括一个或多个处理器2111和存储器2112。As shown in FIG. 11, the electronic device 211 includes one or more processors 2111 and a memory 2112.
处理器2111可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备211中的其他组件以执行期望的功能。The processor 2111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 211 to perform desired functions.
存储器2112可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器2111可以运行所述程序指令,以实现上文所述的本申请的各个实施例的方法以及/或者其他期望的功能。在所述 计算机可读存储介质中还可以存储诸如输入信号、信号分量、噪声分量等各种内容。The memory 2112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include random access memory (RAM) and/or cache memory (cache), for example. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 2111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function. Various contents such as input signal, signal component, noise component, etc. can also be stored in the computer-readable storage medium.
在一个示例中,电子设备211还可以包括:输入装置2113和输出装置2114,这些组件通过总线系统和/或其他形式的连接机构(未示出)互连。In an example, the electronic device 211 may further include: an input device 2113 and an output device 2114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
该输入设备2113可以包括例如键盘、鼠标等等。The input device 2113 may include, for example, a keyboard, a mouse, and so on.
该输出装置2114可以向外部输出各种信息,包括确定出的距离信息、方向信息等。该输出设备2114可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出设备等等。The output device 2114 can output various information to the outside, including determined distance information, direction information, and so on. The output device 2114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
当然,为了简化,图11中仅示出了该电子设备211中与本申请有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备211还可以包括任何其他适当的组件。Of course, for simplicity, only some of the components related to the present application in the electronic device 211 are shown in FIG. 11, and components such as buses, input/output interfaces, etc. are omitted. In addition, the electronic device 211 may also include any other appropriate components according to specific application conditions.
本发明实施例中一种ECG设备的形式,可以是设置在智能手表的腕带上,ECG设备具有至少两个电极,第一电极设置在腕带的第一表面上,第一表面为腕带佩戴时用于与用户皮肤接触的那一面;第二电极设置在腕带的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手表时,腕带上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的连接建立方法、绑定方法、重置方法则用于提供智能手表与腕带上ECG设备之间交互的实现方案。触发ECG设备获得指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch. The ECG device has at least two electrodes. The first electrode is set on the first surface of the wristband, and the first surface is the wristband. The side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface. When the user wears the smart watch, the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer. Then, the connection establishment method, binding method, and reset method in the embodiments of the present invention are used to provide an implementation solution for interaction between the smart watch and the ECG device on the wristband. The way to trigger the ECG device to obtain instructions can be long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. And so on, the embodiment of the present invention does not limit it.
本发明实施例中一种ECG设备的另一形式,可以是设置成智能手环,ECG设备具有至少两个电极,第一电极设置在智能手环的第一表面上,第一表面为智能手环佩戴时用于与用户皮肤接触的那一面;第二电极设置在智能手环的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手环时,智能手环上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的连接建立方法、绑定方法、重置方法则可用于提供智能手机、智能平板等智能终端与智能手环上ECG设备之间交互的实现方案。同样的,触发ECG设备获得指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。Another form of an ECG device in the embodiment of the present invention can be configured as a smart bracelet. The ECG device has at least two electrodes. The first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand. The side of the ring used for contact with the user's skin when worn; the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface. When the user wears the smart bracelet, the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate. Then, the connection establishment method, binding method, and reset method of the embodiments of the present invention can be used to provide an implementation solution for interaction between smart terminals such as smart phones and smart tablets and ECG devices on smart bracelets. Similarly, the way to trigger the ECG device to obtain instructions can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other triggering methods, and it can also be other electrodes, such as those of an ECG device. The third electrode and so on are not limited in the embodiment of the present invention.
实施例五Example five
参见图12所示,本发明实施例提供一种在ECG设备侧实施的绑定方法,方法主要包括:Referring to FIG. 12, an embodiment of the present invention provides a binding method implemented on the ECG device side, and the method mainly includes:
步骤3101,在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中包括ECG设备的地址信息。Step 3101: After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal. The ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
本发明实施例的ECG设备是指用于测量用户ECG数据的设备,需要说明的是,本发明实施例并不限制ECG设备的类型和种类,可以是医院使用的ECG设备,也可以是家用ECG设备,当然也可以是具有一定创新性设计的可穿戴式ECG设备,如腕带式ECG设备或其他佩戴式ECG设备等等。ECG设备还可以应用在智能设备中,如智能手机、智能平板等等。本发明实施例的方法用于提供智能终端与ECG设备之间的绑定方案,而不用于限制智能终端和ECG设备的类型和种类。The ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on. The method of the embodiment of the present invention is used to provide a binding solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
本发明实施例的绑定方法是建立在ECG设备与智能终端建立通信连接的基础上完成,本发明实施例后续将对ECG设备与智能终端之间建立通信连接的过程进行详细阐述。The binding method in the embodiment of the present invention is completed on the basis of establishing a communication connection between the ECG device and the smart terminal. The embodiment of the present invention will subsequently elaborate on the process of establishing a communication connection between the ECG device and the smart terminal.
为描述方便,后续将ECG状态通知消息简称为EcgStatus消息,EcgStatus消息格式可以包括以下字段:EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息,这里ECG设备与智能终端之间可以采用蓝牙低能耗(BLE,Bluetooth Low Energy)的连接方式,因此,本发明实施例可以将ECG设备的蓝牙地址(BT_ADDRESS)作为ECG设备的地址信息使用。当然,本发明实施例不仅限于将BT_ADDRESS作为ECG设备的地址信息,也可以为其他适用的地址信息。For the convenience of description, the ECG status notification message will be referred to as EcgStatus message. The EcgStatus message format can include the following fields: EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device. Here, Bluetooth low energy (BLE, BLE, Bluetooth Low Energy) connection mode, therefore, the embodiment of the present invention can use the Bluetooth address (BT_ADDRESS) of the ECG device as the address information of the ECG device. Of course, the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
EcgStatus消息还可包括以下字段中的一种或多种:The EcgStatus message may also include one or more of the following fields:
EcgDataContract.TYPE_ECG_VENDOR,表示ECG设备的供应商信息;EcgDataContract.TYPE_ECG_VENDOR, which represents the supplier information of ECG equipment;
EcgDataContract.TYPE_ECG_MODEL,表示ECG设备的型号;EcgDataContract.TYPE_ECG_MODEL, which represents the model of the ECG device;
EcgDataContract.TYPE_COLOR,表示ECG设备的颜色;EcgDataContract.TYPE_COLOR, which represents the color of the ECG device;
EcgDataContract.TYPE_BATTERY,表示ECG设备的电池信息;EcgDataContract.TYPE_BATTERY, which represents the battery information of the ECG device;
EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的设备标识。EcgDataContract.TYPE_DEVICE_ID indicates the device ID of the ECG device.
ECG设备告知以上信息给智能终端,便于智能终端根据不同的ECG设备信息状态,调取相适应的通信、交互、显示、维护等等策略方案。其中,EcgDataContract.TYPE_DEVICE_ID可以在完成绑定操作后,在ECG设备发送给智能终端的消息中携带,在完成绑定操作之前,ECG设备可以不在发送给智能终端的消息中携带EcgDataContract.TYPE_DEVICE_ID。The ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states. Among them, EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation is completed. Before the binding operation is completed, the ECG device may not carry EcgDataContract.TYPE_DEVICE_ID in the message sent to the smart terminal.
步骤3102,接收智能终端在收到ECG状态通知消息后发送的绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息。Step 3102: Receive a binding request message sent by the smart terminal after receiving the ECG status notification message. The binding request message includes at least the identification information and address information of the smart terminal.
智能终端在收到ECG设备发送的EcgStatus消息后,基于EcgStatus消息中携带的ECG设备的地址信息,向地址对应的ECG设备发送绑定请求消息,绑定请求消息中携带智能终端的标识信息和地址信息。为描述方便,后续将绑定请求消息简称为BindRequest消息。BindRequest消息格式可以包括以下字段:After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a binding request message to the ECG device corresponding to the address based on the address information of the ECG device carried in the EcgStatus message. The binding request message carries the identification information and address of the smart terminal information. For the convenience of description, the binding request message will be referred to as BindRequest message for short later. The BindRequest message format can include the following fields:
EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的标识信息;EcgDataContract.TYPE_DEVICE_ID, which represents the identification information of the ECG device;
EcgDataContract.TYPE_IS_PUBLIC_ADDRESS,表示ECG设备的地址信息,该地址信息可以是ECG设备的公共地址信息。EcgDataContract.TYPE_IS_PUBLIC_ADDRESS indicates the address information of the ECG device, and the address information can be the public address information of the ECG device.
步骤3103,向智能终端返回绑定响应消息,并在本地保存第一绑定信息,第一绑定信息中至少包括ECG设备与相应智能终端的标识信息之间的绑定关系;绑定响应消息中至少包括ECG设备的地址信息。Step 3103: Return a binding response message to the smart terminal, and save the first binding information locally. The first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; the binding response message Include at least the address information of the ECG device.
在收到来自智能终端的BindRequest消息后,ECG设备执行相应绑定操作,并本地保存ECG设备与相应智能终端的标识信息之间的绑定关系,在绑定完成后,向智能终端返回绑定响应消息。为描述方便,后续将绑定响应消息简称为BindResponse消息,BindResponse消息格式可以包括以下字段:EcgDataContract.TYPE_BT_ADDRESS。After receiving the BindRequest message from the smart terminal, the ECG device performs the corresponding binding operation, and locally saves the binding relationship between the ECG device and the identification information of the corresponding smart terminal, and returns the binding to the smart terminal after the binding is completed Response message. For the convenience of description, the binding response message will be referred to as BindResponse message for short later. The BindResponse message format may include the following fields: EcgDataContract.TYPE_BT_ADDRESS.
BindResponse消息还可包括以下字段:EcgDataContract.TYPE_ERROR_CODE,表示错误码字段,用于在绑定过程中出错时标识与出错原因相对应的错误码,当然,在绑定过程正常时,EcgDataContract.TYPE_ERROR_CODE字段的取值可以为缺省值。The BindResponse message can also include the following fields: EcgDataContract.TYPE_ERROR_CODE, which represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process. Of course, when the binding process is normal, the EcgDataContract.TYPE_ERROR_CODE field The value can be the default value.
在一可实施方式中,在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,向智能终端发送ECG状态通知消息;第一触发指令用于指示开始绑定过程;In an implementation manner, after the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start binding process;
相应的,在ECG设备获得第一触发指令后,执行绑定过程中,若获得第二触发指令,则中止绑定过程;第二触发指令用于指示中止绑定过程。Correspondingly, after the ECG device obtains the first trigger instruction, during the execution of the binding process, if the second trigger instruction is obtained, the binding process is terminated; the second trigger instruction is used to instruct the termination of the binding process.
也就是说,ECG设备需要获得触发指令,来触发开始绑定过程的相关操作;另外,在执行绑定的过程中,若获得中止绑定的触发指令,则可立即中止绑定过程。触发的方式可以有多种,如:通过物理按键的触发、虚拟按键的触发、声控、触摸、手势的触发等等,本发明实施例不对触发方式进行限制。In other words, the ECG device needs to obtain a trigger instruction to trigger related operations to start the binding process; in addition, during the binding process, if a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated. There may be multiple triggering modes, such as: triggering through physical buttons, triggering virtual buttons, voice control, touch, and gesture triggering, etc. The embodiment of the present invention does not limit the triggering modes.
在一可实施方式中,ECG设备具有触发电极,当触发电极被触发时,ECG设备获得第一触发指令,当触发电极被停止触发时,ECG设备获得第二触发指令;In an implementation manner, the ECG device has a trigger electrode. When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode is stopped, the ECG device obtains the second trigger instruction;
或者,当触发电极被第一次触发时,ECG设备获得第一触发指令,当触发电极被第二次触发时,ECG设备获得第二触发指令。Or, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
也就是说,通过触发电极完成的指令触发过程可以有多种控制逻辑,可以是用户持续长按触发电极,直到绑定过程结束,若在结束之前用户松开触发电极,则绑定过程立即中止;也可以是用户触按一下触发电极,开始绑定过程,当用户再触按一下触发电极时,中止绑定过程。That is to say, the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the binding process ends. If the user releases the trigger electrode before the end, the binding process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the binding process, and when the user touches the trigger electrode again, the binding process is terminated.
参见图13所示,本发明实施例提供一种在智能终端侧实施的绑定方法,该方法包括:Referring to FIG. 13, an embodiment of the present invention provides a binding method implemented on the side of a smart terminal, and the method includes:
步骤3201,接收来自ECG设备的ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数 据,状态数据中包括ECG设备的地址信息。Step 3201: Receive an ECG status notification message from the ECG device. The ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
在获得来自ECG设备的ECG状态通知消息之前,方法还可包括:Before obtaining the ECG status notification message from the ECG device, the method may further include:
获得第三触发指令,第三触发指令用于指示开始绑定过程;Obtain a third trigger instruction, the third trigger instruction is used to instruct to start the binding process;
响应于第三触发指令,调用绑定界面,绑定界面用于实时更新绑定过程中的状态变化,包括在绑定完成后在绑定界面展示绑定成功的状态。In response to the third trigger instruction, the binding interface is invoked, and the binding interface is used to update the state changes in the binding process in real time, including displaying the binding successful state on the binding interface after the binding is completed.
也就是说,需要智能终端首先启动绑定程序,并调用相应的绑定界面,从而能够通过界面实时展示绑定过程中的各个状态。In other words, the smart terminal needs to first start the binding program and call the corresponding binding interface, so that each state in the binding process can be displayed in real time through the interface.
步骤3202,向ECG设备发送绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息。Step 3202: Send a binding request message to the ECG device. The binding request message includes at least the identification information and address information of the smart terminal.
智能终端在收到来自ECG设备的EcgStatus消息后,向ECG设备发送BindRequest消息。其中,向ECG设备发送BindRequest消息的操作可以是由特定指令或操作来触发的。After receiving the EcgStatus message from the ECG device, the smart terminal sends a BindRequest message to the ECG device. Among them, the operation of sending the BindRequest message to the ECG device may be triggered by a specific instruction or operation.
步骤3203,接收ECG设备的绑定响应消息,在本地保存第二绑定信息,第二绑定信息中至少包括智能终端与ECG设备的地址信息之间的绑定关系;绑定响应消息中至少包括ECG设备的地址信息。Step 3203: Receive the binding response message of the ECG device, and save the second binding information locally. The second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; the binding response message includes at least Including the address information of the ECG device.
智能终端在收到来自ECG设备的BindResponse消息后,执行智能终端侧的绑定操作,并本地保存智能终端与ECG设备的地址信息之间的绑定关系,在绑定成功后,通过绑定界面显示绑定成功的状态,以提醒用户。After receiving the BindResponse message from the ECG device, the smart terminal performs the binding operation on the smart terminal side, and locally saves the binding relationship between the smart terminal and the address information of the ECG device. After the binding is successful, the binding interface is used The status of successful binding is displayed to remind the user.
在一可实施方式中,在向ECG设备发送BindRequest消息后,启动定时器,若定时器超时仍未收到ECG设备返回的BindResponse消息,则在确定BindRequest消息的发送次数未超出预设次数时,向ECG设备重发绑定请求消息;在确定绑定请求消息的发送次数超出预设次数时,停止向ECG设备发送绑定请求消息,并中止与对应ECG设备的绑定过程。预设次数可以设定为两次、三次等等,不做限制,根据实际需要进行设定。In an implementation manner, after sending the BindRequest message to the ECG device, the timer is started. If the BindResponse message returned by the ECG device is not received after the timer expires, when it is determined that the number of times the BindRequest message has been sent does not exceed the preset number of times, Resend the binding request message to the ECG device; when it is determined that the number of times of sending the binding request message exceeds the preset number of times, stop sending the binding request message to the ECG device, and terminate the binding process with the corresponding ECG device. The preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
前面提到,本发明实施例的绑定方法是建立在ECG设备与智能终端建立通信连接的基础上完成,参见图14所示,本发明实施例中ECG设备与智能终端之间建立通信连接的过程,包括:As mentioned earlier, the binding method of the embodiment of the present invention is established on the basis of establishing a communication connection between the ECG device and the smart terminal. The process includes:
步骤3301,获得控制指令,控制指令用于指示开始创建与智能终端的通信连接。Step 3301: Obtain a control instruction, where the control instruction is used to instruct to start establishing a communication connection with the smart terminal.
本发明实施例的ECG设备是指用于测量用户ECG数据的设备,需要说明的是,本发明实施例并不限制ECG设备的类型和种类,可以是医院使用的ECG设备,也可以是家用ECG设备,当然也可以是具有一定创新性设计的可穿戴式ECG设备,如腕带式ECG设备或其他佩戴式ECG设备等等。ECG设备还可以应用在智能设备中,如智能手机、智能平板等等。本发明实施例的信息处理方法用于提供智能终端与ECG设备之间的连接建立方案,而不用于限制智能终端和ECG设备的类型和种类。The ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on. The information processing method of the embodiment of the present invention is used to provide a connection establishment solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
本实施例的方法应用于ECG设备,ECG设备获得控制指令的方式可以有多种,如用户通过物理按键或电极触发操作的方式触发ECG设备获得控制指令,或者,用户通过虚拟按键操作的方式触发ECG设备获得控制指令,甚至可以是通过语音手势等操作的方式触发ECG设备获得控制指令,对于控制指令的触发方式本发明实施例不做限制。ECG设备在获得控制指令后,开始执行与智能终端建立通信连接的过程,这种连接优选为无线连接方式,当然,若有线连接方式也适用于本发明实施例的情况下,本发明实施例的保护范围也覆盖有线连接方式的情形。The method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways. For example, the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation. The ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures. The method of triggering the control instruction is not limited in the embodiment of the present invention. After the ECG device obtains the control instruction, it starts to execute the process of establishing a communication connection with the smart terminal. This connection is preferably a wireless connection. Of course, if the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
步骤3302,响应于控制指令,确定当前所示满足的预设条件。其中,预设条件至少包括:3302a所示的第一预设条件、3302b所示的第二预设条件、3302c所示的第三预设条件。Step 3302, in response to the control instruction, determine the preset condition that is currently shown to be satisfied. The preset conditions include at least: the first preset condition shown in 3302a, the second preset condition shown in 3302b, and the third preset condition shown in 3302c.
步骤3303,执行与所满足的预设条件相对应的连接策略,从而建立与智能终端间的通信连接。其中,连接策略至少包括:3303a与第一预设条件对应的第一连接策略、3303b与第二预设条件对应的第二连接策略、3303c与第三预设条件对应的第三连接策略。Step 3303: Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal. The connection strategy includes at least: a first connection strategy 3303a corresponding to the first preset condition, a second connection strategy 3303b corresponding to the second preset condition, and a third connection strategy 3303c corresponding to the third preset condition.
本发明实施例中,ECG设备与智能终端间的通信连接可以采用BLE连接方式,当然,本发明实施例并不仅限于BLE的连接方式,实际应用中其他可使用本发明实施例的连接建立机制的任意连接方式,应当也都属于本发明实施例的保护范围。In the embodiment of the present invention, the communication connection between the ECG device and the smart terminal may adopt the BLE connection mode. Of course, the embodiment of the present invention is not limited to the BLE connection mode. In practical applications, other connection establishment mechanisms of the embodiment of the present invention may be used. Any connection manner should also fall within the protection scope of the embodiments of the present invention.
在一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为智能终端的公共地址(public address);In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路。在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;如果连接建立失败,则中止上述通信连接过程。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly. After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,且绑定的智能终端地址为public address,则直接尝试向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal. The terminal initiates a connection request.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是智能终端的公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若未扫描到已绑定的智能终端,则中止通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,但绑定的智能终端地址不是public address,则先发起对绑定智能终端的扫描,如能扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其没有绑定的智能终端,则需要发起对智能终端的扫描过程,向扫描到的智能终端发起连接请求。That is, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身具备或可实现强制重置的功能,或者ECG设备的扫描和连接用时较长,则可优选此实施方式的方案。因为,以上实施方式的方案机制设计简洁,不占用过多处理器资源,效率高、时间短,在ECG设备自身的扫描和连接用时较长情况下,能保证整个连接建立过程的时效性,提升用户体验。再有,在ECG设备自身可实现强制重置功能的情况下,连接过程的设计无需过多操作流程,一些异常情况可以通过ECG设备强制重置的方式来解决。In addition, if the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time, the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
在另一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为公共地址;In another implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
若与已绑定的智能终端件的连接建立失败,则发起对已绑定智能终端的扫描;If the connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身不具备或无法实现强制重置的功能,且ECG设备的扫描和连接用时较短,则可优选此实施方式的方案。因为,上述实施方式虽然相比前一实施方式的操作流程复杂一些,但在不具备强制重置的ECG设备上实施本方案,能够覆盖多种异常情形的解决方案,并且能够保证整个连接建立过程的高效性和用时短。In addition, if the ECG device itself does not have or cannot realize the function of forced reset, and the scanning and connection time of the ECG device is relatively short, the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
参见图15,本发明实施例还提供了一种应用于ECG设备端的绑定装置,包括:Referring to FIG. 15, an embodiment of the present invention also provides a binding device applied to an ECG device end, including:
第一发送单元3401,用于在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中包括ECG设备的地址信息;The first sending unit 3401 is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal. The ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
第一接收单元3402,用于接收智能终端在收到ECG状态通知消息后发送的绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息;The first receiving unit 3402 is configured to receive a binding request message sent by the smart terminal after receiving the ECG status notification message, and the binding request message includes at least the identification information and address information of the smart terminal;
第二发送单元3403,用于向智能终端返回绑定响应消息,绑定响应消息中至少包括ECG设备的地址信息;The second sending unit 3403 is configured to return a binding response message to the smart terminal, and the binding response message includes at least the address information of the ECG device;
第一处理单元3404,用于在本地保存第一绑定信息,第一绑定信息中至少包括ECG设备与相应智能终端的标识信息之间的绑定关系。The first processing unit 3404 is configured to store the first binding information locally, and the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal.
在一可实施方式中,第一发送单元3401进一步用于,在ECG设备与智能终端建立通信连接后,ECG设备获得第一触发指令时,向智能终端发送ECG状态通知消息;第一触发指令用于指示开始绑定过程;In an implementation manner, the first sending unit 3401 is further configured to send an ECG status notification message to the smart terminal when the ECG device obtains the first trigger instruction after the ECG device establishes a communication connection with the smart terminal; the first trigger instruction is used for Start the binding process at the instruction;
相应的,第一处理单元3404进一步用于,在ECG设备获得第一触发指令后,执行绑定过程中,若获得第二触发指令,则中止绑定过程;第二触发指令用于指示中止绑定过程。Correspondingly, the first processing unit 3404 is further configured to: after the ECG device obtains the first trigger instruction, during the binding process, if the second trigger instruction is obtained, the binding process is terminated; the second trigger instruction is used to instruct the termination of the binding process. Set process.
在一可实施方式中,ECG设备具有触发电极,In a possible embodiment, the ECG device has trigger electrodes,
则当所述触发电极被触发时,ECG设备获得第一触发指令,当触发电极被停止触发时,ECG设备获得第二触发指令;Then when the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
或者,当触发电极被第一次触发时,ECG设备获得第一触发指令,当触发电极被第二次触发时,ECG设备获得第二触发指令。Or, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
参见图16,本发明实施例还提供了一种应用于智能终端侧的绑定装置,包括:Referring to FIG. 16, an embodiment of the present invention also provides a binding device applied to the smart terminal side, including:
第二接收单元3501,用于接收来自ECG设备的ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中包括ECG设备的地址信息;The second receiving unit 3501 is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
第三发送单元3502,用于向ECG设备发送绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息;The third sending unit 3502 is configured to send a binding request message to the ECG device, and the binding request message includes at least the identification information and address information of the smart terminal;
第三接收单元3503,用于接收ECG设备的绑定响应消息,绑定响应消息中至少包括ECG设备的地址信息;The third receiving unit 3503 is configured to receive a binding response message of the ECG device, and the binding response message includes at least the address information of the ECG device;
第二处理单元3504,用于在本地保存第二绑定信息,第二绑定信息中至少包括智能终端与ECG设备的地址信息之间的绑定关系。The second processing unit 3504 is configured to store the second binding information locally, and the second binding information at least includes the binding relationship between the address information of the smart terminal and the ECG device.
在一可实施方式中,所述第二处理单元3504进一步用于,在获得来自ECG设备的ECG状态通知消息之前,获得第三触发指令,第三触发指令用于指示开始绑定过程;响应于第三触发指令,调用绑定界面,绑定界面用于实时更新绑定过程中的状态变化,包括在绑定完成后在绑定界面展示绑定成功的状态。In an implementation manner, the second processing unit 3504 is further configured to obtain a third trigger instruction before obtaining the ECG status notification message from the ECG device, and the third trigger instruction is used to instruct to start the binding process; in response to The third trigger instruction is to call the binding interface. The binding interface is used to update the state changes in the binding process in real time, including displaying the successful binding state on the binding interface after the binding is completed.
在一可实施方式中,第三发送单元3502进一步用于,在向ECG设备发送绑定请求消息后,启动定时器,若定时器超时仍未收到ECG设备返回的绑定响应消息,则在确定绑定请求消息的发送次数未达到预设次数时,向ECG设备重发绑定请求消息;在确定绑定请求消息的发送次数达到预设次数时,停止向ECG设备发送所述绑定请求消息,并中止与对应ECG设备的绑定过程。In an implementation manner, the third sending unit 3502 is further configured to start a timer after sending the binding request message to the ECG device. If the timer expires and the binding response message returned by the ECG device is not received, then When it is determined that the number of times of sending the binding request message has not reached the preset number of times, the binding request message is resent to the ECG device; when it is determined that the number of times of sending the binding request message reaches the preset number of times, the sending of the binding request to the ECG device is stopped Message and abort the binding process with the corresponding ECG device.
下面,参考图17来描述根据本申请实施例的电子设备311。Hereinafter, an electronic device 311 according to an embodiment of the present application will be described with reference to FIG. 17.
如图17所示,电子设备311包括一个或多个处理器3111和存储器3112。As shown in FIG. 17, the electronic device 311 includes one or more processors 3111 and a memory 3112.
处理器3111可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备311中的其他组件以执行期望的功能。The processor 3111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 311 to perform desired functions.
存储器3112可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器3111可以运行所述程序指令,以实现上文所述的本申请的各个实施例的方法以及/或者其他期望的功能。在所述计算机可读存储介质中还可以存储诸如输入信号、信号分量、噪声分量等各种内容。The memory 3112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include random access memory (RAM) and/or cache memory (cache), for example. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 3111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function. Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
在一个示例中,电子设备311还可以包括:输入装置3113和输出装置3114,这些组件通过总线系统和/或其他形式的连接机构(未示出)互连。In an example, the electronic device 311 may further include: an input device 3113 and an output device 3114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
该输入设备3113可以包括例如键盘、鼠标等等。The input device 3113 may include, for example, a keyboard, a mouse, and so on.
该输出装置3114可以向外部输出各种信息,包括确定出的距离信息、方向信息等。该输出设备3114可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出设备等等。The output device 3114 can output various information to the outside, including determined distance information, direction information, and so on. The output device 3114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
当然,为了简化,图17中仅示出了该电子设备311中与本申请有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备311还可以包括任何其他适当的组件。Of course, for simplicity, FIG. 17 only shows some of the components related to the present application in the electronic device 311, and omits components such as a bus, an input/output interface, and the like. In addition, according to specific application conditions, the electronic device 311 may also include any other appropriate components.
本发明实施例中一种ECG设备的形式,可以是设置在智能手表的腕带上,ECG设备具有至少两个电 极,第一电极设置在腕带的第一表面上,第一表面为腕带佩戴时用于与用户皮肤接触的那一面;第二电极设置在腕带的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手表时,腕带上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的绑定方法则用于提供智能手表与腕带上ECG设备之间建立绑定的实现方案。触发ECG设备获得控制指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch. The ECG device has at least two electrodes. The first electrode is set on the first surface of the wristband, and the first surface is the wristband. The side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface. When the user wears the smart watch, the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer. Then, the binding method in the embodiment of the present invention is used to provide an implementation solution for establishing binding between the smart watch and the ECG device on the wristband. The way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. Electrodes, etc., are not limited in the embodiment of the present invention.
本发明实施例中一种ECG设备的另一形式,可以是设置成智能手环,ECG设备具有至少两个电极,第一电极设置在智能手环的第一表面上,第一表面为智能手环佩戴时用于与用户皮肤接触的那一面;第二电极设置在智能手环的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手环时,智能手环上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的绑定方法则可用于提供智能手机、智能平板等智能终端与智能手环上ECG设备之间建立绑定的实现方案。同样的,触发ECG设备获得控制指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。Another form of an ECG device in the embodiment of the present invention can be configured as a smart bracelet. The ECG device has at least two electrodes. The first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand. The side of the ring used for contact with the user's skin when worn; the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface. When the user wears the smart bracelet, the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate. Then, the binding method of the embodiment of the present invention can be used to provide an implementation solution for establishing binding between smart terminals such as smart phones and smart tablets and ECG devices on smart bracelets. Similarly, the way to trigger the ECG device to obtain the control command can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as ECG devices. The third electrode, etc., are not limited in the embodiment of the present invention.
实施例六Example Six
参见图18所示,本发明实施例提供一种在ECG设备端实施的心电测量方法,包括:Referring to FIG. 18, an embodiment of the present invention provides an ECG measurement method implemented on an ECG device, including:
步骤4101,在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息。Step 4101: After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal. The ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
本发明实施例的ECG设备是指用于测量用户ECG数据的设备,需要说明的是,本发明实施例并不限制ECG设备的类型和种类,可以是医院使用的ECG设备,也可以是家用ECG设备,当然也可以是具有一定创新性设计的可穿戴式ECG设备,如腕带式ECG设备或其他佩戴式ECG设备等等。ECG设备还可以应用在智能设备中,如智能手机、智能平板等等。本发明实施例的方法用于提供智能终端与ECG设备之间的心电测量方案,而不用于限制智能终端和ECG设备的类型和种类。The ECG device in the embodiment of the present invention refers to a device used to measure user ECG data. It should be noted that the embodiment of the present invention does not limit the type and type of ECG device. It can be an ECG device used in a hospital or a home ECG. The device, of course, can also be a wearable ECG device with a certain innovative design, such as a wristband type ECG device or other wearable ECG devices, and so on. ECG devices can also be used in smart devices, such as smart phones, smart tablets, and so on. The method of the embodiment of the present invention is used to provide an electrocardiogram measurement solution between the smart terminal and the ECG device, and is not used to limit the types and types of the smart terminal and the ECG device.
本发明实施例的心电测量方法是建立在ECG设备已绑定智能终端的基础上完成,本发明实施例后续将对ECG设备与智能终端之间建立绑定的过程进行详细阐述。The electrocardiogram measurement method in the embodiment of the present invention is completed on the basis that the ECG device has been bound to the smart terminal, and the process of establishing the binding between the ECG device and the smart terminal will be described in detail later in the embodiment of the present invention.
为描述方便,后续将ECG状态通知消息简称为EcgStatus消息,EcgStatus消息格式可以包括以下字段:EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的设备标识。For the convenience of description, the ECG status notification message will be referred to as the EcgStatus message in the following. The EcgStatus message format may include the following fields: EcgDataContract.TYPE_DEVICE_ID, which represents the device identification of the ECG device.
EcgStatus消息还可包括以下字段中的一种或多种:The EcgStatus message may also include one or more of the following fields:
EcgDataContract.TYPE_ECG_VENDOR,表示ECG设备的供应商信息;EcgDataContract.TYPE_ECG_VENDOR, which represents the supplier information of ECG equipment;
EcgDataContract.TYPE_ECG_MODEL,表示ECG设备的型号;EcgDataContract.TYPE_ECG_MODEL, which represents the model of the ECG device;
EcgDataContract.TYPE_COLOR,表示ECG设备的颜色;EcgDataContract.TYPE_COLOR, which represents the color of the ECG device;
EcgDataContract.TYPE_BATTERY,表示ECG设备的电池信息;EcgDataContract.TYPE_BATTERY, which represents the battery information of the ECG device;
EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息,这里ECG设备与智能终端之间可以采用蓝牙低能耗(BLE,Bluetooth Low Energy)的连接方式,因此,本发明实施例可以将ECG设备的蓝牙地址(BT_ADDRESS)作为ECG设备的地址信息使用。当然,本发明实施例不仅限于将BT_ADDRESS作为ECG设备的地址信息,也可以为其他适用的地址信息。EcgDataContract.TYPE_BT_ADDRESS indicates the address information of the ECG device. Here, the Bluetooth Low Energy (BLE, Bluetooth Low Energy) connection method can be used between the ECG device and the smart terminal. Therefore, the embodiment of the present invention can set the Bluetooth address (BT_ADDRESS) of the ECG device ) Is used as the address information of the ECG device. Of course, the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
ECG设备告知以上信息给智能终端,便于智能终端根据不同的ECG设备信息状态,调取相适应的通信、交互、显示、维护等等策略方案。其中,EcgDataContract.TYPE_DEVICE_ID可以在完成ECG设备与智能终端的绑定操作后,在ECG设备发送给智能终端的消息中携带,在完成绑定操作之前,ECG设备可以不在发送给智能终端的消息中携带EcgDataContract.TYPE_DEVICE_ID。The ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states. Among them, EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation of the ECG device and the smart terminal is completed. Before the binding operation is completed, the ECG device may not be carried in the message sent to the smart terminal EcgDataContract.TYPE_DEVICE_ID.
步骤4102,接收智能终端在收到ECG状态通知消息后发送的测量请求消息,开始ECG测量,并向智能终端发送测量开始消息。Step 4102: Receive a measurement request message sent by the smart terminal after receiving the ECG status notification message, start ECG measurement, and send a measurement start message to the smart terminal.
智能终端在收到ECG设备发送的EcgStatus消息后,基于EcgStatus消息中携带的ECG设备的标识信息,向对应的ECG设备发送测量请求消息,测量请求消息中携带智能终端的标识信息。为描述方便,后续将测量请求消息简称为MeasureRequest消息。MeasureRequest消息格式可以包括以下字段:After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a measurement request message to the corresponding ECG device based on the identification information of the ECG device carried in the EcgStatus message, and the measurement request message carries the identification information of the smart terminal. For the convenience of description, the measurement request message will be referred to as the MeasureRequest message in the following. The MeasureRequest message format can include the following fields:
EcgDataContract.TYPE_DEVICE_ID,表示智能终端的标识信息;EcgDataContract.TYPE_DEVICE_ID, which represents the identification information of the smart terminal;
EcgDataContract.TYPE_MEASURE_MODE,表示测量模式信息,用于标识或描述测量的模式内容,不同的测量模式可以对应不同的测量项目内容、展示风格等等。EcgDataContract.TYPE_MEASURE_MODE, which represents the measurement mode information, used to identify or describe the measurement mode content. Different measurement modes can correspond to different measurement item content, display styles, and so on.
ECG设备在收到MeasureRequest消息后,确认是绑定的智能终端发来的MeasureRequest消息,则开始ECG测量操作,并向智能终端发送测量开始消息。为描述方便,后续将测量开始消息简称为MeasureStart消息,MeasureStart消息格式可以包括以下字段:After receiving the MeasureRequest message, the ECG device confirms that it is the MeasureRequest message sent by the bound smart terminal, and then starts the ECG measurement operation and sends a measurement start message to the smart terminal. For the convenience of description, the measurement start message will be referred to as MeasureStart message for short in the following. The format of the MeasureStart message may include the following fields:
EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息。EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device.
步骤4103,在ECG测量过程中,将测量数据报文实时发送给智能终端。Step 4103: During the ECG measurement process, the measurement data message is sent to the smart terminal in real time.
ECG设备根据测量请求消息中携带的测量模式信息,执行对应的测量项目内容,并获得相应测量项目的测量数据报文,同时将测量数据报文实时的发送给智能终端。具体测量模式与测量项目内容的对应关系可以根据实际需要进行设定,本发明实施例不做限制。The ECG device executes the corresponding measurement item content according to the measurement mode information carried in the measurement request message, obtains the measurement data message of the corresponding measurement item, and sends the measurement data message to the smart terminal in real time. The corresponding relationship between the specific measurement mode and the content of the measurement item can be set according to actual needs, which is not limited in the embodiment of the present invention.
测量数据报文可以用MeasureData来表示,其格式可以包括以下字段:The measurement data message can be represented by MeasureData, and its format can include the following fields:
EcgDataContract.TYPE_MEASURE_PROGRESS,表示测量进程;EcgDataContract.TYPE_MEASURE_PROGRESS indicates the measurement process;
EcgDataContract.TYPE_MEASURE_DATA,表示与测量进程对应的测量数据。EcgDataContract.TYPE_MEASURE_DATA indicates the measurement data corresponding to the measurement process.
步骤4104,在测量结束时,向智能终端发送测量结束消息。Step 4104: When the measurement ends, send a measurement end message to the smart terminal.
为描述方便,后续将测量结束消息简称为MeastureEnd消息,MeastureEnd消息格式可以包括以下字段:For the convenience of description, the measurement end message will be referred to as the MeastureEnd message in the following. The MeastureEnd message format may include the following fields:
EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息;EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device;
EcgDataContract.TYPE_ERROR_CODE,表示错误码字段,用于在测量过程中出错时标识与出错原因相对应的错误码,当然,在测量过程正常时,EcgDataContract.TYPE_ERROR_CODE字段的取值可以为缺省值。EcgDataContract.TYPE_ERROR_CODE represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the measurement process. Of course, when the measurement process is normal, the value of the EcgDataContract.TYPE_ERROR_CODE field can be the default value.
在一可实施方式中,方法还包括:In a possible implementation, the method further includes:
在ECG设备与智能终端建立通信连接后,ECG设备获得第一触发指令时,向智能终端发送ECG状态通知消息;第一触发指令用于指示开始测量过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the measurement process;
相应的,在ECG设备执行测量过程中,若获得第二触发指令,则中止测量过程;第二触发指令用于指示中止测量过程。Correspondingly, when the ECG device is performing a measurement process, if a second trigger instruction is obtained, the measurement process is suspended; the second trigger instruction is used to instruct the suspension of the measurement process.
也就是说,ECG设备需要获得触发指令,来触发开始测量过程的相关操作;另外,在执行测量的过程中,若获得中止测量的触发指令,则可立即中止测量过程。触发的方式可以有多种,如:通过物理按键的触发、虚拟按键的触发、声控、触摸、手势的触发等等,本发明实施例不对触发方式进行限制。In other words, the ECG device needs to obtain a trigger instruction to trigger related operations to start the measurement process; in addition, during the measurement process, if a trigger instruction to stop the measurement is obtained, the measurement process can be immediately suspended. There may be multiple triggering modes, such as: triggering through physical buttons, triggering virtual buttons, voice control, touch, and gesture triggering, etc. The embodiment of the present invention does not limit the triggering modes.
在一可实施方式中,ECG设备具有触发电极,方法还包括:In a possible embodiment, the ECG device has a trigger electrode, and the method further includes:
当触发电极被触发时,ECG设备获得第一触发指令,当触发电极被停止触发时,ECG设备获得所述第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
或者,当触发电极被第一次触发时,ECG设备获得第一触发指令,当触发电极被第二次触发时,ECG设备获得第二触发指令。Or, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
也就是说,通过触发电极完成的指令触发过程可以有多种控制逻辑,可以是用户持续长按触发电极,直到测量过程结束,若在结束之前用户松开触发电极,则测量过程立即中止;也可以是用户触按一下触发电极,开始测量过程,当用户再触按一下触发电极时,中止测量过程。In other words, the command trigger process completed by the trigger electrode can have multiple control logics, which can be that the user keeps pressing the trigger electrode until the measurement process ends. If the user releases the trigger electrode before the end, the measurement process is immediately terminated; also It can be that the user touches the trigger electrode once to start the measurement process, and when the user touches the trigger electrode again, the measurement process is stopped.
实施例七Example Seven
参见图19所示,本发明实施例提供一种在智能终端侧实施的心电测量方法,该方法包括:Referring to FIG. 19, an embodiment of the present invention provides an electrocardiogram measurement method implemented on the side of a smart terminal, and the method includes:
步骤4201,接收来自ECG设备的ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数 据,状态数据中至少包括ECG设备的标识信息。Step 4201: Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device.
步骤4202,向ECG设备发送测量请求消息。Step 4202: Send a measurement request message to the ECG device.
智能终端在收到来自ECG设备的EcgStatus消息后,可以调用交互界面,用于实时更新测量过程中的状态变化、数据变化等等,并向ECG设备发送测量请求消息,用于请求ECG设备开始执行心电测量操作。After receiving the EcgStatus message from the ECG device, the smart terminal can call the interactive interface for real-time update of status changes and data changes during the measurement process, and send a measurement request message to the ECG device to request the ECG device to start execution ECG measurement operation.
步骤4203,接收ECG设备发送的测量开始消息及测量数据报文,并通过交互界面展示相应测量数据。Step 4203: Receive the measurement start message and the measurement data message sent by the ECG device, and display the corresponding measurement data through the interactive interface.
在收到ECG设备发送的测量开始消息后,开始接收来自ECG设备的实时测量数据报文,在收到实时测量数据报文后,解析获得对应的测量数据,并按照智能终端侧的显示策略通过其交互界面实时展示相应的测量数据。具体的显示策略可以根据实际需要进行设定,本发明实施例不做限制。After receiving the measurement start message sent by the ECG device, start to receive the real-time measurement data message from the ECG device. After receiving the real-time measurement data message, analyze the corresponding measurement data and pass it according to the display strategy on the smart terminal side. The interactive interface displays the corresponding measurement data in real time. The specific display strategy can be set according to actual needs, which is not limited in the embodiment of the present invention.
步骤4204,在收到智能终端的测量结束消息时,根据获得的测量数据生成测量结果,并通过交互界面展示所述测量结果。Step 4204: When receiving the measurement end message of the smart terminal, generate a measurement result according to the obtained measurement data, and display the measurement result through an interactive interface.
ECG设备在测量结束时会向智能终端发送测量结束消息,智能终端在收到来自ECG设备的测量结束消息后,会根据在测量过程中收到的所有测量数据生成测量结果,并通过交互界面展示该测量结果,供用户查看。测量结果的显示方式(图表等等)、类型、风格等等可以根据实际需要进行设定,本发明实施例不做限制。The ECG device will send a measurement end message to the smart terminal at the end of the measurement. After the smart terminal receives the measurement end message from the ECG device, it will generate measurement results based on all measurement data received during the measurement process and display them through the interactive interface The measurement results are available for users to view. The display mode (chart, etc.), type, style, etc. of the measurement result can be set according to actual needs, and the embodiment of the present invention does not limit it.
在一可实施方式中,方法还包括:在向ECG设备发送测量请求消息后,启动定时器,若定时器超时仍未收到ECG设备返回的测量开始消息,则在确定测量请求消息的发送次数未达到预设次数时,向ECG设备重发测量请求消息;在确定测量请求消息的发送次数达到预设次数时,停止向ECG设备发送测量请求消息,并中止测量过程。预设次数可以设定为两次、三次等等,不做限制,根据实际需要进行设定。In an implementation manner, the method further includes: starting a timer after sending the measurement request message to the ECG device, and if the measurement start message returned by the ECG device is not received after the timer expires, determining the number of times the measurement request message is sent When the preset number of times is not reached, the measurement request message is retransmitted to the ECG device; when it is determined that the number of sending the measurement request message reaches the preset number of times, the measurement request message is stopped to the ECG device and the measurement process is suspended. The preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
前面实施例中提到,心电测量方法是建立在ECG设备已绑定智能终端的基础上完成,下面对智能终端与ECG设备间建立绑定的具体过程进行阐述。参见图20所示,本发明实施例提供的一种在ECG设备侧实施的绑定方法,方法主要包括:As mentioned in the previous embodiment, the ECG measurement method is completed on the basis that the ECG device has been bound to the smart terminal. The specific process of establishing the binding between the smart terminal and the ECG device is described below. Referring to FIG. 20, an embodiment of the present invention provides a binding method implemented on the ECG device side. The method mainly includes:
步骤4301,在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中包括ECG设备的地址信息。Step 4301: After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal. The ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
本发明实施例的绑定方法是建立在ECG设备与智能终端建立通信连接的基础上完成,本发明实施例后续将对ECG设备与智能终端之间建立通信连接的过程进行详细阐述。The binding method in the embodiment of the present invention is completed on the basis of establishing a communication connection between the ECG device and the smart terminal. The embodiment of the present invention will subsequently elaborate on the process of establishing a communication connection between the ECG device and the smart terminal.
为描述方便,后续将ECG状态通知消息简称为EcgStatus消息,EcgStatus消息格式可以包括以下字段:EcgDataContract.TYPE_BT_ADDRESS,表示ECG设备的地址信息,这里ECG设备与智能终端之间可以采用蓝牙低能耗(BLE,Bluetooth Low Energy)的连接方式,因此,本发明实施例可以将ECG设备的蓝牙地址(BT_ADDRESS)作为ECG设备的地址信息使用。当然,本发明实施例不仅限于将BT_ADDRESS作为ECG设备的地址信息,也可以为其他适用的地址信息。For the convenience of description, the ECG status notification message will be referred to as EcgStatus message. The EcgStatus message format can include the following fields: EcgDataContract.TYPE_BT_ADDRESS, which represents the address information of the ECG device. Here, Bluetooth low energy (BLE, BLE, Bluetooth Low Energy) connection mode, therefore, the embodiment of the present invention can use the Bluetooth address (BT_ADDRESS) of the ECG device as the address information of the ECG device. Of course, the embodiment of the present invention is not limited to using BT_ADDRESS as the address information of the ECG device, but may also be other applicable address information.
EcgStatus消息还可包括以下字段中的一种或多种:The EcgStatus message may also include one or more of the following fields:
EcgDataContract.TYPE_ECG_VENDOR,表示ECG设备的供应商信息;EcgDataContract.TYPE_ECG_VENDOR, which represents the supplier information of ECG equipment;
EcgDataContract.TYPE_ECG_MODEL,表示ECG设备的型号;EcgDataContract.TYPE_ECG_MODEL, which represents the model of the ECG device;
EcgDataContract.TYPE_COLOR,表示ECG设备的颜色;EcgDataContract.TYPE_COLOR, which represents the color of the ECG device;
EcgDataContract.TYPE_BATTERY,表示ECG设备的电池信息;EcgDataContract.TYPE_BATTERY, which represents the battery information of the ECG device;
EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的设备标识。EcgDataContract.TYPE_DEVICE_ID indicates the device ID of the ECG device.
ECG设备告知以上信息给智能终端,便于智能终端根据不同的ECG设备信息状态,调取相适应的通信、交互、显示、维护等等策略方案。其中,EcgDataContract.TYPE_DEVICE_ID可以在完成绑定操作后,在ECG设备发送给智能终端的消息中携带,在完成绑定操作之前,ECG设备可以不在发送给智能终端的消息中携带EcgDataContract.TYPE_DEVICE_ID。The ECG device notifies the above information to the smart terminal, so that the smart terminal can call the appropriate communication, interaction, display, maintenance, and other strategic solutions according to different ECG device information states. Among them, EcgDataContract.TYPE_DEVICE_ID can be carried in the message sent by the ECG device to the smart terminal after the binding operation is completed. Before the binding operation is completed, the ECG device may not carry EcgDataContract.TYPE_DEVICE_ID in the message sent to the smart terminal.
步骤4302,接收智能终端在收到ECG状态通知消息后发送的绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息。Step 4302: Receive a binding request message sent by the smart terminal after receiving the ECG status notification message. The binding request message includes at least the identification information and address information of the smart terminal.
智能终端在收到ECG设备发送的EcgStatus消息后,基于EcgStatus消息中携带的ECG设备的地址信息,向地址对应的ECG设备发送绑定请求消息,绑定请求消息中携带智能终端的标识信息和地址信息。为描述方便,后续将绑定请求消息简称为BindRequest消息。BindRequest消息格式可以包括以下字段:After receiving the EcgStatus message sent by the ECG device, the smart terminal sends a binding request message to the ECG device corresponding to the address based on the address information of the ECG device carried in the EcgStatus message. The binding request message carries the identification information and address of the smart terminal information. For the convenience of description, the binding request message will be referred to as BindRequest message for short later. The BindRequest message format can include the following fields:
EcgDataContract.TYPE_DEVICE_ID,表示ECG设备的标识信息;EcgDataContract.TYPE_DEVICE_ID, which represents the identification information of the ECG device;
EcgDataContract.TYPE_IS_PUBLIC_ADDRESS,表示ECG设备的地址信息,该地址信息可以是ECG设备的公共地址信息。EcgDataContract.TYPE_IS_PUBLIC_ADDRESS indicates the address information of the ECG device, and the address information can be the public address information of the ECG device.
步骤4303,向智能终端返回绑定响应消息,并在本地保存第一绑定信息,第一绑定信息中至少包括ECG设备与相应智能终端的标识信息之间的绑定关系;绑定响应消息中至少包括ECG设备的地址信息。Step 4303: Return a binding response message to the smart terminal, and save the first binding information locally. The first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; the binding response message Include at least the address information of the ECG device.
在收到来自智能终端的BindRequest消息后,ECG设备执行相应绑定操作,并本地保存ECG设备与相应智能终端的标识信息之间的绑定关系,在绑定完成后,向智能终端返回绑定响应消息。为描述方便,后续将绑定响应消息简称为BindResponse消息,BindResponse消息格式可以包括以下字段:EcgDataContract.TYPE_BT_ADDRESS。After receiving the BindRequest message from the smart terminal, the ECG device performs the corresponding binding operation, and locally saves the binding relationship between the ECG device and the identification information of the corresponding smart terminal, and returns the binding to the smart terminal after the binding is completed Response message. For the convenience of description, the binding response message will be referred to as BindResponse message for short later. The BindResponse message format may include the following fields: EcgDataContract.TYPE_BT_ADDRESS.
BindResponse消息还可包括以下字段:EcgDataContract.TYPE_ERROR_CODE,表示错误码字段,用于在绑定过程中出错时标识与出错原因相对应的错误码,当然,在绑定过程正常时,EcgDataContract.TYPE_ERROR_CODE字段的取值可以为缺省值。The BindResponse message can also include the following fields: EcgDataContract.TYPE_ERROR_CODE, which represents the error code field, used to identify the error code corresponding to the cause of the error when an error occurs during the binding process. Of course, when the binding process is normal, the EcgDataContract.TYPE_ERROR_CODE field The value can be the default value.
在一可实施方式中,在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第三触发指令时,向智能终端发送ECG状态通知消息;第三触发指令用于指示开始绑定过程;In an implementation manner, after the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains a third trigger instruction, it sends an ECG status notification message to the smart terminal; the third trigger instruction is used to instruct to start binding process;
相应的,在ECG设备获得第三触发指令后,执行绑定过程中,若获得第四触发指令,则中止绑定过程;第四触发指令用于指示中止绑定过程。Correspondingly, after the ECG device obtains the third trigger instruction, during the execution of the binding process, if the fourth trigger instruction is obtained, the binding process is terminated; the fourth trigger instruction is used to instruct the termination of the binding process.
也就是说,ECG设备需要获得触发指令,来触发开始绑定过程的相关操作;另外,在执行绑定的过程中,若获得中止绑定的触发指令,则可立即中止绑定过程。触发的方式可以有多种,如:通过物理按键的触发、虚拟按键的触发、声控、触摸、手势的触发等等,本发明实施例不对触发方式进行限制。In other words, the ECG device needs to obtain a trigger instruction to trigger related operations to start the binding process; in addition, during the binding process, if a trigger instruction to terminate the binding is obtained, the binding process can be immediately terminated. There may be multiple triggering modes, such as: triggering through physical buttons, triggering virtual buttons, voice control, touch, and gesture triggering, etc. The embodiment of the present invention does not limit the triggering modes.
在一可实施方式中,ECG设备具有触发电极,当触发电极被触发时,ECG设备获得第三触发指令,当触发电极被停止触发时,ECG设备获得第四触发指令;In an implementation manner, the ECG device has a trigger electrode. When the trigger electrode is triggered, the ECG device obtains a third trigger instruction, and when the trigger electrode is stopped, the ECG device obtains a fourth trigger instruction;
或者,当触发电极被第一次触发时,ECG设备获得第三触发指令,当触发电极被第二次触发时,ECG设备获得第四触发指令。Or, when the trigger electrode is triggered for the first time, the ECG device obtains the third trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the fourth trigger instruction.
也就是说,通过触发电极完成的指令触发过程可以有多种控制逻辑,可以是用户持续长按触发电极,直到绑定过程结束,若在结束之前用户松开触发电极,则绑定过程立即中止;也可以是用户触按一下触发电极,开始绑定过程,当用户再触按一下触发电极时,中止绑定过程。在绑定过程中触发指令的触发方式可以与心电测量过程中触发指令的触发方式不同。That is to say, the command trigger process completed by the trigger electrode can have various control logics, which can be that the user keeps pressing the trigger electrode until the binding process ends. If the user releases the trigger electrode before the end, the binding process is immediately terminated ; It can also be that the user touches the trigger electrode once to start the binding process, and when the user touches the trigger electrode again, the binding process is terminated. The trigger mode of the trigger command during the binding process may be different from the trigger mode of the trigger command during the ECG measurement process.
参见图21所示,本发明实施例一提供一种在智能终端侧实施的绑定方法,该方法包括:Referring to FIG. 21, the first embodiment of the present invention provides a binding method implemented on the side of a smart terminal, and the method includes:
步骤4401,接收来自ECG设备的ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中包括ECG设备的地址信息。Step 4401: Receive an ECG status notification message from the ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device.
在获得来自ECG设备的ECG状态通知消息之前,方法还可包括:Before obtaining the ECG status notification message from the ECG device, the method may further include:
获得第五触发指令,第五触发指令用于指示开始绑定过程;Obtain the fifth trigger instruction, the fifth trigger instruction is used to instruct to start the binding process;
响应于第五触发指令,调用绑定界面,绑定界面用于实时更新绑定过程中的状态变化,包括在绑定完成后在绑定界面展示绑定成功的状态。In response to the fifth trigger instruction, the binding interface is invoked, and the binding interface is used for real-time update of the state change during the binding process, including displaying the successful binding state on the binding interface after the binding is completed.
也就是说,需要智能终端首先启动绑定程序,并调用相应的绑定界面,从而能够通过界面实时展示绑定过程中的各个状态。In other words, the smart terminal needs to first start the binding program and call the corresponding binding interface, so that each state in the binding process can be displayed in real time through the interface.
步骤4402,向ECG设备发送绑定请求消息,绑定请求消息中至少包括智能终端的标识信息和地址信息。Step 4402: Send a binding request message to the ECG device. The binding request message includes at least the identification information and address information of the smart terminal.
智能终端在收到来自ECG设备的EcgStatus消息后,向ECG设备发送BindRequest消息。其中,向ECG设备发送BindRequest消息的操作可以是由特定指令或操作来触发的。After receiving the EcgStatus message from the ECG device, the smart terminal sends a BindRequest message to the ECG device. Among them, the operation of sending the BindRequest message to the ECG device may be triggered by a specific instruction or operation.
步骤4403,接收ECG设备的绑定响应消息,在本地保存第二绑定信息,第二绑定信息中至少包括智能终端与ECG设备的地址信息之间的绑定关系;绑定响应消息中至少包括ECG设备的地址信息。Step 4403: Receive the binding response message of the ECG device, and save the second binding information locally. The second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; the binding response message includes at least Including the address information of the ECG device.
智能终端在收到来自ECG设备的BindResponse消息后,执行智能终端侧的绑定操作,并本地保存智能终端与ECG设备的地址信息之间的绑定关系,在绑定成功后,通过绑定界面显示绑定成功的状态,以提醒用户。After receiving the BindResponse message from the ECG device, the smart terminal performs the binding operation on the smart terminal side, and locally saves the binding relationship between the smart terminal and the address information of the ECG device. After the binding is successful, the binding interface is used The status of successful binding is displayed to remind the user.
在一可实施方式中,在向ECG设备发送BindRequest消息后,启动定时器,若定时器超时仍未收到ECG设备返回的BindResponse消息,则在确定BindRequest消息的发送次数未超出预设次数时,向ECG设备重发绑定请求消息;在确定绑定请求消息的发送次数超出预设次数时,停止向ECG设备发送绑定请求消息,并中止与对应ECG设备的绑定过程。预设次数可以设定为两次、三次等等,不做限制,根据实际需要进行设定。In an implementation manner, after sending the BindRequest message to the ECG device, the timer is started. If the BindResponse message returned by the ECG device is not received after the timer expires, when it is determined that the number of times the BindRequest message has been sent does not exceed the preset number of times, Resend the binding request message to the ECG device; when it is determined that the number of times of sending the binding request message exceeds the preset number of times, stop sending the binding request message to the ECG device, and terminate the binding process with the corresponding ECG device. The preset number of times can be set to two, three, etc., and there is no limit, and it can be set according to actual needs.
前面提到,本发明实施例的绑定方法是建立在ECG设备与智能终端建立通信连接的基础上完成,参见图22所示,本发明实施例中ECG设备与智能终端之间建立通信连接的过程,包括:As mentioned earlier, the binding method of the embodiment of the present invention is established on the basis of establishing a communication connection between the ECG device and the smart terminal. As shown in FIG. 22, the communication connection between the ECG device and the smart terminal is established in the embodiment of the present invention. The process includes:
步骤4501,获得控制指令,控制指令用于指示开始创建与智能终端的通信连接。Step 4501: Obtain a control instruction, where the control instruction is used to instruct to start establishing a communication connection with the smart terminal.
本实施例的方法应用于ECG设备,ECG设备获得控制指令的方式可以有多种,如用户通过物理按键或电极触发操作的方式触发ECG设备获得控制指令,或者,用户通过虚拟按键操作的方式触发ECG设备获得控制指令,甚至可以是通过语音手势等操作的方式触发ECG设备获得控制指令,对于控制指令的触发方式本发明实施例不做限制。ECG设备在获得控制指令后,开始执行与智能终端建立通信连接的过程,这种连接优选为无线连接方式,当然,若有线连接方式也适用于本发明实施例的情况下,本发明实施例的保护范围也覆盖有线连接方式的情形。The method of this embodiment is applied to an ECG device, and the ECG device can obtain control instructions in many ways. For example, the user triggers the ECG device to obtain the control instruction through a physical button or electrode trigger operation, or the user triggers the control instruction through a virtual button operation. The ECG device obtains the control instruction, and may even trigger the ECG device to obtain the control instruction through an operation such as voice gestures. The method of triggering the control instruction is not limited in the embodiment of the present invention. After the ECG device obtains the control instruction, it starts to execute the process of establishing a communication connection with the smart terminal. This connection is preferably a wireless connection. Of course, if the wired connection is also applicable to the embodiment of the present invention, the The scope of protection also covers the case of wired connections.
步骤4502,响应于控制指令,确定当前所示满足的预设条件。其中,预设条件至少包括:4502a所示的第一预设条件、4502b所示的第二预设条件、4502c所示的第三预设条件。Step 4502, in response to the control instruction, determine the preset condition that is currently shown to be satisfied. The preset conditions include at least: the first preset condition shown in 4502a, the second preset condition shown in 4502b, and the third preset condition shown in 4502c.
步骤4503,执行与所满足的预设条件相对应的连接策略,从而建立与智能终端间的通信连接。其中,连接策略至少包括:4503a与第一预设条件对应的第一连接策略、4503b与第二预设条件对应的第二连接策略、4503c与第三预设条件对应的第三连接策略。Step 4503: Execute a connection strategy corresponding to the preset conditions that are met, so as to establish a communication connection with the smart terminal. The connection strategy includes at least: 4503a a first connection strategy corresponding to the first preset condition, 4503b a second connection strategy corresponding to the second preset condition, and 4503c a third connection strategy corresponding to the third preset condition.
本发明实施例中,ECG设备与智能终端间的通信连接可以采用BLE连接方式,当然,本发明实施例并不仅限于BLE的连接方式,实际应用中其他可使用本发明实施例的连接建立机制的任意连接方式,应当也都属于本发明实施例的保护范围。In the embodiment of the present invention, the communication connection between the ECG device and the smart terminal may adopt the BLE connection mode. Of course, the embodiment of the present invention is not limited to the BLE connection mode. In practical applications, other connection establishment mechanisms of the embodiment of the present invention may be used. Any connection manner should also fall within the protection scope of the embodiments of the present invention.
在一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为智能终端的公共地址(public address);In an implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is the public address of the smart terminal;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路。在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;如果连接建立失败,则中止上述通信连接过程。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly. After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed; if the connection establishment fails, the communication connection process described above is aborted.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,且绑定的智能终端地址为public address,则直接尝试向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has been bound to the corresponding smart terminal, and the bound smart terminal address is public address, it will directly try to connect to the bound smart terminal. The terminal initiates a connection request.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是智能终端的公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not the public address of the smart terminal;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若未扫描到已绑定的智能终端,则中止通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其已绑定有对应的智能终端,但绑定的智能终端地址不是public address,则先发起对绑定智能终端的扫描,如能扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求。That is to say, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device judges that it has been bound to the corresponding smart terminal, but the bound smart terminal address is not a public address, it will initiate a connection to the bound smart terminal first. Scan, if the bound smart terminal can be scanned, a connection request is initiated to the bound smart terminal.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
也就是说,在ECG设备开始尝试与智能终端建立连接时,如果ECG设备判断其没有绑定的智能终端,则需要发起对智能终端的扫描过程,向扫描到的智能终端发起连接请求。That is, when the ECG device starts to try to establish a connection with the smart terminal, if the ECG device determines that it has no smart terminal bound, it needs to initiate a scanning process for the smart terminal and initiate a connection request to the scanned smart terminal.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身具备或可实现强制重置的功能,或者ECG设备的扫描和连接用时较长,则可优选此实施方式的方案。因为,以上实施方式的方案机制设计简洁,不占用过多处理器资源,效率高、时间短,在ECG设备自身的扫描和连接用时较长情况下,能保证整个连接建立过程的时效性,提升用户体验。再有,在ECG设备自身可实现强制重置功能的情况下,连接过程的设计无需过多操作流程,一些异常情况可以通过ECG设备强制重置的方式来解决。In addition, if the ECG device itself has or can implement a forced reset function, or the scanning and connection of the ECG device takes a long time, the solution of this embodiment may be preferred. Because the scheme mechanism of the above embodiment is simple in design, does not occupy too much processor resources, is efficient, and takes a short time. When the scanning and connection time of the ECG device itself takes a long time, it can ensure the timeliness of the entire connection establishment process and improve user experience. Furthermore, in the case that the ECG device itself can implement the forced reset function, the design of the connection process does not require too many operating procedures, and some abnormal situations can be solved by the forced reset of the ECG device.
在另一种可实施方式中,第一预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址为公共地址;In another implementable manner, the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address;
当判断当前满足第一预设条件时,按第一连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the first preset condition is currently met, the communication connection process with the smart terminal is executed according to the first connection strategy, including:
向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;Initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly; after the connection is established, the ECG device and the Data exchange protocol between bound smart terminals;
若与已绑定的智能终端件的连接建立失败,则发起对已绑定智能终端的扫描;If the connection with the bound smart terminal fails to be established, initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第二预设条件为:ECG设备已绑定有对应的智能终端,且绑定的智能终端的地址不是公共地址;The second preset condition is: the ECG device has been bound to the corresponding smart terminal, and the address of the bound smart terminal is not a public address;
当判断当前满足第二预设条件时,按第二连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the second preset condition is currently met, the communication connection process with the smart terminal is executed according to the second connection strategy, including:
发起对已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
若成功扫描到已绑定的智能终端,则向已绑定的智能终端发起连接请求,接收已绑定的智能终端 返回的连接响应,并依此创建与已绑定的智能终端间的连接通路;在连接建立后,即可执行ECG设备与已绑定的智能终端间的数据交互协议;If the bound smart terminal is successfully scanned, initiate a connection request to the bound smart terminal, receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly ; After the connection is established, the data exchange protocol between the ECG device and the bound smart terminal can be executed;
若到扫描超时,未扫描到已绑定的智能终端,而仅扫描到未绑定的智能终端,则向未绑定的智能终端发起连接请求,接收未绑定的智能终端返回的连接响应,并依此创建与未绑定的智能终端间的连接通路;If the scan timeout expires and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the connection response returned by the unbound smart terminal is received. And based on this, create a connection path with the unbound smart terminal;
若扫描超时仍未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned even after the scan timeout, the communication connection process is terminated.
第三预设条件为:ECG设备没有绑定的智能终端;The third preset condition is: there is no smart terminal bound to the ECG device;
当判断当前满足第三预设条件时,按第三连接策略执行与智能终端间的通信连接过程,包括:When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy, including:
发起对智能终端的扫描;Initiate a scan of the smart terminal;
向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
接收扫描到的智能终端返回的连接响应,并依此创建与扫描到的智能终端间的连接通路;在连接建立后,即可执行ECG设备与相应智能终端间的数据交互协议;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly; after the connection is established, the data exchange protocol between the ECG device and the corresponding smart terminal can be executed;
若未扫描到智能终端,则中止通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
需要说明的是,若扫描到的智能终端有多个,则ECG设备可以依次向扫描到的各个智能终端发起连接请求,当有智能终端成功建立连接,并完成该智能终端与ECG设备的绑定过程,则ECG设备不再向后续智能终端发起连接请求。It should be noted that if there are multiple smart terminals scanned, the ECG device can initiate a connection request to each of the scanned smart terminals in turn. When a smart terminal successfully establishes a connection, the binding between the smart terminal and the ECG device is completed Process, the ECG device no longer initiates a connection request to the subsequent smart terminal.
另外,如果ECG设备自身不具备或无法实现强制重置的功能,且ECG设备的扫描和连接用时较短,则可优选此实施方式的方案。因为,上述实施方式虽然相比前一实施方式的操作流程复杂一些,但在不具备强制重置的ECG设备上实施本方案,能够覆盖多种异常情形的解决方案,并且能够保证整个连接建立过程的高效性和用时短。In addition, if the ECG device itself does not have or cannot realize the function of forced reset, and the scanning and connection time of the ECG device is relatively short, the solution of this embodiment may be preferred. Because, although the operation process of the above embodiment is more complicated than that of the previous embodiment, implementing this solution on an ECG device that does not have a forced reset can cover a variety of solutions to abnormal situations and ensure the entire connection establishment process. High efficiency and short time.
参见图23,本发明实施例还提供了一种应用于ECG设备端的心电测量装置,包括:Referring to FIG. 23, an embodiment of the present invention also provides an electrocardiogram measurement device applied to an ECG device end, including:
第一发送单元4601,在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息;The first sending unit 4601, after the ECG device establishes a communication connection with the smart terminal, sends an ECG status notification message to the smart terminal. The ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
第一接收单元4602,用于接收智能终端在收到ECG状态通知消息后发送的测量请求消息,The first receiving unit 4602 is configured to receive a measurement request message sent by the smart terminal after receiving the ECG status notification message,
第一处理单元4603,用于在获得测量请求消息后开始ECG测量;The first processing unit 4603 is configured to start ECG measurement after obtaining the measurement request message;
第二发送单元4604,用于向智能终端发送测量开始消息,在ECG测量过程中,将测量数据报文实时发送给智能终端;The second sending unit 4604 is configured to send a measurement start message to the smart terminal, and during the ECG measurement process, send the measurement data message to the smart terminal in real time;
第三发送单元4605,用于在测量结束时,向智能终端发送测量结束消息。The third sending unit 4605 is configured to send a measurement end message to the smart terminal when the measurement ends.
在一可实施方式中,测量请求消息中包括智能终端的标识信息、和测量模式信息;其中,测量模式信息用于标识或描述测量的模式内容;In an implementation manner, the measurement request message includes identification information of the smart terminal and measurement mode information; wherein, the measurement mode information is used to identify or describe the measurement mode content;
相应的,第一处理单元4603进一步用于,根据测量请求消息中携带的测量模式信息,执行对应的测量项目,并获得相应测量项目的测量数据报文。Correspondingly, the first processing unit 4603 is further configured to execute a corresponding measurement item according to the measurement mode information carried in the measurement request message, and obtain a measurement data message of the corresponding measurement item.
测量数据报文中包括测量进程、及与所述测量进程对应的测量数据。The measurement data message includes a measurement process and measurement data corresponding to the measurement process.
在一可实施方式中,第一处理单元4603用于在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,通知第一发送单元4601向所述智能终端发送ECG状态通知消息;所述第一触发指令用于指示开始测量过程;In an implementation manner, the first processing unit 4603 is configured to notify the first sending unit 4601 to send to the smart terminal when the ECG device obtains the first trigger instruction after the ECG device establishes a communication connection with the smart terminal ECG status notification message; the first trigger instruction is used to instruct to start the measurement process;
相应的,在第一处理单元4603执行测量过程中,若获得第二触发指令,则中止测量过程;第二触发指令用于指示中止测量过程。Correspondingly, during the measurement process performed by the first processing unit 4603, if the second trigger instruction is obtained, the measurement process is suspended; the second trigger instruction is used to instruct the suspension of the measurement process.
ECG设备具有触发电极,可以是在触发电极被触发时,第一处理单元4603获得所述第一触发指令,在触发电极被停止触发时,第一处理单元4603获得第二触发指令;The ECG device has a trigger electrode. When the trigger electrode is triggered, the first processing unit 4603 obtains the first trigger instruction, and when the trigger electrode stops triggering, the first processing unit 4603 obtains the second trigger instruction;
或者,在触发电极被第一次触发时,第一处理单元4603获得第一触发指令,在触发电极被第二次触发时,第一处理单元4603获得第二触发指令。Or, when the trigger electrode is triggered for the first time, the first processing unit 4603 obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the first processing unit 4603 obtains the second trigger instruction.
参见图24,本发明实施例还提供了一种应用于智能终端侧的绑定装置,包括:Referring to FIG. 24, an embodiment of the present invention also provides a binding device applied to the smart terminal side, including:
第二接收单元4701,用于接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;The second receiving unit 4701 is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
第四发送单元4702,用于向所述ECG设备发送测量请求消息;The fourth sending unit 4702 is configured to send a measurement request message to the ECG device;
第三接收单元4703,用于接收所述ECG设备发送的测量开始消息及测量数据报文;The third receiving unit 4703 is configured to receive a measurement start message and a measurement data message sent by the ECG device;
第二处理单元4704,用于通过交互界面展示相应测量数据;The second processing unit 4704 is configured to display corresponding measurement data through an interactive interface;
第四接收单元4705,用于接收所述智能终端的测量结束消息;The fourth receiving unit 4705 is configured to receive the measurement end message of the smart terminal;
所述第二处理单元4704还用于,在获得所述测量结束消息时,根据获得的所述测量数据生成测量结果,并通过所述交互界面展示所述测量结果。The second processing unit 4704 is further configured to, when obtaining the measurement end message, generate a measurement result according to the obtained measurement data, and display the measurement result through the interactive interface.
第四发送单元4702进一步用于,在向ECG设备发送测量请求消息后,启动定时器,若定时器超时仍未收到ECG设备返回的测量开始消息,则在确定测量请求消息的发送次数未达到预设次数时,向ECG设备重发测量请求消息;在确定测量请求消息的发送次数达到预设次数时,停止向ECG设备发送测量请求消息,并中止测量过程。The fourth sending unit 4702 is further configured to start a timer after sending the measurement request message to the ECG device. If the timer expires and the measurement start message returned by the ECG device is not received, it is determined that the number of times the measurement request message has been sent has not reached When the preset number of times, the measurement request message is retransmitted to the ECG device; when it is determined that the number of sending the measurement request message reaches the preset number of times, stop sending the measurement request message to the ECG device, and stop the measurement process.
下面,参考图25来描述根据本申请实施例的电子设备411。Hereinafter, an electronic device 411 according to an embodiment of the present application will be described with reference to FIG. 25.
如图25所示,电子设备411包括一个或多个处理器4111和存储器4112。As shown in FIG. 25, the electronic device 411 includes one or more processors 4111 and a memory 4112.
处理器4111可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其他形式的处理单元,并且可以控制电子设备411中的其他组件以执行期望的功能。The processor 4111 may be a central processing unit (CPU) or other form of processing unit with data processing capability and/or instruction execution capability, and may control other components in the electronic device 411 to perform desired functions.
存储器4112可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器4111可以运行所述程序指令,以实现上文所述的本申请的各个实施例的方法以及/或者其他期望的功能。在所述计算机可读存储介质中还可以存储诸如输入信号、信号分量、噪声分量等各种内容。The memory 4112 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include random access memory (RAM) and/or cache memory (cache), for example. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 4111 may run the program instructions to implement the methods of the various embodiments of the present application described above and/or other desired Function. Various contents such as input signals, signal components, noise components, etc. can also be stored in the computer-readable storage medium.
在一个示例中,电子设备411还可以包括:输入装置4113和输出装置4114,这些组件通过总线系统和/或其他形式的连接机构(未示出)互连。In an example, the electronic device 411 may further include: an input device 4113 and an output device 4114, and these components are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
该输入设备4113可以包括例如键盘、鼠标等等。The input device 4113 may include, for example, a keyboard, a mouse, and so on.
该输出装置4114可以向外部输出各种信息,包括确定出的距离信息、方向信息等。该输出设备4114可以包括例如显示器、扬声器、打印机、以及通信网络及其所连接的远程输出设备等等。The output device 4114 can output various information to the outside, including determined distance information, direction information, and so on. The output device 4114 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected to it, and so on.
当然,为了简化,图25中仅示出了该电子设备411中与本申请有关的组件中的一些,省略了诸如总线、输入/输出接口等等的组件。除此之外,根据具体应用情况,电子设备411还可以包括任何其他适当的组件。Of course, for simplicity, only some of the components related to the present application in the electronic device 411 are shown in FIG. 25, and components such as buses, input/output interfaces, etc. are omitted. In addition, according to specific application conditions, the electronic device 411 may also include any other appropriate components.
本发明实施例中一种ECG设备的形式,可以是设置在智能手表的腕带上,ECG设备具有至少两个电极,第一电极设置在腕带的第一表面上,第一表面为腕带佩戴时用于与用户皮肤接触的那一面;第二电极设置在腕带的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手表时,腕带上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的连接建立方法、绑定方法、心电测量方法则用于提供智能手表与腕带上ECG设备之间心电测量交互的实现方案。触发ECG设备获得指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。An ECG device in the embodiment of the present invention may be set on the wristband of a smart watch. The ECG device has at least two electrodes. The first electrode is set on the first surface of the wristband, and the first surface is the wristband. The side that is used to contact the user's skin when worn; the second electrode is arranged on the second surface of the wristband, and the second surface is the back of the first surface. When the user wears the smart watch, the first electrode of the ECG device on the wristband is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can perform the ECG measurement operation of the wearer. Then, the connection establishment method, the binding method, and the electrocardiogram measurement method in the embodiments of the present invention are used to provide an implementation solution for the electrocardiogram measurement interaction between the smart watch and the ECG device on the wristband. The way to trigger the ECG device to obtain instructions can be long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other trigger methods, and it can also be other electrodes, such as the third electrode of the ECG device. And so on, the embodiment of the present invention does not limit it.
本发明实施例中一种ECG设备的另一形式,可以是设置成智能手环,ECG设备具有至少两个电极,第一电极设置在智能手环的第一表面上,第一表面为智能手环佩戴时用于与用户皮肤接触的那一面;第二电极设置在智能手环的第二表面上,第二表面为第一表面的背面。当用户佩戴智能手环时,智能手环上ECG设备的第一电极与用户皮肤接触,而当用户用另外一只手接触ECG设备的第二电极时,可实现ECG设备对佩戴者的心电图测量操作。那么,本发明实施例的连接建立方法、绑定方法、心电测 量方法则可用于提供智能手机、智能平板等智能终端与智能手环上ECG设备之间心电图测量交互的实现方案。同样的,触发ECG设备获得指令的方式,可以是用户长按、或短按、或多次按压上述第二电极,当然也可以是其他的触发方式,更可以是其他的电极,如ECG设备的第三电极等等,本发明实施例不做限制。Another form of an ECG device in the embodiment of the present invention can be configured as a smart bracelet. The ECG device has at least two electrodes. The first electrode is provided on the first surface of the smart bracelet, and the first surface is the smart hand. The side of the ring used for contact with the user's skin when worn; the second electrode is arranged on the second surface of the smart bracelet, and the second surface is the back of the first surface. When the user wears the smart bracelet, the first electrode of the ECG device on the smart bracelet is in contact with the user's skin, and when the user touches the second electrode of the ECG device with the other hand, the ECG device can realize the ECG measurement of the wearer operate. Then, the connection establishment method, binding method, and electrocardiogram measurement method of the embodiments of the present invention can be used to provide an implementation solution for electrocardiogram measurement interaction between smart terminals such as smart phones and smart tablets and ECG devices on smart bracelets. Similarly, the way to trigger the ECG device to obtain instructions can be a long press, short press, or multiple pressing of the second electrode mentioned above. Of course, it can also be other triggering methods, and it can also be other electrodes, such as those of an ECG device. The third electrode and so on are not limited in the embodiment of the present invention.
除了上述方法和设备以外,本申请的实施例还可以是计算机程序产品,其包括计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述“示例性方法”部分中描述的根据本申请各种实施例的方法中的步骤。In addition to the above-mentioned methods and devices, the embodiments of the present application may also be computer program products, which include computer program instructions that, when run by a processor, cause the processor to execute the “exemplary method” described above in this specification. The steps in the method according to various embodiments of the present application are described in the section.
所述计算机程序产品可以以一种或多种程序设计语言的任意组合来编写用于执行本申请实施例操作的程序代码,所述程序设计语言包括面向对象的程序设计语言,诸如Java、C++等,还包括常规的过程式程序设计语言,诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。The computer program product may use any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application. The programming languages include object-oriented programming languages, such as Java, C++, etc. , Also includes conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partly on the user's device, executed as an independent software package, partly on the user's computing device and partly executed on the remote computing device, or entirely on the remote computing device or server Executed on.
此外,本申请的实施例还可以是计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令在被处理器运行时使得所述处理器执行本说明书上述“示例性方法”部分中描述的根据本申请各种实施例的方法中的步骤。In addition, the embodiment of the present application may also be a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the "exemplary method" part of this specification. The steps in the method according to various embodiments of the application are described in.
所述计算机可读存储介质可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The computer-readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples (non-exhaustive list) of readable storage media include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Type programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
以上结合具体实施例描述了本申请的基本原理,但是,需要指出的是,在本申请中提及的优点、优势、效果等仅是示例而非限制,不能认为这些优点、优势、效果等是本申请的各个实施例必须具备的。另外,上述公开的具体细节仅是为了示例的作用和便于理解的作用,而非限制,上述细节并不限制本申请为必须采用上述具体的细节来实现。The above describes the basic principles of this application in conjunction with specific embodiments. However, it should be pointed out that the advantages, advantages, effects, etc. mentioned in this application are only examples and not limitations. These advantages, advantages, effects, etc. cannot be considered as Required for each embodiment of this application. In addition, the specific details disclosed above are only for illustrative purposes and easy-to-understand functions, rather than limitations, and the above details do not limit the application to the implementation of the above specific details.
本申请中涉及的器件、装置、设备、系统的方框图仅作为例示性的例子并且不意图要求或暗示必须按照方框图示出的方式进行连接、布置、配置。如本领域技术人员将认识到的,可以按任意方式连接、布置、配置这些器件、装置、设备、系统。诸如“包括”、“包含”、“具有”等等的词语是开放性词汇,指“包括但不限于”,且可与其互换使用。这里所使用的词汇“或”和“和”指词汇“和/或”,且可与其互换使用,除非上下文明确指示不是如此。这里所使用的词汇“诸如”指词组“如但不限于”,且可与其互换使用。The block diagrams of the devices, devices, equipment, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, devices, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "include", "include", "have", etc. are open vocabulary and mean "including but not limited to" and can be used interchangeably. The terms "or" and "and" as used herein refer to the terms "and/or" and can be used interchangeably, unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to" and can be used interchangeably with it.
还需要指出的是,在本申请的装置、设备和方法中,各部件或各步骤是可以分解和/或重新组合的。这些分解和/或重新组合应视为本申请的等效方案。It should also be pointed out that in the device, equipment and method of the present application, each component or each step can be decomposed and/or recombined. These decompositions and/or recombinations shall be regarded as equivalent solutions of this application.
提供所公开的方面的以上描述以使本领域的任何技术人员能够做出或者使用本申请。对这些方面的各种修改对于本领域技术人员而言是非常显而易见的,并且在此定义的一般原理可以应用于其他方面而不脱离本申请的范围。因此,本申请不意图被限制到在此示出的方面,而是按照与在此公开的原理和新颖的特征一致的最宽范围。The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown here, but in accordance with the widest scope consistent with the principles and novel features disclosed herein.
为了例示和描述的目的已经给出了以上描述。此外,此描述不意图将本申请的实施例限制到在此公开的形式。尽管以上已经讨论了多个示例方面和实施例,但是本领域技术人员将认识到其某些变型、修改、改变、添加和子组合。The above description has been given for the purposes of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions, and subcombinations thereof.

Claims (43)

  1. 一种信息处理方法,应用于心电图ECG设备,所述方法包括:An information processing method applied to an electrocardiogram ECG device, the method includes:
    获得控制指令,所述控制指令用于指示开始创建与智能终端的通信连接;Obtaining a control instruction, the control instruction being used to instruct to start creating a communication connection with the smart terminal;
    响应于所述控制指令,在确定当前满足第一预设条件时,按第一连接策略执行与所述智能终端间的通信连接过程;In response to the control instruction, when it is determined that the first preset condition is currently met, execute the communication connection process with the smart terminal according to the first connection strategy;
    在确定当前满足第二预设条件时,按第二连接策略执行与所述智能终端间的通信连接过程;When it is determined that the second preset condition is currently met, execute the communication connection process with the smart terminal according to the second connection strategy;
    在确定当前满足第三预设条件时,按第三连接策略执行与所述智能终端间的通信连接过程。When it is determined that the third preset condition is currently met, the communication connection process with the smart terminal is executed according to the third connection strategy.
  2. 根据权利要求1所述的信息处理方法,其特征在于,所述第一预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址为公共地址;The information processing method according to claim 1, wherein the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address ;
    相应的,所述按第一连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the first connection strategy includes:
    向所述已绑定的智能终端发起连接请求;Initiate a connection request to the bound smart terminal;
    接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路。Receive the connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly.
  3. 根据权利要求1所述的信息处理方法,其特征在于,所述第二预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址不是所述公共地址;The information processing method according to claim 1, wherein the second preset condition is that the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the Public address
    相应的,所述按第二连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the second connection strategy includes:
    发起对所述已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
    若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
    若未扫描到已绑定的所述智能终端,则中止所述通信连接过程。If the bound smart terminal is not scanned, the communication connection process is terminated.
  4. 根据权利要求1所述的信息处理方法,其特征在于,所述第一预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址为公共地址;The information processing method according to claim 1, wherein the first preset condition is: the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is a public address ;
    相应的,所述按第一连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the first connection strategy includes:
    向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;Initiate a connection request to the bound smart terminal, receive a connection response returned by the bound smart terminal, and create a connection path with the bound smart terminal accordingly;
    若与所述已绑定的智能终端件的连接建立失败,则发起对所述已绑定智能终端的扫描;If the establishment of the connection with the bound smart terminal fails, initiate a scan of the bound smart terminal;
    若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
    若到扫描超时,未扫描到所述已绑定的智能终端,而仅扫描到未绑定的智能终端,则向所述未绑定的智能终端发起连接请求,接收所述未绑定的智能终端返回的连接响应,并依此创建与所述未绑定的智能终端间的连接通路;If the scan timeout is reached and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the unbound smart terminal is received. The connection response returned by the terminal, and a connection path with the unbound smart terminal is created accordingly;
    若扫描超时仍未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned after the scan timeout, the communication connection process is terminated.
  5. 根据权利要求1所述的信息处理方法,其特征在于,所述第二预设条件为:所述ECG设备已绑定有对应的智能终端,且绑定的所述智能终端的地址不是所述公共地址;The information processing method according to claim 1, wherein the second preset condition is that the ECG device has been bound to a corresponding smart terminal, and the address of the bound smart terminal is not the Public address
    相应的,所述按第二连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the second connection strategy includes:
    发起对所述已绑定智能终端的扫描;Initiate a scan of the bound smart terminal;
    若成功扫描到所述已绑定的智能终端,则向所述已绑定的智能终端发起连接请求,接收所述已绑定的智能终端返回的连接响应,并依此创建与所述已绑定的智能终端间的连接通路;If the bound smart terminal is successfully scanned, it initiates a connection request to the bound smart terminal, receives the connection response returned by the bound smart terminal, and creates a connection with the bound smart terminal accordingly. The connection path between the designated intelligent terminals;
    若到扫描超时,未扫描到所述已绑定的智能终端,而仅扫描到未绑定的智能终端,则向所述未绑定的智能终端发起连接请求,接收所述未绑定的智能终端返回的连接响应,并依此创建与所述未绑定的智能终端间的连接通路;If the scan timeout is reached and the bound smart terminal is not scanned, but only the unbound smart terminal is scanned, a connection request is initiated to the unbound smart terminal, and the unbound smart terminal is received. The connection response returned by the terminal, and a connection path with the unbound smart terminal is created accordingly;
    若扫描超时仍未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned after the scan timeout, the communication connection process is terminated.
  6. 根据权利要求1至5任一项所述的信息处理方法,其特征在于,所述第三预设条件为:所述ECG设备没有绑定的智能终端;The information processing method according to any one of claims 1 to 5, wherein the third preset condition is: there is no smart terminal bound to the ECG device;
    相应的,所述按第三连接策略执行与所述智能终端间的通信连接过程,包括:Correspondingly, the execution of the communication connection process with the smart terminal according to the third connection strategy includes:
    发起对智能终端的扫描;Initiate a scan of the smart terminal;
    向扫描到的智能终端发起连接请求;Initiate a connection request to the scanned smart terminal;
    接收所述扫描到的智能终端返回的连接响应,并依此创建与所述扫描到的智能终端间的连接通路;Receive the connection response returned by the scanned smart terminal, and create a connection path with the scanned smart terminal accordingly;
    若未扫描到智能终端,则中止所述通信连接过程。If the smart terminal is not scanned, the communication connection process is terminated.
  7. 一种信息处理装置,其特征在于,应用于心电图ECG设备,所述装置包括:An information processing device, characterized in that it is applied to an electrocardiogram (ECG) equipment, and the device includes:
    获得单元,用于获得控制指令,所述控制指令用于指示开始创建与智能终端的通信连接;An obtaining unit, configured to obtain a control instruction, the control instruction being used to instruct to start creating a communication connection with the smart terminal;
    执行单元,响应于所述控制指令,在确定当前满足第一预设条件时,按第一连接策略执行与所述智能终端间的通信连接过程;在确定当前满足第二预设条件时,按第二连接策略执行与所述智能终端间的通信连接过程;在确定当前满足第三预设条件时,按第三连接策略执行与所述智能终端间的通信连接过程。The execution unit, in response to the control instruction, when it is determined that the first preset condition is currently met, executes the communication connection process with the smart terminal according to the first connection strategy; when it is determined that the second preset condition is currently met, press The second connection strategy executes the communication connection process with the smart terminal; when it is determined that the third preset condition is currently met, the third connection strategy executes the communication connection process with the smart terminal.
  8. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述权利要求1-6任一项所述的信息处理方法。A computer-readable storage medium storing a computer program, and the computer program is used to execute the information processing method of any one of claims 1-6.
  9. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
    所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述权利要求1-6任一项所述的信息处理方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the information processing method according to any one of claims 1-6.
  10. 根据权利要求9所述的电子设备,其特征在于,所述智能终端为智能穿戴终端,所述ECG设备设置于所述智能穿戴终端的穿戴配件上,所述穿戴配件用于将所述智能穿戴设备穿戴于用户。The electronic device according to claim 9, wherein the smart terminal is a smart wearable terminal, the ECG device is set on a wearable accessory of the smart wearable terminal, and the wearable accessory is used to make the smart wearable The device is worn by the user.
  11. 一种重置方法,应用于心电图ECG设备,其特征在于,所述方法包括:A reset method applied to an electrocardiogram ECG device, characterized in that the method includes:
    在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息;After the ECG device establishes a communication connection with the smart terminal, send an ECG status notification message to the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device;
    接收智能终端在收到ECG状态通知消息后发送的重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;Receiving a reset request message sent by a smart terminal after receiving an ECG status notification message, where the reset request message includes at least the identification information of the smart terminal;
    执行所述ECG设备侧的重置操作,并在所述重置操作完成后向所述智能终端返回重置响应消息。Perform a reset operation on the ECG device side, and return a reset response message to the smart terminal after the reset operation is completed.
  12. 根据权利要求11所述重置方法,其特征在于,所述执行ECG设备侧的重置操作,包括:The reset method according to claim 11, wherein the performing the reset operation on the ECG device side comprises:
    根据所述重置请求消息中携带的所述智能终端的标识信息,查找对应所述智能终端的绑定信息,在查找到对应所述智能终端的绑定信息时,将所述绑定信息删除,并清除所述ECG设备与相应智能终端间的绑定关系。According to the identification information of the smart terminal carried in the reset request message, the binding information corresponding to the smart terminal is searched, and when binding information corresponding to the smart terminal is found, the binding information is deleted , And clear the binding relationship between the ECG device and the corresponding smart terminal.
  13. 根据权利要求11所述重置方法,其特征在于,所述重置响应消息中包括所述ECG设备的地址信息和错误码,所述错误码用于标识所述ECG设备侧的重置是否成功。The reset method according to claim 11, wherein the reset response message includes address information and an error code of the ECG device, and the error code is used to identify whether the reset on the ECG device side is successful .
  14. 根据权利要求11、12或13所述重置方法,其特征在于,所述方法还包括:The reset method according to claim 11, 12 or 13, wherein the method further comprises:
    在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,向所述智能终端发送ECG状态通知消息;所述第一触发指令用于指示开始重置过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the reset process;
    相应的,在所述ECG设备执行重置过程中,若获得第二触发指令,则中止所述重置过程;所述第二触发指令用于指示中止重置过程。Correspondingly, during the reset process of the ECG device, if a second trigger instruction is obtained, the reset process is aborted; the second trigger instruction is used to instruct the reset process to be aborted.
  15. 根据权利要求14所述重置方法,其特征在于,所述ECG设备具有触发电极,所述方法还包括:The reset method according to claim 14, wherein the ECG device has a trigger electrode, and the method further comprises:
    当所述触发电极被触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被停止触发时,所述ECG设备获得所述第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
    或者,当所述触发电极被第一次触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被第二次触发时,所述ECG设备获得所述第二触发指令。Alternatively, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  16. 一种重置方法,应用于智能终端,其特征在于,所述方法包括:A reset method applied to an intelligent terminal, characterized in that the method includes:
    接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;Receiving an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
    向所述ECG设备发送重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;Sending a reset request message to the ECG device, where the reset request message includes at least the identification information of the smart terminal;
    接收所述ECG设备返回的重置响应消息,在所述重置响应消息表明所述ECG设备侧的重置成功时,执行所述智能终端侧的重置操作。A reset response message returned by the ECG device is received, and when the reset response message indicates that the reset on the ECG device side is successful, a reset operation on the smart terminal side is performed.
  17. 根据权利要求16所述重置方法,其特征在于,所述执行智能终端侧的重置操作,包括:The reset method according to claim 16, wherein said performing a reset operation on the side of the smart terminal comprises:
    根据所述重置响应消息中携带的所述ECG设备的地址信息,查找对应所述ECG设备的绑定信息,在查找到对应所述ECG设备的绑定信息时,将所述绑定信息删除,并清除所述智能终端与相应ECG设备间的绑定关系。Find the binding information corresponding to the ECG device according to the address information of the ECG device carried in the reset response message, and delete the binding information when the binding information corresponding to the ECG device is found , And clear the binding relationship between the smart terminal and the corresponding ECG device.
  18. 根据权利要求16或17所述重置方法,其特征在于,所述方法还包括:The reset method according to claim 16 or 17, wherein the method further comprises:
    在向所述ECG设备发送重置请求消息后,启动定时器,若定时器超时仍未收到所述ECG设备返回的重置响应消息,则在确定所述重置请求消息的发送次数未达到预设次数时,向所述ECG设备重发所述重置请求消息;在确定所述重置请求消息的发送次数达到所述预设次数时,停止向所述ECG设备发送所述重置请求消息,并中止重置过程。After sending a reset request message to the ECG device, a timer is started. If the reset response message returned by the ECG device is not received after the timer expires, it is determined that the number of times the reset request message has been sent has not reached Retransmit the reset request message to the ECG device at a preset number of times; stop sending the reset request to the ECG device when it is determined that the number of times the reset request message has been sent reaches the preset number of times Message and abort the reset process.
  19. 一种重置装置,应用于心电图ECG设备,其特征在于,所述装置包括:A resetting device applied to an ECG equipment, characterized in that the device includes:
    第一发送单元,用于在ECG设备与智能终端建立通信连接后,向智能终端发送ECG状态通知消息,ECG状态通知消息中包括ECG设备的状态数据,状态数据中至少包括ECG设备的标识信息;The first sending unit is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status data includes at least the identification information of the ECG device;
    第一接收单元,用于接收智能终端在收到ECG状态通知消息后发送的重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;The first receiving unit is configured to receive a reset request message sent by a smart terminal after receiving an ECG status notification message, where the reset request message at least includes identification information of the smart terminal;
    第一处理单元,用于执行所述ECG设备侧的重置操作;The first processing unit is configured to perform a reset operation on the ECG device side;
    第二发送单元,用于在所述重置操作完成后向所述智能终端返回重置响应消息。The second sending unit is configured to return a reset response message to the smart terminal after the reset operation is completed.
  20. 一种重置装置,应用于智能终端,其特征在于,所述装置包括:A reset device applied to an intelligent terminal, characterized in that the device includes:
    第二接收单元,用于接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;The second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
    第三发送单元,用于向所述ECG设备发送重置请求消息,所述重置请求消息中至少包括所述智能终端的标识信息;The third sending unit is configured to send a reset request message to the ECG device, where the reset request message includes at least the identification information of the smart terminal;
    第三接收单元,用于接收所述ECG设备返回的重置响应消息;The third receiving unit is configured to receive the reset response message returned by the ECG device;
    第二处理单元,用于在所述重置响应消息表明所述ECG设备侧的重置成功时,执行所述智能终端侧的重置操作。The second processing unit is configured to perform a reset operation on the smart terminal side when the reset response message indicates that the reset on the ECG device side is successful.
  21. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述权利要求11-15任一项所述的重置方法,或用于执行上述权利要求16-18任一项所述的重置方法。A computer-readable storage medium, the storage medium storing a computer program, the computer program is used to perform the reset method of any one of the above claims 11-15, or used to perform the above claims 16-18 Any one of the reset methods.
  22. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
    所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述权利要求11-15任一项所述的重置方法,或实现上述权利要求16-18任一项所述的重置方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the reset method according to any one of the above claims 11-15, or to implement the above claim 16- 18. The resetting method described in any one of items.
  23. 一种绑定方法,应用于心电图ECG设备,所述方法包括:A binding method, applied to an ECG device, the method includes:
    在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal, the ECG status notification message includes status data of the ECG device, and the status data includes the address of the ECG device information;
    接收所述智能终端在收到所述ECG状态通知消息后发送的绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;Receiving a binding request message sent by the smart terminal after receiving the ECG status notification message, where the binding request message includes at least the identification information and address information of the smart terminal;
    向所述智能终端返回绑定响应消息,并在本地保存第一绑定信息,所述第一绑定信息中至少包括所述ECG设备与相应智能终端的标识信息之间的绑定关系;所述绑定响应消息中至少包括所述ECG设备的地址信息。Return a binding response message to the smart terminal, and store first binding information locally, where the first binding information includes at least the binding relationship between the ECG device and the identification information of the corresponding smart terminal; The binding response message includes at least the address information of the ECG device.
  24. 根据权利要求23所述的绑定方法,其特征在于,所述方法还包括:The binding method according to claim 23, wherein the method further comprises:
    在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,向所述智能终端发送ECG状态通知消息;所述第一触发指令用于指示开始绑定过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains the first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start the binding process;
    相应的,在所述ECG设备获得所述第一触发指令后,执行绑定过程中,若获得第二触发指令,则中止所述绑定过程;所述第二触发指令用于指示中止绑定过程。Correspondingly, after the ECG device obtains the first trigger instruction, during the binding process, if the second trigger instruction is obtained, the binding process is suspended; the second trigger instruction is used to instruct to terminate the binding process.
  25. 根据权利要求24所述的绑定方法,其特征在于,所述ECG设备具有触发电极,所述方法还包括:The binding method according to claim 24, wherein the ECG device has a trigger electrode, and the method further comprises:
    当所述触发电极被触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被停止触发时,所述ECG设备获得所述第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
    或者,当所述触发电极被第一次触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被第二次触发时,所述ECG设备获得所述第二触发指令。Alternatively, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  26. 一种绑定方法,应用于智能终端,所述方法包括:A binding method applied to a smart terminal, the method includes:
    接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;Receiving an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
    向所述ECG设备发送绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;Sending a binding request message to the ECG device, where the binding request message includes at least the identification information and address information of the smart terminal;
    接收所述ECG设备的绑定响应消息,在本地保存第二绑定信息,所述第二绑定信息中至少包括所述智能终端与所述ECG设备的地址信息之间的绑定关系;所述绑定响应消息中至少包括所述ECG设备的地址信息。Receiving the binding response message of the ECG device, and storing second binding information locally, where the second binding information includes at least the binding relationship between the smart terminal and the address information of the ECG device; The binding response message includes at least the address information of the ECG device.
  27. 根据权利要求26所述的绑定方法,其特征在于,在获得来自ECG设备的ECG状态通知消息之前,所述方法还包括:The binding method according to claim 26, wherein before obtaining the ECG status notification message from the ECG device, the method further comprises:
    获得第三触发指令,所述第三触发指令用于指示开始绑定过程;Obtaining a third trigger instruction, where the third trigger instruction is used to instruct to start the binding process;
    响应于所述第三触发指令,调用绑定界面,所述绑定界面用于实时更新绑定过程中的状态变化,包括在绑定完成后在所述绑定界面展示绑定成功的状态。In response to the third triggering instruction, the binding interface is invoked, and the binding interface is used to update the state changes in the binding process in real time, including displaying the binding successful state on the binding interface after the binding is completed.
  28. 根据权利要求26或27所述的绑定方法,其特征在于,所述方法还包括:The binding method according to claim 26 or 27, wherein the method further comprises:
    在向所述ECG设备发送绑定请求消息后,启动定时器,若定时器超时仍未收到所述ECG设备返回的绑定响应消息,则在确定所述绑定请求消息的发送次数未达到预设次数时,向所述ECG设备重发所述绑定请求消息;在确定所述绑定请求消息的发送次数达到所述预设次数时,停止向所述ECG设备发送所述绑定请求消息,并中止与对应ECG设备的绑定过程。After sending a binding request message to the ECG device, a timer is started. If the timer expires and the binding response message returned by the ECG device is not received, it is determined that the number of times the binding request message has been sent has not reached Resend the binding request message to the ECG device at a preset number of times; stop sending the binding request to the ECG device when it is determined that the number of sending the binding request message reaches the preset number of times Message and abort the binding process with the corresponding ECG device.
  29. 一种绑定装置,其特征在于,应用于心电图ECG设备,所述装置包括:A binding device, characterized in that it is applied to an electrocardiogram ECG device, and the device includes:
    第一发送单元,用于在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;The first sending unit is configured to send an ECG status notification message to the smart terminal after the ECG device establishes a communication connection with the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status The data includes the address information of the ECG device;
    第一接收单元,用于接收所述智能终端在收到所述ECG状态通知消息后发送的绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;The first receiving unit is configured to receive a binding request message sent by the smart terminal after receiving the ECG status notification message, where the binding request message includes at least the identification information and address information of the smart terminal;
    第二发送单元,用于向所述智能终端返回绑定响应消息,所述绑定响应消息中至少包括所述ECG设备的地址信息;The second sending unit is configured to return a binding response message to the smart terminal, where the binding response message includes at least the address information of the ECG device;
    第一处理单元,用于在本地保存第一绑定信息,所述第一绑定信息中至少包括所述ECG设备与相应智能终端的标识信息之间的绑定关系。The first processing unit is configured to store first binding information locally, where the first binding information at least includes the binding relationship between the ECG device and the identification information of the corresponding smart terminal.
  30. 一种绑定装置,其特征在于,应用于智能终端,所述装置包括:A binding device, characterized in that it is applied to a smart terminal, and the device includes:
    第二接收单元,用于接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中包括ECG设备的地址信息;The second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes address information of the ECG device;
    第三发送单元,用于向所述ECG设备发送绑定请求消息,所述绑定请求消息中至少包括所述智能终端的标识信息和地址信息;The third sending unit is configured to send a binding request message to the ECG device, where the binding request message includes at least the identification information and address information of the smart terminal;
    第三接收单元,用于接收所述ECG设备的绑定响应消息,所述绑定响应消息中至少包括所述ECG设备的地址信息;The third receiving unit is configured to receive a binding response message of the ECG device, where the binding response message at least includes address information of the ECG device;
    第二处理单元,用于在本地保存第二绑定信息,所述第二绑定信息中至少包括所述智能终端与所述ECG设备的地址信息之间的绑定关系。The second processing unit is configured to locally store second binding information, where the second binding information at least includes a binding relationship between the address information of the smart terminal and the ECG device.
  31. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述权利要求23-25任一项所述的绑定方法,或用于执行上述权利要求26-28任一项所述的绑定方法。A computer-readable storage medium, the storage medium stores a computer program, the computer program is used to execute the binding method according to any one of the above claims 23-25, or used to execute the above claims 26-28 Any one of the binding methods.
  32. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
    所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述权利要求23-25任一项所述的绑定方法,或实现上述权利要求26-28任一项所述的绑定方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the binding method according to any one of the above claims 23-25, or to implement the above claim 26- The binding method described in any one of 28.
  33. 一种心电测量方法,应用于心电图ECG设备,其特征在于,所述方法包括:An electrocardiogram measurement method applied to an electrocardiogram ECG device, characterized in that the method includes:
    在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;After the ECG device establishes a communication connection with the smart terminal, an ECG status notification message is sent to the smart terminal. The ECG status notification message includes the status data of the ECG device, and the status data includes at least the status data of the ECG device. Identification information;
    接收所述智能终端在收到所述ECG状态通知消息后发送的测量请求消息,开始ECG测量,并向所述智能终端发送测量开始消息;Receiving a measurement request message sent by the smart terminal after receiving the ECG status notification message, starting ECG measurement, and sending a measurement start message to the smart terminal;
    在ECG测量过程中,将测量数据报文实时发送给所述智能终端;In the ECG measurement process, sending measurement data messages to the smart terminal in real time;
    在测量结束时,向所述智能终端发送测量结束消息。At the end of the measurement, a measurement end message is sent to the smart terminal.
  34. 根据权利要求33所述心电测量方法,其特征在于,所述测量请求消息中包括所述智能终端的标识信息、和测量模式信息;其中,所述测量模式信息用于标识或描述测量的模式内容;The electrocardiogram measurement method according to claim 33, wherein the measurement request message includes identification information of the smart terminal and measurement mode information; wherein the measurement mode information is used to identify or describe the measurement mode content;
    相应的,所述ECG测量包括:根据所述测量请求消息中携带的测量模式信息,执行对应的测量项目,并获得相应测量项目的测量数据报文。Correspondingly, the ECG measurement includes: executing a corresponding measurement item according to the measurement mode information carried in the measurement request message, and obtaining a measurement data message of the corresponding measurement item.
  35. 根据权利要求34所述心电测量方法,其特征在于,所述测量数据报文中包括测量进程、及与所述测量进程对应的测量数据。The electrocardiogram measurement method according to claim 34, wherein the measurement data message includes a measurement process and measurement data corresponding to the measurement process.
  36. 根据权利要求33、34或35所述心电测量方法,其特征在于,所述方法还包括:The electrocardiogram measurement method according to claim 33, 34 or 35, wherein the method further comprises:
    在所述ECG设备与智能终端建立通信连接后,所述ECG设备获得第一触发指令时,向所述智能终端发送ECG状态通知消息;所述第一触发指令用于指示开始测量过程;After the ECG device establishes a communication connection with the smart terminal, when the ECG device obtains a first trigger instruction, it sends an ECG status notification message to the smart terminal; the first trigger instruction is used to instruct to start a measurement process;
    相应的,在所述ECG设备执行测量过程中,若获得第二触发指令,则中止所述测量过程;所述第二触发指令用于指示中止测量过程。Correspondingly, during the measurement process performed by the ECG device, if a second trigger instruction is obtained, the measurement process is suspended; the second trigger instruction is used to instruct the suspension of the measurement process.
  37. 根据权利要求36所述心电测量方法,其特征在于,所述ECG设备具有触发电极,所述方法还包括:The ECG measurement method according to claim 36, wherein the ECG device has a trigger electrode, and the method further comprises:
    当所述触发电极被触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被停止触发时,所述ECG设备获得所述第二触发指令;When the trigger electrode is triggered, the ECG device obtains the first trigger instruction, and when the trigger electrode stops triggering, the ECG device obtains the second trigger instruction;
    或者,当所述触发电极被第一次触发时,所述ECG设备获得所述第一触发指令,当所述触发电极被第二次触发时,所述ECG设备获得所述第二触发指令。Alternatively, when the trigger electrode is triggered for the first time, the ECG device obtains the first trigger instruction, and when the trigger electrode is triggered for the second time, the ECG device obtains the second trigger instruction.
  38. 一种心电测量方法,应用于智能终端,其特征在于,所述方法包括:An electrocardiogram measurement method applied to a smart terminal, characterized in that the method includes:
    接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;Receiving an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
    向所述ECG设备发送测量请求消息;Sending a measurement request message to the ECG device;
    接收所述ECG设备发送的测量开始消息及测量数据报文,并通过交互界面展示相应测量数据;Receiving a measurement start message and a measurement data message sent by the ECG device, and displaying the corresponding measurement data through an interactive interface;
    在收到所述智能终端的测量结束消息时,根据获得的所述测量数据生成测量结果,并通过所述交互界面展示所述测量结果。When receiving the measurement end message of the smart terminal, a measurement result is generated according to the obtained measurement data, and the measurement result is displayed through the interactive interface.
  39. 根据权利要求38所述心电测量方法,其特征在于,所述方法还包括:The electrocardiogram measurement method according to claim 38, wherein the method further comprises:
    在向所述ECG设备发送测量请求消息后,启动定时器,若定时器超时仍未收到所述ECG设备返回的测量开始消息,则在确定所述测量请求消息的发送次数未达到预设次数时,向所述ECG设备重发所述测量请求消息;在确定所述测量请求消息的发送次数达到所述预设次数时,停止向所述ECG设备发送所述测量请求消息,并中止测量过程。After sending a measurement request message to the ECG device, a timer is started. If the measurement start message returned by the ECG device is not received after the timer expires, it is determined that the number of times the measurement request message has been sent has not reached the preset number of times. When the measurement request message is retransmitted to the ECG device; when it is determined that the number of times the measurement request message has been sent reaches the preset number of times, stop sending the measurement request message to the ECG device, and stop the measurement process .
  40. 一种心电测量装置,应用于心电图ECG设备,其特征在于,所述装置包括:An electrocardiogram measuring device applied to electrocardiogram ECG equipment, characterized in that the device includes:
    第一发送单元,在所述ECG设备与智能终端建立通信连接后,向所述智能终端发送ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;The first sending unit, after the ECG device establishes a communication connection with the smart terminal, sends an ECG status notification message to the smart terminal, where the ECG status notification message includes status data of the ECG device, and the status data includes At least include the identification information of the ECG device;
    第一接收单元,用于接收所述智能终端在收到所述ECG状态通知消息后发送的测量请求消息,The first receiving unit is configured to receive a measurement request message sent by the smart terminal after receiving the ECG status notification message,
    第一处理单元,用于在获得所述测量请求消息后开始ECG测量;The first processing unit is configured to start ECG measurement after obtaining the measurement request message;
    第二发送单元,用于向所述智能终端发送测量开始消息,在ECG测量过程中,将测量数据报文实时发送给所述智能终端;The second sending unit is configured to send a measurement start message to the smart terminal, and send a measurement data message to the smart terminal in real time during the ECG measurement process;
    第三发送单元,用于在测量结束时,向所述智能终端发送测量结束消息。The third sending unit is configured to send a measurement end message to the smart terminal when the measurement ends.
  41. 一种心电测量装置,应用于智能终端,其特征在于,所述装置包括:An electrocardiogram measuring device applied to an intelligent terminal, characterized in that the device includes:
    第二接收单元,用于接收来自心电图ECG设备的ECG状态通知消息,所述ECG状态通知消息中包括所述ECG设备的状态数据,所述状态数据中至少包括ECG设备的标识信息;The second receiving unit is configured to receive an ECG status notification message from an ECG device, where the ECG status notification message includes status data of the ECG device, and the status data includes at least identification information of the ECG device;
    第四发送单元,用于向所述ECG设备发送测量请求消息;A fourth sending unit, configured to send a measurement request message to the ECG device;
    第三接收单元,用于接收所述ECG设备发送的测量开始消息及测量数据报文;The third receiving unit is configured to receive a measurement start message and a measurement data message sent by the ECG device;
    第二处理单元,用于通过交互界面展示相应测量数据;The second processing unit is used to display corresponding measurement data through an interactive interface;
    第四接收单元,用于接收所述智能终端的测量结束消息;The fourth receiving unit is configured to receive the measurement end message of the smart terminal;
    所述第二处理单元还用于,在获得所述测量结束消息时,根据获得的所述测量数据生成测量结果,并通过所述交互界面展示所述测量结果。The second processing unit is further configured to, when obtaining the measurement end message, generate a measurement result according to the obtained measurement data, and display the measurement result through the interactive interface.
  42. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述权利要求33-37任一项所述的心电测量方法,或用于执行上述权利要求38-39任一项所述的心电测量方法。A computer-readable storage medium, the storage medium stores a computer program, the computer program is used to execute the electrocardiogram measurement method of any one of the above claims 33-37, or used to execute the above claim 38- 39 Any of the electrocardiogram measurement methods.
  43. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;A memory for storing executable instructions of the processor;
    所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述权利要求33-37任一项所述的心电测量方法,或实现上述权利要求38-39任一项所述的心电测量方法。The processor is configured to read the executable instruction from the memory, and execute the instruction to implement the electrocardiogram measurement method according to any one of the foregoing claims 33-37, or implement the foregoing claim 38 -39 Any of the electrocardiogram measurement methods.
PCT/CN2020/138374 2020-04-02 2020-12-22 Information processing method and apparatus, and electronic device and computer readable storage medium WO2021196763A1 (en)

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
CN202010255591.2A CN111493861B (en) 2020-04-02 2020-04-02 Electrocardiogram measuring method and device, electronic equipment and computer storage medium
CN202010255874.7 2020-04-02
CN202010255874.7A CN111540458B (en) 2020-04-02 2020-04-02 Information processing method and device, electronic equipment and computer storage medium
CN202010255589.5 2020-04-02
CN202010256331.7A CN111475870B (en) 2020-04-02 2020-04-02 Reset method and device, electronic equipment and computer storage medium
CN202010255591.2 2020-04-02
CN202010255589.5A CN111540457B (en) 2020-04-02 2020-04-02 Binding method and device, electronic equipment and computer storage medium
CN202010256331.7 2020-04-02

Publications (1)

Publication Number Publication Date
WO2021196763A1 true WO2021196763A1 (en) 2021-10-07

Family

ID=77926903

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/138374 WO2021196763A1 (en) 2020-04-02 2020-12-22 Information processing method and apparatus, and electronic device and computer readable storage medium

Country Status (1)

Country Link
WO (1) WO2021196763A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105228089A (en) * 2015-09-30 2016-01-06 成都信汇聚源科技有限公司 A kind of wearable device multisensor adaptation and real-time data acquisition method
CN106487767A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 The update method of checking information and device
CN111475870A (en) * 2020-04-02 2020-07-31 出门问问信息科技有限公司 Resetting method and device, electronic equipment and computer storage medium
CN111493861A (en) * 2020-04-02 2020-08-07 出门问问信息科技有限公司 Electrocardiogram measuring method and device, electronic equipment and computer storage medium
CN111540457A (en) * 2020-04-02 2020-08-14 出门问问信息科技有限公司 Binding method and device, electronic equipment and computer storage medium
CN111540458A (en) * 2020-04-02 2020-08-14 出门问问信息科技有限公司 Information processing method and device, electronic equipment and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487767A (en) * 2015-08-31 2017-03-08 阿里巴巴集团控股有限公司 The update method of checking information and device
CN105228089A (en) * 2015-09-30 2016-01-06 成都信汇聚源科技有限公司 A kind of wearable device multisensor adaptation and real-time data acquisition method
CN111475870A (en) * 2020-04-02 2020-07-31 出门问问信息科技有限公司 Resetting method and device, electronic equipment and computer storage medium
CN111493861A (en) * 2020-04-02 2020-08-07 出门问问信息科技有限公司 Electrocardiogram measuring method and device, electronic equipment and computer storage medium
CN111540457A (en) * 2020-04-02 2020-08-14 出门问问信息科技有限公司 Binding method and device, electronic equipment and computer storage medium
CN111540458A (en) * 2020-04-02 2020-08-14 出门问问信息科技有限公司 Information processing method and device, electronic equipment and computer storage medium

Similar Documents

Publication Publication Date Title
US7725903B2 (en) Method for providing event to application, and electronic device using this method
WO2019041978A1 (en) Multi-screen terminal and application display control method and device thereof
US20150067536A1 (en) Gesture-based Content Sharing Between Devices
WO2013189286A1 (en) Method and terminal for creating folder on user interface
JP2016500175A (en) Method and apparatus for realizing floating object
WO2018086454A1 (en) Page data processing method and device
US20200398151A1 (en) Information Processing Method and Apparatus, Storage Medium, and Electronic Device
US11604570B2 (en) Method, device, apparatus, and storage medium for controlling touch operation mode
WO2022057393A1 (en) Event processing method and apparatus, storage medium, mobile terminal, and computer
WO2013123720A1 (en) Method for controlling mouse modules and electronic device
WO2019047183A1 (en) Key display method, apparatus, and terminal
WO2023216724A1 (en) Terminal control method and apparatus, electronic device, and storage medium
AU2019203256A1 (en) Fingerprint event processing method, apparatus, and terminal
WO2023098732A1 (en) Cross-device interaction method and apparatus, electronic device, and storage medium
CN113778280B (en) Linux compatible Android display message notification method and device
WO2021196763A1 (en) Information processing method and apparatus, and electronic device and computer readable storage medium
WO2019047234A1 (en) Touch operation response method and apparatus
CN113641320B (en) Method and device for sharing screen of Linux compatible with Android
CN111540458B (en) Information processing method and device, electronic equipment and computer storage medium
CN111493861B (en) Electrocardiogram measuring method and device, electronic equipment and computer storage medium
JP7385041B2 (en) Live room interaction methods, equipment, readable media and electronic equipment
CN111540457B (en) Binding method and device, electronic equipment and computer storage medium
WO2006080306A1 (en) Linkage operation method and communication terminal apparatus
CN111475870B (en) Reset method and device, electronic equipment and computer storage medium
WO2023241427A1 (en) Image processing method and apparatus, device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20929508

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20929508

Country of ref document: EP

Kind code of ref document: A1