Method for transmitting communication instructions, electronic device, medical system and related products

By adopting a response judgment strategy for acquiring instruction information and flexibly controlling instruction retransmission, the problem of data loss in communication between the host computer and the slave computer in the medical system is solved, thereby improving the reliability of communication and user-friendliness.

CN116781229BActive Publication Date: 2026-04-17SCENERAY
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SCENERAY
Filing Date
2023-07-13
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In medical systems, there is a risk of data loss during communication between the host computer and the slave computer, which affects the accuracy of the slave computer's response judgment.

Method used

By acquiring instruction information, the system uses a response judgment strategy to determine whether the lower-level machine has completed the response, and generates a prompt message when the response is not completed. It flexibly controls the instruction retransmission interval and number of times, and uses timer counters and level parameters to distinguish the importance of instructions.

Benefits of technology

Ensure the correctness and reliability of communication commands, promptly detect abnormal responses, improve user-friendliness and communication stability, and optimize resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781229B_ABST
    Figure CN116781229B_ABST
Patent Text Reader

Abstract

The application provides a communication instruction sending method, an electronic device, a medical system and related products. The method comprises the following steps: S10: acquiring instruction information sent by an upper computer, wherein the instruction information comprises an instruction serial number, and the instruction serial number is used to indicate a program-controlled instruction issued by the upper computer to a lower computer; S20: acquiring a response judgment strategy according to the instruction information; S30: acquiring a response judgment result of the lower computer through the response judgment strategy, wherein the response judgment result is used to indicate whether the lower computer completes the response; and S40: when the lower computer does not complete the response, generating and displaying prompt information, wherein the prompt information is used to prompt that the instruction information is abnormal in response. Through the response judgment strategy corresponding to the instruction information, the response judgment result is obtained, whether the lower computer successfully responds can be accurately judged, which helps to ensure the correctness and reliability of the communication instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of medical systems, and more particularly to methods for transmitting communication commands, electronic devices, medical systems, computer-readable storage media, and computer program products. Background Technology

[0002] With the continuous development of technology and the progress of society, patients' desire to improve their quality of life is increasing. To meet these needs, various implantable medical systems are emerging, with very broad application prospects. These systems can provide patients with a variety of treatment options.

[0003] In related technologies, the host computer in a medical system needs to frequently send communication commands to the slave computer, and the data transmission in medical systems requires high accuracy. Because there is a risk of data loss (packet loss) during communication between the host and slave computers, it affects the accuracy of the slave computer's response judgment.

[0004] Based on this, this application provides a method for transmitting communication instructions, an electronic device, a medical system, a computer-readable storage medium, and a computer program product to solve the above problems. Summary of the Invention

[0005] The purpose of this application is to provide a method for sending communication commands, electronic devices, medical systems, computer-readable storage media, and computer program products, which solve the problem of not being able to accurately determine whether the lower-level machine has successfully responded.

[0006] The objective of this application is achieved through the following technical solution:

[0007] In a first aspect, this application provides a method for sending communication instructions, the method comprising:

[0008] S10: Obtain instruction information sent by the host computer, the instruction information including instruction sequence number, the instruction sequence number being used to indicate the program control instruction issued by the host computer to the lower computer;

[0009] S20: Obtain the response judgment strategy based on the instruction information;

[0010] S30: Obtain the response judgment result of the lower-level machine through the response judgment strategy. The response judgment result is used to indicate whether the lower-level machine has completed the response.

[0011] S40: When the lower-level machine fails to respond, a prompt message is generated and displayed. The prompt message is used to indicate that the instruction information response is abnormal.

[0012] The beneficial effects of this technical solution are as follows: It obtains instruction information from the host computer and acquires a response judgment strategy based on the acquired instruction information. Using the response judgment strategy, it obtains the response judgment result from the lower-level computer, which indicates whether the lower-level computer has successfully completed the response operation. If the lower-level computer fails to respond, i.e., the response judgment result indicates an abnormal response from the lower-level computer, then a corresponding prompt message is generated and displayed. This prompt message can be used to indicate the abnormal response status of the lower-level computer to the instruction information from the host computer.

[0013] On the one hand, by obtaining the response judgment strategy corresponding to the instruction information, and then obtaining the response judgment result, it is possible to accurately determine whether the lower-level machine has successfully responded, which helps to ensure the correctness and reliability of communication instructions.

[0014] On the other hand, when the lower-level device fails to respond, a prompt message is generated and displayed in a timely manner, which enables users to quickly discover abnormal response situations and helps to identify communication problems as early as possible and take corresponding measures.

[0015] On the other hand, by generating and displaying prompts, the system can promptly provide feedback to users on the response to communication commands, thereby improving the user-friendliness and ease of use of the medical system.

[0016] In summary, this communication command sending method, by obtaining the response judgment strategy corresponding to the command information and then obtaining the response judgment result, can ensure the correct sending and response of commands, and thus promptly detect and handle response anomalies, thereby improving the reliability and user-friendliness of communication.

[0017] In some possible implementations, the instruction information also includes instruction retransmission parameters, which are used to indicate the interval and number of times the instruction information is retransmitted;

[0018] The step of obtaining the response judgment strategy based on the instruction information includes:

[0019] The command retransmission parameters are parsed to obtain the preset interval duration and preset retransmission number of the command information;

[0020] The response judgment strategy is obtained based on the preset interval duration and the preset number of retransmissions.

[0021] The beneficial effects of this technical solution are as follows: It parses the command retransmission parameters to obtain the preset retransmission interval duration (i.e., preset interval length) and the preset number of retransmissions (i.e., preset number of retransmissions), and obtains the response judgment strategy based on the preset interval duration and the preset number of retransmissions. In other words, the response judgment strategy can be used to determine when to retransmit command information, as well as the number of retransmissions and the interval time.

[0022] On the one hand, by setting command retransmission parameters, the retransmission interval and number of retransmissions can be flexibly controlled, which helps to configure reasonable retransmission strategies for different conditions (such as communication environment and requirements, and the importance of programmable commands), thereby improving the success rate and stability of communication. On the other hand, by generating a response judgment strategy based on the preset interval duration and number of retransmissions, it can be ensured that commands are continuously attempted to be sent within the specified number of retransmissions, which helps to overcome problems such as interference or packet loss that may occur in communication, and improves the robustness of communication. Furthermore, by reasonably configuring the retransmission interval duration and number of retransmissions, excessive retransmissions can be avoided while ensuring communication success, reducing the consumption of communication resources while optimizing communication performance. Moreover, by setting command retransmission parameters and generating response judgment strategies, retransmission situations in communication can be effectively handled, and corresponding prompt information can be generated as needed, improving the user's perception and understanding of the communication status and enhancing the user experience.

[0023] In summary, by parsing command retransmission parameters and generating corresponding response judgment strategies, the goal of flexibly controlling command retransmission and optimizing communication performance is achieved, thereby improving communication robustness and user experience.

[0024] In some possible implementations, the methods for obtaining the instruction retransmission parameters include:

[0025] By using the correspondence between instruction sequence numbers and preset retransmission parameters, the instruction retransmission parameter corresponding to the instruction sequence number can be retrieved from multiple preset retransmission parameters; or...

[0026] The programmable instruction input parameter prediction model corresponding to the instruction sequence number is used to obtain the instruction retransmission parameters corresponding to the instruction sequence number.

[0027] The beneficial effects of this technical solution are as follows: It can be understood that there are two ways to obtain instruction retransmission parameters: First, a pre-established correspondence (table) between instruction numbers and instruction retransmission parameters is used. When it is necessary to obtain the instruction retransmission parameters corresponding to a specific instruction number, the corresponding preset retransmission parameters are found by querying the correspondence. Second, the instruction number and its corresponding programmable instruction input parameters are used as input, and a prediction model is used to predict or calculate the instruction retransmission parameters corresponding to the instruction number. The prediction model can be established based on historical data or statistical methods, inferring the predicted value of the instruction retransmission parameters based on the known instruction number and its corresponding programmable instruction input parameters.

[0028] On the one hand, by leveraging the correspondence or predictive model between command sequence numbers and preset retransmission parameters, command retransmission parameters can be flexibly obtained. The corresponding parameters can be automatically retrieved based on the specific command sequence number, reducing the workload and possibility of errors in manual configuration and making the configuration of command retransmission parameters more convenient and flexible. On the other hand, different command sequence numbers may correspond to different command retransmission parameters. By establishing a correspondence table or using a predictive model, personalized command retransmission parameters can be set for each command sequence number. This allows for providing the most suitable retransmission parameters for the characteristics and requirements of different commands, further optimizing communication performance and stability. Furthermore, by reasonably setting command retransmission parameters, retransmission operations can be performed promptly during communication, improving communication reliability. Based on the preset retransmission interval and number of retransmissions, response information can be quickly obtained and appropriately processed according to the command retransmission parameter settings, further improving communication efficiency.

[0029] In summary, by querying the correspondence between instruction sequence numbers and preset retransmission parameters or by querying parameter prediction models, instruction retransmission parameters can be flexibly obtained and personalized settings can be achieved, thereby improving the reliability and efficiency of communication.

[0030] In some possible implementations, generating and displaying the prompt message includes:

[0031] Obtain the level parameter corresponding to the instruction information;

[0032] When the level parameter indicates that the instruction information is a strong instruction, the prompt information is generated and displayed using the host computer.

[0033] The beneficial effects of this technical solution are as follows: Based on the instruction information, a corresponding level parameter is obtained, which can be considered as describing the importance or priority of the instruction. The level parameter can serve as a basis for judging the importance of the instruction. Based on the obtained level parameter, the importance of the instruction information is judged. If the level parameter indicates that the instruction information is a strong instruction, i.e., it has high importance, then a corresponding prompt message is generated. This prompt message can be used to remind the user of the importance of the instruction, thereby attracting greater attention. Then, the prompt message is displayed to the user using the host computer.

[0034] On the one hand, by setting the priority parameters, the priority of different instruction information can be distinguished. Dividing instruction information into strong instructions and other types of instructions (weak instructions) helps to differentiate between important operations and general operations. On the other hand, only instruction information determined to be strong instructions will generate corresponding prompts and be displayed on the host computer, which can provide users with timely feedback on the execution status of important instructions, ensuring that they receive attention and are handled promptly.

[0035] In summary, by acquiring level parameters and determining whether the instruction information is a strong instruction, the operation of generating prompt information and displaying it using a host computer can distinguish important instructions from other instructions, and provide users with timely prompts and feedback on important operations, thereby improving the controllability and security of instruction execution.

[0036] In some possible implementations, the response determination strategy is executed using a timer / counter;

[0037] The method further includes:

[0038] When the level parameter indicates that the instruction information is a strong instruction, the timer / counter is reset and S30 is executed for the instruction information;

[0039] When the level parameter indicates that the instruction information is a weak instruction, new instruction information is obtained and S20 is executed.

[0040] The beneficial effect of this technical solution is that, in the method of sending communication commands, the response judgment strategy is executed using a timer and counter. When the level parameter indicates that the command information is a strong command, the timer and counter are reset, and the response judgment result of the lower-level machine is obtained through the response judgment strategy to determine whether the lower-level machine has completed the response. When the level parameter indicates that the command information is a weak command, new command information is obtained, and the response judgment strategy is obtained based on the command information.

[0041] On the one hand, resetting the timer / counter and executing operation S30 allows for timely detection of strong command responses. If the lower-level device fails to respond, appropriate measures can be taken promptly, such as generating a prompt message and displaying it on the upper-level device. This helps operators promptly recognize abnormal responses to strong commands and take further action. On the other hand, because strong commands are crucial, resetting the timer / counter causes the command information to be retransmitted. This retransmission mechanism improves command reliability, ensuring that the lower-level device receives important commands and responds. Retransmission can compensate for potential communication problems or lower-level device reception failures, increasing the success rate of command transmission. Furthermore, for weak commands, new command information can be obtained, and a response judgment strategy can be applied to the new command information, ensuring the correct execution flow of the command information.

[0042] In summary, this technical solution, through the execution of a timer-counter in the response judgment strategy and the handling measures for strong commands, ensures the timely detection and processing of strong commands, increasing the reliability and sequentiality of commands. The timer-counter reset and retransmission mechanism provide opportunities for strong commands to be retransmitted, ensuring the reliability of their transmission and response. Similarly, for weak commands, they can be acquired and executed sequentially, ensuring the correct order of command execution. These beneficial effects improve the stability and reliability of communication commands, guaranteeing the correct transmission and response of important command information.

[0043] In some possible implementations, obtaining the response judgment result of the lower-level machine through the response judgment strategy includes:

[0044] S31: Increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count; if not, execute S32; if yes, obtain new instruction information and execute S20.

[0045] S32: The host computer sends the instruction information to the slave computer, and the timer counter counts the time according to the preset interval.

[0046] S33: Within the preset interval, detect whether the host computer receives the response information sent by the slave computer; if yes, obtain new instruction information and execute S20; if no, execute S31.

[0047] The beneficial effects of this technical solution are as follows: The count of the timer / counter is incremented by one, and it is checked whether the count exceeds the preset retransmission count. If the count does not exceed the preset retransmission count, it indicates that retransmission is still possible. At this time, the host computer retransmits the instruction information to the slave computer, and the timer / counter is started to count according to the preset interval, ensuring that the host computer waits for the slave computer's response within the preset time interval. Within the preset interval, it checks whether the host computer receives the response information sent by the slave computer. If a response information is received, it indicates that the slave computer has completed the response, can obtain new instruction information, and execute a new round of response information detection. If no response information is received, S31 is executed, and the next round of retransmission continues.

[0048] On the one hand, by controlling the timer / counter, the successful transmission of instructions and the response from the lower-level machine can be ensured. If the lower-level machine fails to respond, the instruction will continue to be sent according to the preset number of retransmissions until the lower-level machine responds successfully or the maximum number of retransmissions is reached, thereby improving the reliability of instruction information transmission and ensuring that the lower-level machine can respond and complete the response in a timely manner.

[0049] On the other hand, by setting the interval, a response from the lower-level machine can be waited for a certain period of time. If no response is received within the preset interval, the instruction information may be retransmitted, reducing response problems caused by communication errors or loss, and improving the stability and reliability of communication.

[0050] On the other hand, by processing the response results, different operations can be performed according to the importance of the instruction. For example, strong instructions will be resent and a response will be awaited to ensure their correct execution and response. Weak instructions will obtain new instruction information and continue execution to ensure the sequentiality and flow of instructions.

[0051] In summary, the timer / counter execution and retransmission mechanism based on the response judgment strategy can improve the reliability of instruction information transmission, reduce the impact of communication errors, and optimize the instruction information execution flow. By using a mechanism of counting retransmissions, retransmission, and waiting for responses, the transmission and acknowledgment of strong instructions are ensured, while the sequential execution of weak instructions is handled simultaneously.

[0052] Secondly, this application also provides an electronic device, the electronic device including a memory and at least one processor, the memory storing a computer program, the at least one processor being configured to execute the computer program to perform the following steps:

[0053] S10: Obtain instruction information sent by the host computer, the instruction information including instruction sequence number, the instruction sequence number being used to indicate the program control instruction issued by the host computer to the lower computer;

[0054] S20: Obtain the response judgment strategy based on the instruction information;

[0055] S30: Obtain the response judgment result of the lower-level machine through the response judgment strategy. The response judgment result is used to indicate whether the lower-level machine has completed the response.

[0056] S40: When the lower-level machine fails to respond, a prompt message is generated and displayed. The prompt message is used to indicate that the instruction information response is abnormal.

[0057] In some possible implementations, the instruction information further includes instruction retransmission parameters, which indicate the interval and number of times the instruction information is retransmitted; when the at least one processor executes the computer program, it obtains a response judgment strategy based on the instruction information in the following manner:

[0058] The command retransmission parameters are parsed to obtain the preset interval duration and preset retransmission number of the command information;

[0059] The response judgment strategy is obtained based on the preset interval duration and the preset number of retransmissions.

[0060] In some possible implementations, the at least one processor obtains real-time instruction retransmission parameters when executing the computer program in the following manner:

[0061] By using the correspondence between instruction sequence numbers and preset retransmission parameters, the instruction retransmission parameter corresponding to the instruction sequence number can be retrieved from multiple preset retransmission parameters; or...

[0062] The programmable instruction input parameter prediction model corresponding to the instruction sequence number is used to obtain the instruction retransmission parameters corresponding to the instruction sequence number.

[0063] In some possible implementations, the at least one processor generates and displays a prompt message when executing the computer program in the following manner:

[0064] Obtain the level parameter corresponding to the instruction information;

[0065] When the level parameter indicates that the instruction information is a strong instruction, the prompt information is generated and displayed using the host computer.

[0066] In some possible implementations, the response determination strategy is executed using a timer / counter;

[0067] When the at least one processor is configured to execute the computer program, it performs the following steps:

[0068] When the level parameter indicates that the instruction information is a strong instruction, the timer / counter is reset and S30 is executed for the instruction information;

[0069] When the level parameter indicates that the instruction information is a weak instruction, new instruction information is obtained and S20 is executed.

[0070] In some possible implementations, when the at least one processor executes the computer program, it obtains the response judgment result of the lower-level machine through the response judgment strategy in the following manner:

[0071] S31: Increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count; if not, execute S32; if yes, obtain new instruction information and execute S20.

[0072] S32: The host computer sends the instruction information to the slave computer, and the timer counter counts the time according to the preset interval.

[0073] S33: Within the preset interval, detect whether the host computer receives the response information sent by the slave computer; if yes, obtain new instruction information and execute S20; if no, execute S31.

[0074] Thirdly, this application also provides a medical system, which includes the electronic device, host computer, and slave computer described in the second aspect.

[0075] In some possible implementations, the lower-level device includes a stimulator for implantation in a patient.

[0076] The host computer includes a programmable control device, which is used to receive configuration operations for stimulation parameters and establish a programmable connection with the stimulator.

[0077] In some possible implementations, the electronic device is integrated on the stimulator; or, the electronic device is integrated on the programmable device.

[0078] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by at least one processor, implements the steps of the method described in any of the first aspects, or implements the functions of the electronic device described in the second aspect.

[0079] Fifthly, this application also provides a computer program product comprising a computer program that, when executed by at least one processor, implements the steps of the method described in any of the first aspects, or implements the functions of the electronic device described in the second aspect. Attached Figure Description

[0080] The present application will be further described below with reference to the accompanying drawings and embodiments.

[0081] Figure 1 This is a flowchart illustrating a method for sending communication commands provided in an embodiment of this application.

[0082] Figure 2 This is a flowchart illustrating a response determination strategy provided in an embodiment of this application.

[0083] Figure 3 This is a schematic diagram of a process for generating prompt information provided in an embodiment of this application.

[0084] Figure 4 This is a schematic diagram of a process for obtaining a response judgment result provided in an embodiment of this application.

[0085] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of this application.

[0086] Figure 6 This is a structural block diagram of a medical system provided in an embodiment of this application.

[0087] Figure 7 This is a schematic diagram of the structure of a computer program product provided in an embodiment of this application. Detailed Implementation

[0088] The technical solutions in this application will be described below with reference to the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.

[0089] In this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any implementation or design described as "exemplary" or "for example" in this application should not be construed as being better or more advantageous than other implementations or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0090] Below, we will first briefly describe one application area of ​​the embodiments of this application (i.e., implantable neurostimulation system).

[0091] An implantable neurostimulation system (a type of medical system) mainly consists of a stimulator implanted in the patient's body and a programmed device placed outside the patient's body. The related neuromodulation technology primarily involves implanting electrodes at specific sites (target points) in the body's tissues through stereotactic surgery. The stimulator implanted in the patient then sends electrical pulses to the target points via the electrodes, modulating the electrical activity and function of the corresponding neural structures and networks, thereby improving symptoms and alleviating pain. The stimulator can be any of the following: an implantable neurostimulation device, an implantable cardiac stimulation system (also known as a pacemaker), an implantable drug delivery system (IDDS), or a lead adapter. Implantable neurostimulation devices include deep brain stimulation (DBS), cortical nerve stimulation (CNS), spinal cord stimulation (SCS), sacral nerve stimulation (SNS), and vagus nerve stimulation (VNS).

[0092] In some embodiments, the stimulator may include an implantable pulse generator (IPG), electrode leads, and an extension lead disposed between the pulse generator and the electrode leads, through which data interaction between the pulse generator and the electrode leads is achieved. The pulse generator is disposed within the patient's body. Responding to programmed commands sent by a programmable device, controllable electrical stimulation energy is provided to the body's tissues via a sealed battery and circuitry. One or two controllable electrical stimuli are delivered to specific areas of the body's tissues via the implanted extension lead and electrode leads. The extension lead, used in conjunction with the pulse generator, serves as a medium for transmitting electrical stimulation signals, conveying the electrical stimulation signals generated by the pulse generator to the electrode leads. The electrode leads deliver electrical stimulation to specific areas of the body's tissues through their electrode contacts. The stimulator has one or more electrode leads on one or both sides, and each electrode lead has multiple electrode contacts.

[0093] In other embodiments, the stimulator may consist only of a pulse generator and electrode leads. In this case, the pulse generator may be embedded in the patient's skull, and the electrode leads may be implanted intracranially, with the pulse generator and electrode leads directly connected without the need for extension leads.

[0094] The electrode leads can be neurostimulation electrodes, delivering electrical stimulation to specific areas of tissue within the body via multiple electrode contacts. The stimulator has one or more electrode leads on one or both sides, with multiple electrode contacts on each lead. These contacts can be evenly or non-uniformly arranged circumferentially on the electrode leads. As an example, the electrode contacts can be arranged in a 4x3 array (a total of 12 contacts) circumferentially on the electrode leads. The electrode contacts can include stimulation contacts and / or acquisition contacts. The electrode contacts can be, for example, sheet-like, ring-like, or dot-like shapes.

[0095] In some possible approaches, the stimulated tissue can be the patient's brain tissue, and the stimulated site can be a specific area of ​​the brain tissue. Generally, the stimulated site differs depending on the patient's disease type, as well as the number of stimulation contacts (single-source or multi-source), the application of one or more specific electrical stimulation signals (single-channel or multi-channel), and the stimulation parameter data. It can be assumed that using multiple stimulation contacts (multi-source, multi-channel) will generate a larger amount of data compared to using a single-source, single-channel approach.

[0096] This application does not limit the applicable disease types, but can be any disease type applicable to deep brain stimulation (DBS), spinal cord stimulation (SCS), pelvic stimulation, gastric stimulation, peripheral nerve stimulation, or functional electrical stimulation. Among these, DBS can be used to treat or manage diseases including, but not limited to: spastic disorders (e.g., epilepsy), pain, migraines, mental illnesses (e.g., major depressive disorder (MDD)), bipolar disorder, anxiety disorders, post-traumatic stress disorder, mild depression, obsessive-compulsive disorder (OCD), behavioral disorders, mood disorders, memory disorders, mental state disorders, mobility disorders (e.g., essential tremor or Parkinson's disease), Huntington's disease, Alzheimer's disease, drug addiction, autism, or other neurological or psychiatric diseases and impairments.

[0097] In this embodiment of the application, when the programmable device and the stimulator establish a programmable connection, the programmable device can send communication instructions to the stimulator, and use the instruction information in the communication instructions to adjust the stimulation parameters of the stimulator (different stimulation parameters correspond to different electrical stimulation signals) or obtain the status of the stimulator (such as power, stimulator model, etc.). Alternatively, the stimulator can sense the bioelectrical activity in the deep brain of the patient to collect electrophysiological signals, and the stimulation parameters of the electrical stimulation signal of the stimulator can be further adjusted using the collected electrophysiological signals.

[0098] Stimulation parameters may include: frequency (e.g., the number of electrical stimulation pulses per second, in Hz), pulse width (the duration of each pulse, in μs), amplitude (generally expressed as voltage, i.e., the intensity of each pulse, in V), timing (e.g., continuous or triggered), stimulation mode (including one or more of current mode, voltage mode, timed stimulation mode, and cyclic stimulation mode), physician control upper and lower limits (the range that physicians can adjust), and patient control upper and lower limits (the range that patients can adjust independently).

[0099] In a specific application scenario, the stimulation parameters of the stimulator can be adjusted in either current mode or voltage mode.

[0100] Programmable devices can be either doctor-controlled (i.e., devices used by doctors) or patient-controlled (i.e., devices used by patients or their families). Doctor-controlled devices can be, for example, smart terminal devices such as tablets, laptops, desktop computers, and mobile phones equipped with programming software. Patient-controlled devices can also be other electronic devices with programming capabilities (e.g., chargers or data acquisition devices with programming functions).

[0101] Lower-level machine response refers to the action of the lower-level machine responding to or replying to instructions sent by the upper-level machine during communication. After receiving the instructions sent by the upper-level machine, the lower-level machine processes them according to the requirements and functions of the instructions and returns the response result to the upper-level machine.

[0102] Packet loss generally refers to the loss of data packets during transmission; that is, the sender sends a data packet, but the receiver does not receive it. For a lower-level device, if it does not acknowledge (ACK) a data packet sent by the upper-level device, then the data packet can be considered lost during transmission, and this can be regarded as a packet loss phenomenon.

[0103] In the medical field, there are many different types of medical systems, and the combination of host computer and slave computer varies depending on the specific medical equipment and application scenario. For example, in an electroencephalogram (EEG) monitoring system, the host computer is the EEG device or monitoring instrument used to configure acquisition parameters, monitor EEG signals in real time, and perform data processing and analysis; the slave computer is an EEG head-mounted device worn on the patient's head, used to receive communication commands from the host computer and acquire EEG signals, transmitting them to the host computer for processing and analysis.

[0104] Another example of a medical system is a sleep apnea system. The host computer is a sleep monitoring instrument used to record and analyze the patient's sleep data and configure the parameters of the ventilator according to the test results. The slave computer is the ventilator device, which is implanted or connected to the patient's airway. It is used to receive communication commands from the host computer and provide appropriate airflow and pressure according to the configuration of the host computer to maintain normal breathing.

[0105] To facilitate understanding of the technical solution of this application, the following mainly uses an implantable neurostimulation system as an example. In this case, the host computer can be a programmable device, and the slave computer can be a stimulator. The users mentioned below refer to doctors, patient monitors, or technicians who have the ability to operate the programmable device and receive feedback from prompts. In practical applications, communication between the host computer and the slave computer often uses a serial communication protocol. Therefore, the transmission medium or equipment in the network may be faulty or unstable, such as network connection interruptions, transmission line interference, network latency, etc. These problems may lead to data packet loss. Furthermore, the programmable device may have limited processing power or storage resources. When the device's processing power is insufficient or its resources are exhausted, it may be unable to process or store all data packets in a timely manner, resulting in packet loss.

[0106] Based on this, this application provides a method for sending communication commands, an electronic device, a medical system, a computer-readable storage medium, and a computer program product. By obtaining the response judgment strategy corresponding to the command information, and then obtaining the response judgment result, it is possible to accurately determine whether the lower-level machine has successfully responded, which helps to ensure the correctness and reliability of communication commands.

[0107] The following section will first explain how to send communication commands, and then explain the electronic equipment.

[0108] Method Implementation Examples

[0109] See Figure 1 , Figure 1 This is a flowchart illustrating a method for sending communication commands provided in an embodiment of this application.

[0110] This application provides a method for sending communication commands, the method comprising:

[0111] S10: Obtain instruction information sent by the host computer, the instruction information including instruction sequence number, the instruction sequence number being used to indicate the program control instruction issued by the host computer to the lower computer;

[0112] S20: Obtain the response judgment strategy based on the instruction information;

[0113] S30: Obtain the response judgment result of the lower-level machine through the response judgment strategy. The response judgment result is used to indicate whether the lower-level machine has completed the response.

[0114] S40: When the lower-level machine fails to respond, a prompt message is generated and displayed. The prompt message is used to indicate that the instruction information response is abnormal.

[0115] Therefore, instruction information is obtained from the host computer, and a response judgment strategy is derived based on this information. Using this strategy, the response judgment result from the lower-level computer is obtained, indicating whether the lower-level computer successfully completed the response operation. If the lower-level computer fails to respond, indicating an abnormal response, a corresponding prompt message is generated and displayed. This message serves to alert the lower-level computer to the abnormal response to the host computer's instruction information.

[0116] On the one hand, by obtaining the response judgment strategy corresponding to the instruction information, and then obtaining the response judgment result, it is possible to accurately determine whether the lower-level machine has successfully responded, which helps to ensure the correctness and reliability of communication instructions.

[0117] On the other hand, when the lower-level device fails to respond, a prompt message is generated and displayed in a timely manner, which enables users to quickly discover abnormal response situations and helps to identify communication problems as early as possible and take corresponding measures.

[0118] On the other hand, by generating and displaying prompts, the system can promptly provide feedback to users on the response to communication commands, thereby improving the user-friendliness and ease of use of the medical system.

[0119] In summary, this communication command sending method, by obtaining the response judgment strategy corresponding to the command information and then obtaining the response judgment result, can ensure the correct sending and response of commands, and thus promptly detect and handle response anomalies, thereby improving the reliability and user-friendliness of communication.

[0120] This embodiment does not limit the format of the instruction sequence number, which can be, for example, 001, 002, or 3#. As an example, instruction sequence number 001 is used to instruct the host computer to send a programmable instruction to the slave computer to call the stimulator model. Instruction sequence number 3# is used to instruct the host computer to send a programmable instruction to the slave computer to obtain the stimulator's battery level.

[0121] A response judgment strategy refers to a method used by the host computer during communication to determine whether the slave computer has successfully executed and responded to an instruction based on its response. The main purpose of the response judgment strategy is to determine whether the slave computer's response meets expectations based on preset conditions or rules, thereby deciding on the next operation or processing method. Specifically, in this application, when the response judgment strategy determines that the slave computer has not completed the response, a prompt message can be generated and displayed to the user.

[0122] This embodiment does not limit the display format and content of the prompt information. For example, it can be displayed using a programmable device via SMS, pop-up message, or voice notification. The displayed content is, for example, the voice message "Patient #3's instruction information 001 has not been responded to. Please pay attention to the patient's condition in a timely manner."

[0123] As an example, the medical device is an implantable neurostimulation system, the host computer is the programmable device, and the slave computer is the stimulator implanted in the patient's body.

[0124] First, the instruction information sent by the host computer is obtained. This instruction information includes an instruction number, which indicates the programmable control instruction issued by the host computer to the slave computer. For example, instruction number 12A indicates a query of the stimulator's battery level.

[0125] Based on the instruction information, obtain the response judgment strategy and determine the rules or conditions of the response judgment strategy. For example, the response judgment strategy is to wait for the lower-level machine's response within 10 seconds.

[0126] According to the rules of the response judgment strategy, it checks whether a response message has been received from the lower-level machine within 10 seconds. If a response message is received, the response judgment result is "response completed"; if no response message is received, the response judgment result is "response incomplete".

[0127] When the lower-level device fails to respond, a prompt message is generated: "Command 12A response error, please check device connection or resend command", and displayed to the user via SMS.

[0128] See Figure 2 , Figure 2 This is a flowchart illustrating a response determination strategy provided in an embodiment of this application.

[0129] In some embodiments, the instruction information further includes instruction retransmission parameters, which are used to indicate the interval and number of times the instruction information is retransmitted;

[0130] The step of obtaining the response judgment strategy based on the instruction information (i.e., S20) may include:

[0131] S21: Parse the instruction retransmission parameters to obtain the preset interval duration and preset retransmission number of the instruction information;

[0132] S22: Obtain the response judgment strategy based on the preset interval duration and the preset number of retransmissions.

[0133] Therefore, the instruction retransmission parameters are parsed to obtain the preset retransmission interval duration and the preset number of retransmissions. Based on the preset interval duration and the preset number of retransmissions, a response judgment strategy is derived. This response judgment strategy can be understood as determining when to retransmit instruction information, the number of retransmissions, and the interval time. The instruction retransmission parameters for different instruction numbers can be the same or different.

[0134] On the one hand, by setting command retransmission parameters, the retransmission interval and number of retransmissions can be flexibly controlled, which helps to configure reasonable retransmission strategies for different conditions (such as communication environment and requirements, and the importance of programmable commands), thereby improving the success rate and stability of communication. On the other hand, by generating a response judgment strategy based on the preset interval duration and number of retransmissions, it can be ensured that commands are continuously attempted to be sent within the specified number of retransmissions, which helps to overcome problems such as interference or packet loss that may occur in communication, and improves the robustness of communication. Furthermore, by reasonably configuring the retransmission interval duration and number of retransmissions, excessive retransmissions can be avoided while ensuring communication success, reducing the consumption of communication resources while optimizing communication performance. Moreover, by setting command retransmission parameters and generating response judgment strategies, retransmission situations in communication can be effectively handled, and corresponding prompt information can be generated as needed, improving the user's perception and understanding of the communication status and enhancing the user experience.

[0135] In summary, by parsing command retransmission parameters and generating corresponding response judgment strategies, the goal of flexibly controlling command retransmission and optimizing communication performance is achieved, thereby improving communication robustness and user experience.

[0136] This embodiment does not limit the values ​​of the preset interval duration and the preset number of retransmissions. The preset interval duration is, for example, 10 seconds, 15 seconds or 20 seconds, and the preset number of retransmissions is, for example, 3 times, 5 times or 8 times.

[0137] As an example, the process of obtaining the response judgment strategy includes: parsing the command retransmission parameters. If the command retransmission parameters are "5 seconds, 3 times", it means that the command retransmission interval is 5 seconds, and it will be retransmitted a maximum of 3 times. Based on the command retransmission parameters in the example above, the response judgment strategy could be to wait 5 seconds after each command transmission and repeat the retransmission a maximum of 3 times. If no response is received from the lower-level machine after 3 retransmissions, it is judged as an abnormal response.

[0138] In some embodiments, the method for obtaining the instruction retransmission parameter may include:

[0139] By using the correspondence between instruction sequence numbers and preset retransmission parameters, the instruction retransmission parameter corresponding to the instruction sequence number can be retrieved from multiple preset retransmission parameters; or...

[0140] The programmable instruction input parameter prediction model corresponding to the instruction sequence number is used to obtain the instruction retransmission parameters corresponding to the instruction sequence number.

[0141] There are two ways to obtain instruction retransmission parameters: First, a pre-established correspondence (table) between instruction numbers and instruction retransmission parameters. When the retransmission parameters corresponding to a specific instruction number are needed, the corresponding preset retransmission parameters are found by querying the correspondence. Second, the instruction number and its corresponding programmable instruction input parameters are used as input, and a prediction model is used to predict or calculate the instruction retransmission parameters corresponding to the instruction number. The prediction model can be built based on historical data or statistical methods, inferring the predicted values ​​of the instruction retransmission parameters based on the known instruction number and its corresponding programmable instruction input parameters.

[0142] On the one hand, by leveraging the correspondence or predictive model between command sequence numbers and preset retransmission parameters, command retransmission parameters can be flexibly obtained. The corresponding parameters can be automatically retrieved based on the specific command sequence number, reducing the workload and possibility of errors in manual configuration and making the configuration of command retransmission parameters more convenient and flexible. On the other hand, different command sequence numbers may correspond to different command retransmission parameters. By establishing a correspondence table or using a predictive model, personalized command retransmission parameters can be set for each command sequence number. This allows for providing the most suitable retransmission parameters for the characteristics and requirements of different commands, further optimizing communication performance and stability. Furthermore, by reasonably setting command retransmission parameters, retransmission operations can be performed promptly during communication, improving communication reliability. Based on the preset retransmission interval and number of retransmissions, response information can be quickly obtained and appropriately processed according to the command retransmission parameter settings, further improving communication efficiency.

[0143] In summary, by querying the correspondence between instruction sequence numbers and preset retransmission parameters or by querying parameter prediction models, instruction retransmission parameters can be flexibly obtained. Individual settings can be made for the retransmission parameters of each instruction, enabling personalized settings and improving the reliability and efficiency of communication.

[0144] The training process of the parameter prediction model may include:

[0145] Obtain a training set, which includes multiple training data sets, each of which includes a program control instruction and the labeled data of the program control instruction;

[0146] For each training data point in the training set, the following processing is performed:

[0147] The programmable instructions in the training data are input into a preset deep learning model to obtain the predicted data of the programmable instructions;

[0148] Based on the predicted and labeled data from the programmable instructions, the model parameters of the deep learning model are updated.

[0149] The system checks whether the preset training termination condition is met; if so, the trained deep learning model is used as the parameter prediction model; if not, the first deep learning model is trained again using the next training data.

[0150] Therefore, by designing and establishing an appropriate number of neural computing nodes and a multi-layered computational hierarchy, and selecting suitable input and output layers, a pre-defined first deep learning model can be obtained. Through the learning and optimization of this pre-defined deep learning model, a functional relationship from input to output can be established. Although it is not possible to find a 100% accurate functional relationship between input and output, it can approximate the real-world correlation as closely as possible. The parameter prediction model trained in this way has high accuracy and reliability in its prediction results.

[0151] In some embodiments, the present application embodiments may use the above-described training process to train the parameter prediction model; in other embodiments, the present application embodiments may use a pre-trained parameter prediction model.

[0152] As an example, it contains multiple instructions, each with a unique instruction number. A set of predefined retransmission parameters is also provided, including different retransmission intervals and retransmission counts.

[0153] The correspondence between instruction sequence number and preset retransmission parameters is as follows:

[0154] The preset retransmission parameters corresponding to instruction number 1 are: retransmission interval = 100ms, number of retransmissions = 3;

[0155] The preset retransmission parameters corresponding to instruction number 2 are: retransmission interval = 200ms, retransmission count = 2 times;

[0156] The preset retransmission parameters corresponding to instruction number 3 are: retransmission interval duration = 150ms, retransmission count = 4 times.

[0157] When the host computer sends a command, it can retrieve the corresponding command retransmission parameters from the preset retransmission parameters based on the command sequence number.

[0158] The host computer sent a command with command number 2. According to the correspondence between command number and preset retransmission parameters, the command retransmission parameters are: retransmission interval is 200ms and retransmission count is 2.

[0159] Therefore, different parameter values ​​can be set according to system design and requirements. The specific values ​​of the preset retransmission parameters can be adjusted according to actual conditions to adapt to different communication environments and requirements. The retransmission interval and number of retransmissions can be set according to communication stability requirements and the response capability of the lower-level machine to ensure that commands can be reliably received and executed by the lower-level machine.

[0160] See Figure 3 , Figure 3 This is a schematic diagram of a process for generating prompt information provided in an embodiment of this application.

[0161] In some embodiments, generating and displaying the prompt information (i.e., S40) may include:

[0162] S41: Obtain the level parameter corresponding to the instruction information;

[0163] S42: When the level parameter indicates that the instruction information is a strong instruction, generate the prompt information and display it using the host computer.

[0164] Therefore, based on the instruction information, a corresponding level parameter is obtained. This level parameter can be considered to describe the importance or priority of the instruction. The level parameter can serve as a basis for judging the importance of the instruction. Based on the obtained level parameter, the importance of the instruction information is judged. If the level parameter indicates that the instruction information is a strong instruction, i.e., it has high importance, then a corresponding prompt message is generated. This prompt message can be used to remind the user of the importance of the instruction, thereby attracting greater attention. Then, the prompt message is displayed to the user using the host computer.

[0165] On the one hand, by setting the priority parameters, the priority of different instruction information can be distinguished. Dividing instruction information into strong instructions and other types of instructions (weak instructions) helps to differentiate between important operations and general operations. On the other hand, only instruction information determined to be strong instructions will generate corresponding prompts and be displayed on the host computer, which can provide users with timely feedback on the execution status of important instructions, ensuring that they receive attention and are handled promptly.

[0166] In summary, by acquiring level parameters and determining whether the instruction information is a strong instruction, the operation of generating prompt information and displaying it using a host computer can distinguish important instructions from other instructions, and provide users with timely prompts and feedback on important operations, thereby improving the controllability and security of instruction execution.

[0167] This embodiment does not limit the representation of the level parameter, which can be, for example, level A, level B, or level seven. For example, level A corresponds to strong instructions, and level parameters other than level A correspond to weak instructions.

[0168] As an example, instructions to retrieve stimulator model, stimulator serial number, implanted electrode model, whether LFP function is supported, and battery level can be strong instructions. As another example, instructions to retrieve parameters such as stimulator operating status, stimulator implantation time, implantation patient information, and listening cycle can be weak instructions.

[0169] Strong and weak instructions can be used to describe the importance and execution requirements of instructions. Strong instructions can be understood as those that require the lower-level machine to respond before proceeding to the next step in the communication process. These are generally critical control instructions that require the lower-level machine to execute in a specified manner and promptly report the execution result back to the upper-level machine.

[0170] As an example, in an implantable neurostimulation system, the control command for obtaining the stimulator model is a strong command, used by the stimulator to provide the stimulator model to the programming device. After the host computer sends the strong command, it needs to wait for the stimulator's response and confirm that the command has been executed correctly before sending the next command.

[0171] Weak instructions can be understood as instructions that allow the host computer to continue sending the next instruction even if the lower-level computer cannot complete the response or the response is abnormal. These are usually auxiliary instructions that will not cause errors due to the inability to respond.

[0172] As an example, in an implantable neurostimulation system, the implantation time of the stimulator can be obtained via a weak command. Even if the stimulator cannot respond, the host computer can still continue to send query commands to obtain other information.

[0173] In some embodiments, the response determination strategy is executed using a timer / counter; the method may further include:

[0174] When the level parameter indicates that the instruction information is a strong instruction, the timer / counter is reset and S30 is executed for the instruction information;

[0175] When the level parameter indicates that the instruction information is a weak instruction, new instruction information is obtained and S20 is executed.

[0176] The beneficial effect of this technical solution is that, in the method of sending communication commands, the response judgment strategy is executed using a timer and counter. When the level parameter indicates that the command information is a strong command, the timer and counter are reset, and the response judgment result of the lower-level machine is obtained through the response judgment strategy to determine whether the lower-level machine has completed the response. When the level parameter indicates that the command information is a weak command, new command information is obtained, and the response judgment strategy is obtained based on the command information.

[0177] On the one hand, resetting the timer / counter and executing operation S30 allows for timely detection of strong command responses. If the lower-level device fails to respond, appropriate measures can be taken promptly, such as generating a prompt message and displaying it on the upper-level device. This helps operators promptly recognize abnormal responses to strong commands and take further action. On the other hand, because strong commands are crucial, resetting the timer / counter causes the command information to be retransmitted. This retransmission mechanism improves command reliability, ensuring that the lower-level device receives important commands and responds. Retransmission can compensate for potential communication problems or lower-level device reception failures, increasing the success rate of command transmission. Furthermore, for weak commands, new command information can be obtained, and a response judgment strategy can be applied to the new command information, ensuring the correct execution flow of the command information.

[0178] In summary, this technical solution, through the execution of a timer-counter in the response judgment strategy and the handling measures for strong commands, ensures the timely detection and processing of strong commands, increasing the reliability and sequentiality of commands. The timer-counter reset and retransmission mechanism provide opportunities for strong commands to be retransmitted, ensuring the reliability of their transmission and response. Similarly, for weak commands, they can be acquired and executed sequentially, ensuring the correct order of command execution. These beneficial effects improve the stability and reliability of communication commands, guaranteeing the correct transmission and response of important command information.

[0179] See Figure 4 , Figure 4 This is a schematic diagram of a process for obtaining a response judgment result provided in an embodiment of this application.

[0180] In some embodiments, obtaining the response judgment result of the lower-level machine through the response judgment strategy (i.e., S30) includes:

[0181] S31: Increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count; if not, execute S32; if yes, obtain new instruction information and execute S20.

[0182] S32: The host computer sends the instruction information to the slave computer, and the timer counter counts the time according to the preset interval.

[0183] S33: Within the preset interval, detect whether the host computer receives the response information sent by the slave computer; if yes, obtain new instruction information and execute S20; if no, execute S31.

[0184] Therefore, in this embodiment, the count of the timer / counter is incremented by one, and it is checked whether the count exceeds the preset retransmission count. If the count does not exceed the preset retransmission count, it indicates that retransmission is still possible. At this time, the host computer retransmits the instruction information to the slave computer, and the timer / counter is started to count according to the preset interval, ensuring that the host computer waits for the slave computer's response within the preset time interval. Within the preset interval, it is checked whether the host computer receives the response information sent by the slave computer. If the response information is received, it indicates that the slave computer has completed the response, and new instruction information can be obtained and a new round of response information detection can be performed. If no response information is received, S31 is executed and the next round of retransmission continues.

[0185] On the one hand, by controlling the timer / counter, the successful transmission of instructions and the response from the lower-level machine can be ensured. If the lower-level machine fails to respond, the instruction will continue to be sent according to the preset number of retransmissions until the lower-level machine responds successfully or the maximum number of retransmissions is reached, thereby improving the reliability of instruction information transmission and ensuring that the lower-level machine can respond and complete the response in a timely manner.

[0186] On the other hand, by setting the interval, a response from the lower-level machine can be waited for a certain period of time. If no response is received within the preset interval, the instruction information may be retransmitted, reducing response problems caused by communication errors or loss, and improving the stability and reliability of communication.

[0187] On the other hand, by processing the response results, different operations can be performed according to the importance of the instruction. For example, strong instructions will be resent and a response will be awaited to ensure their correct execution and response. Weak instructions will obtain new instruction information and continue execution to ensure the sequentiality and flow of instructions.

[0188] In summary, the timer / counter execution and retransmission mechanism based on the response judgment strategy can improve the reliability of instruction information transmission, reduce the impact of communication errors, and optimize the instruction information execution flow. By using a mechanism of counting retransmissions, retransmission, and waiting for responses, the transmission and acknowledgment of strong instructions are ensured, while the sequential execution of weak instructions is handled simultaneously.

[0189] The preset number of retransmissions and the preset interval duration can be the preset number of retransmissions and the preset interval duration mentioned in S21, which will not be elaborated here.

[0190] In some embodiments, confirming whether the lower-level machine has completed the response based on the received response information includes:

[0191] The response information is parsed and the data is verified to determine whether the lower-level machine has completed the response.

[0192] The parsing process involves retrieving the received response information according to preset rules to extract the required information. The parsing process can operate based on the format and protocol of the data in the response information, such as parsing fixed-length fields or parsing text data according to a specific encoding format; this application does not impose any restrictions on this.

[0193] Data verification is a method used to detect whether errors or data corruption occur during data transmission. Examples of such methods include Cyclic Redundancy Check (CRC) and Parity Check. This application does not limit the types of data verification methods used.

[0194] Therefore, by parsing and verifying the response information, the integrity and correctness of the response information sent by the lower-level machine can be ensured. This helps reduce the risk of communication errors and data corruption, and improves the reliability of communication.

[0195] In a specific application scenario, this application embodiment also provides a method for sending communication commands, the method comprising:

[0196] Obtain instruction information sent by the host computer. The instruction information includes an instruction sequence number and instruction retransmission parameters. The instruction retransmission parameters are used to indicate the interval and number of times the instruction information is retransmitted. The instruction sequence number is used to indicate the program control instruction issued by the host computer to the slave computer.

[0197] The command retransmission parameters are parsed to obtain the preset interval duration and preset retransmission number of the command information; the response judgment strategy is obtained based on the preset interval duration and preset retransmission number.

[0198] The response judgment strategy is executed using a timer and counter to obtain the response judgment result of the lower-level machine. The response judgment result is used to indicate whether the lower-level machine has completed the response.

[0199] When the lower-level machine fails to respond, it obtains the level parameter corresponding to the instruction information; when the level parameter indicates that the instruction information is a strong instruction, it generates the prompt information and displays it using the upper-level machine. The prompt information is used to indicate that the instruction information response is abnormal.

[0200] The method further includes:

[0201] When the level parameter indicates that the instruction information is a strong instruction, the timer counter is reset and the response judgment strategy is executed again using the timer counter for the instruction information;

[0202] When the level parameter indicates that the instruction information is a weak instruction, new instruction information is obtained and the instruction retransmission parameters of the new instruction information are parsed to obtain the preset interval duration and preset retransmission number of the instruction information.

[0203] The step of using a timer / counter to execute the response judgment strategy to obtain the response judgment result of the lower-level machine includes:

[0204] Increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count;

[0205] If so, new instruction information is obtained and the instruction retransmission parameters of the new instruction information are parsed to obtain the preset interval duration and preset retransmission number of the instruction information.

[0206] If not, the host computer sends the instruction information to the slave computer, and the timer counter counts the time according to the preset interval.

[0207] Within the preset interval, it is detected whether the host computer receives the response information sent by the slave computer;

[0208] If so, new instruction information is obtained and the instruction retransmission parameters of the new instruction information are parsed to obtain the preset interval duration and preset retransmission number of the instruction information;

[0209] If not, increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count.

[0210] The methods for obtaining the instruction retransmission parameters include:

[0211] By using the correspondence between instruction sequence numbers and preset retransmission parameters, the instruction retransmission parameter corresponding to the instruction sequence number can be retrieved from multiple preset retransmission parameters; or...

[0212] The programmable instruction input parameter prediction model corresponding to the instruction sequence number is used to obtain the instruction retransmission parameters corresponding to the instruction sequence number.

[0213] Equipment Implementation Examples

[0214] This application also provides an electronic device whose specific implementation method and the technical effects achieved are the same as those described in the above method implementation method, and some contents will not be repeated.

[0215] The electronic device includes a memory and at least one processor, the memory storing a computer program, and the at least one processor being configured to execute the computer program to perform the following steps:

[0216] S10: Obtain instruction information sent by the host computer, the instruction information including instruction sequence number, the instruction sequence number being used to indicate the program control instruction issued by the host computer to the lower computer;

[0217] S20: Obtain the response judgment strategy based on the instruction information;

[0218] S30: Obtain the response judgment result of the lower-level machine through the response judgment strategy. The response judgment result is used to indicate whether the lower-level machine has completed the response.

[0219] S40: When the lower-level machine fails to respond, a prompt message is generated and displayed. The prompt message is used to indicate that the instruction information response is abnormal.

[0220] In some embodiments, the instruction information further includes instruction retransmission parameters, which indicate the interval and number of times the instruction information is retransmitted; when the at least one processor executes the computer program, it obtains a response judgment strategy based on the instruction information in the following manner:

[0221] The command retransmission parameters are parsed to obtain the preset interval duration and preset retransmission number of the command information;

[0222] The response judgment strategy is obtained based on the preset interval duration and the preset number of retransmissions.

[0223] In some embodiments, the at least one processor obtains real-time instruction retransmission parameters when executing the computer program in the following manner:

[0224] By using the correspondence between instruction sequence numbers and preset retransmission parameters, the instruction retransmission parameter corresponding to the instruction sequence number can be retrieved from multiple preset retransmission parameters; or...

[0225] The programmable instruction input parameter prediction model corresponding to the instruction sequence number is used to obtain the instruction retransmission parameters corresponding to the instruction sequence number.

[0226] In some embodiments, when the at least one processor executes the computer program, it generates and displays a prompt message in the following manner:

[0227] Obtain the level parameter corresponding to the instruction information;

[0228] When the level parameter indicates that the instruction information is a strong instruction, the prompt information is generated and displayed using the host computer.

[0229] In some embodiments, the response determination strategy is executed using a timer / counter;

[0230] When the at least one processor is configured to execute the computer program, it performs the following steps:

[0231] When the level parameter indicates that the instruction information is a strong instruction, the timer / counter is reset and S30 is executed for the instruction information;

[0232] When the level parameter indicates that the instruction information is a weak instruction, new instruction information is obtained and S20 is executed.

[0233] In some embodiments, when the at least one processor executes the computer program, it obtains the response judgment result of the lower-level machine through the response judgment strategy in the following manner:

[0234] S31: Increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count; if not, execute S32; if yes, obtain new instruction information and execute S20.

[0235] S32: The host computer sends the instruction information to the slave computer, and the timer counter counts the time according to the preset interval.

[0236] S33: Within the preset interval, detect whether the host computer receives the response information sent by the slave computer; if yes, obtain new instruction information and execute S20; if no, execute S31.

[0237] See Figure 5 , Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of this application.

[0238] Electronic device 10 may include, for example, at least one memory 11, at least one processor 12, and a bus 13 connecting different platform systems.

[0239] The memory 11 may include a (computer) readable medium in the form of volatile memory, such as random access memory (RAM) 111 and / or cache memory 112, and may further include read-only memory (ROM) 113.

[0240] The memory 11 also stores a computer program, which can be executed by the processor 12 to enable the processor 12 to implement the steps of any of the above methods.

[0241] The memory 11 may also include a utility 114 having at least one program module 115, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0242] Accordingly, processor 12 can execute the aforementioned computer program, and can also execute utility 114.

[0243] The processor 12 may employ one or more application-specific integrated circuits (ASICs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0244] Bus 13 can represent one or more types of bus structures, including a memory bus or memory controller, peripheral bus, graphics acceleration port, processor, or a local bus using any bus structure with multiple bus structures.

[0245] Electronic device 10 can also communicate with one or more external devices, such as keyboards, pointing devices, Bluetooth devices, etc., and with one or more devices capable of interacting with it, and / or with any device that enables it to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed through input / output interface 14. Furthermore, electronic device 10 can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 15. Network adapter 15 can communicate with other modules of electronic device 10 via bus 13. It should be understood that, although not shown in the figures, in practical applications, other hardware and / or software modules can be used in conjunction with electronic device 10, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.

[0246] System Implementation Examples

[0247] See Figure 6 , Figure 6 This is a structural block diagram of a medical system provided in an embodiment of this application.

[0248] This application also provides a medical system 1, which includes the electronic device 10, the host computer 20, and the slave computer 30 described in the device embodiment.

[0249] In some embodiments, the lower-level device includes a stimulator for implantation in a patient.

[0250] The host computer includes a programmable control device, which is used to receive configuration operations for stimulation parameters and establish a programmable connection with the stimulator.

[0251] This enables effective communication and control between the programmable device and the stimulator, improving the efficiency and reliability of the medical system and providing convenience for users in treating patients. It should be noted that, in this embodiment, "stimulator implanted in the patient's body" refers to implanting the entire stimulator or at least a portion of it into the patient's body.

[0252] In some embodiments, the electronic device is integrated on the stimulator; or, the electronic device is integrated on the programmable device.

[0253] Therefore, integrating electronic devices into stimulators or programmable devices can improve the integration and compactness of medical systems.

[0254] Storage Media Examples

[0255] This application also provides a computer-readable storage medium, the specific embodiments of which are consistent with the embodiments and technical effects achieved in the above method embodiments, and some contents will not be repeated.

[0256] The computer-readable storage medium stores a computer program that, when executed by at least one processor, implements the steps of any of the above methods or the functions of any of the above electronic devices.

[0257] A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. In embodiments of this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0258] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable storage medium may also be any computer-readable medium capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, or any suitable combination thereof. Program code for performing operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar programming languages. The program code may be executed entirely on a user computing device, partially on a user device, as a standalone software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to user computing devices via any type of network, including local area networks (LANs) or wide area networks (WANs), or they can be connected to external computing devices (e.g., via the Internet using an Internet service provider).

[0259] Program Product Examples

[0260] This application also provides a computer program product, the specific embodiments of which are consistent with the embodiments and technical effects achieved in the above method embodiments, and some contents will not be repeated.

[0261] The computer program product includes a computer program that, when executed by at least one processor, implements the steps of any of the above methods or the functions of any of the above electronic devices.

[0262] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer program product provided in an embodiment of this application.

[0263] The computer program product is used to implement the steps of any of the above methods or to implement the functions of any of the above fault detection devices. The computer program product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the computer program product of the present invention is not limited thereto; the computer program product may employ any combination of one or more computer-readable media.

[0264] It should be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple. It is worth noting that "at least one" can also be interpreted as "one or more".

[0265] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are configured to distinguish similar objects and are not necessarily configured to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0266] This application describes the invention from the perspectives of purpose, performance, progress, and novelty, and it meets the functional enhancement and use requirements emphasized by the Patent Law. The above description and drawings are merely preferred embodiments of this application and are not intended to limit this application. Therefore, all structures, devices, features, etc., that are similar to or identical to those of this application, i.e., all equivalent substitutions or modifications made in accordance with the scope of this patent application, shall fall within the scope of protection of this patent application.

Claims

1. A method for sending communication commands, characterized in that, The method is applied to an implantable neurostimulation system, wherein the host computer is a programmable device and the slave computer is a stimulator implanted in the patient's body. The method includes: S10: Obtain instruction information sent by the host computer. The instruction information includes an instruction sequence number and instruction retransmission parameters. The instruction sequence number is used to indicate the program control instruction issued by the host computer to the lower computer. The instruction retransmission parameters are used to indicate the interval and number of times the instruction information is retransmitted. S20: Parse the instruction retransmission parameters to obtain the preset interval duration and preset retransmission number, and obtain the response judgment strategy based on the preset interval duration and preset retransmission number; the response judgment strategy is used to determine when to retransmit the instruction information and the number of retransmissions and the interval time. S30: Obtain the response judgment result of the lower-level machine through the response judgment strategy. The response judgment result is used to indicate whether the lower-level machine has completed the response. S40: When the lower-level machine fails to respond, the level parameter corresponding to the instruction information is obtained. When the level parameter indicates that the instruction information is a strong instruction, a prompt message is generated and displayed by the upper-level machine. The prompt message is used to indicate that the instruction information response is abnormal. The strong instruction refers to an instruction that requires the lower-level machine to respond before the upper-level machine can proceed to the next operation during the communication process. The response determination strategy is executed using a timer / counter. The method further includes: When the level parameter indicates that the instruction information is a strong instruction, the timer / counter is reset and S30 is executed for the instruction information; When the level parameter indicates that the instruction information is a weak instruction, new instruction information is obtained and S20 is executed; The step of obtaining the response judgment result of the lower-level machine through the response judgment strategy includes: S31: Increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count; if not, execute S32; if yes, obtain new instruction information and execute S20. S32: The host computer sends the instruction information to the slave computer, and the timer counter counts the time according to the preset interval. S33: Within the preset interval, detect whether the host computer receives the response information sent by the slave computer; if yes, obtain new instruction information and execute S20; if no, execute S31.

2. The sending method according to claim 1, characterized in that, The methods for obtaining the instruction retransmission parameters include: By using the correspondence between instruction sequence numbers and preset retransmission parameters, the instruction retransmission parameter corresponding to the instruction sequence number can be retrieved from multiple preset retransmission parameters; or... The programmable instruction input parameter prediction model corresponding to the instruction sequence number is used to obtain the instruction retransmission parameters corresponding to the instruction sequence number.

3. An electronic device, characterized in that, In an implantable neurostimulation system, the host computer is a programmable device and the slave computer is a stimulator implanted in the patient's body. The electronic device includes a memory and at least one processor. The memory stores a computer program, and the at least one processor is configured to execute the computer program to perform the following steps. S10: Obtain instruction information sent by the host computer. The instruction information includes an instruction sequence number and instruction retransmission parameters. The instruction sequence number is used to indicate the program control instruction issued by the host computer to the lower computer. The instruction retransmission parameters are used to indicate the interval and number of times the instruction information is retransmitted. S20: Parse the instruction retransmission parameters to obtain the preset interval duration and preset retransmission number, and obtain the response judgment strategy based on the preset interval duration and preset retransmission number; The response judgment strategy is used to determine when to resend the instruction information, as well as the number of resends and the interval between resends; S30: Obtain the response judgment result of the lower-level machine through the response judgment strategy. The response judgment result is used to indicate whether the lower-level machine has completed the response. S40: When the lower-level machine fails to complete the response, it obtains the level parameter corresponding to the instruction information. When the level parameter indicates that the instruction information is a strong instruction, it generates a prompt message and displays it using the upper-level machine. The prompt message is used to indicate that the instruction information response is abnormal. The so-called strong instruction refers to an instruction that requires the lower-level machine to complete the response before the upper-level machine can proceed with the next operation during the communication process; The response determination strategy is executed using a timer / counter. When the at least one processor is configured to execute the computer program, it further performs the following steps: When the level parameter indicates that the instruction information is a strong instruction, the timer / counter is reset and S30 is executed for the instruction information; When the level parameter indicates that the instruction information is a weak instruction, new instruction information is obtained and S20 is executed; The step of obtaining the response judgment result of the lower-level machine through the response judgment strategy includes: S31: Increment the count of the timer counter by one, and check whether the count is greater than the preset retransmission count; if not, execute S32; if yes, obtain new instruction information and execute S20. S32: The host computer sends the instruction information to the slave computer, and the timer counter counts the time according to the preset interval. S33: Within the preset interval, detect whether the host computer receives the response information sent by the slave computer; if yes, obtain new instruction information and execute S20; if no, execute S31.

4. A medical system, characterized in that, The medical system includes: the electronic device, the host computer, and the slave computer as described in claim 3.

5. The medical system according to claim 4, characterized in that, The lower-level machine includes a stimulator for implantation in the patient's body; The host computer includes a programmable control device, which is used to receive configuration operations for stimulation parameters and establish a programmable connection with the stimulator.

6. The medical system according to claim 5, characterized in that, The electronic device is integrated into the stimulator; or, the electronic device is integrated into the programmable device.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by at least one processor, implements the steps of the method according to any one of claims 1-2, or implements the function of the electronic device according to claim 3.

8. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by at least one processor, implements the steps of the method according to any one of claims 1-2, or implements the function of the electronic device according to claim 3.

Citation Information

Patent Citations

  • Determination method and device for discarded data, electronic equipment and storage medium

    CN115276916A