Automated testing methods, apparatus, devices, systems, and storage media

By simulating the working parameters of real hardware using virtual hardware and acquiring control strategies using deep learning models, this approach solves the critical conditions and human intervention issues in existing hardware automation testing technologies, achieving low-cost and high-efficiency automated testing.

CN115145776BActive Publication Date: 2026-02-17SCENERAY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210886915.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2026-02-17
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

Existing technologies in hardware automation testing, especially in hardware-software interaction, struggle to meet certain critical conditions or require manual intervention, resulting in high testing costs and low efficiency.

Method used

Virtual hardware is used to simulate real hardware. The control strategy of real hardware is obtained through deep learning models. Virtual hardware is used to simulate various working parameters of real hardware on automated testing equipment to ensure that the behavior is consistent with that of real hardware.

Benefits of technology

It enables diverse testing requirements to be met without relying on real hardware, reducing testing costs and manpower consumption, improving testing efficiency and stability, and is suitable for simulation testing of various hardware models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145776B_ABST
    Figure CN115145776B_ABST
Patent Text Reader

Abstract

This application provides an automated testing method, apparatus, device, system, and storage medium. The automated testing device is equipped with virtual hardware, which is used to simulate real hardware to perform automated testing in place of the real hardware. The method includes: acquiring the test conditions of the real hardware; simulating the real hardware under the test conditions using the virtual hardware; and when the virtual hardware receives a test command sent by an external device, performing at least one of the following processes: sending feedback information corresponding to the test command to the external device; generating a visual result corresponding to the test command and displaying it on a display device. By using software to simulate various operating parameters of the real hardware, the various behaviors of the virtual hardware are completely consistent with those of the real hardware, thereby replacing the real hardware for automated testing and saving testing costs.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automatic testing, implantable devices, deep learning, and in particular to an automatic testing method, device, equipment, system and storage medium. BACKGROUND

[0002] In the prior art, when testing hardware, especially when testing the interaction between hardware and software, various parameters of the hardware need to be set, but it is sometimes very difficult to directly set the hardware parameters, some critical conditions cannot be met, or some operations must be manually intervened to complete, which obviously cannot meet the requirements of automatic testing.

[0003] For example, to test whether the performance of the software of a mobile phone meets the requirements under various conditions of 1% to 100% (at intervals of 1%) of the battery level, 100 conditions of 1% to 100% of the battery level of the mobile phone need to be created. The charging time needs to be controlled, and these conditions are tested one by one by human intervention, which is very inconvenient and time-consuming.

[0004] Therefore, the present application provides an automatic testing method, device, equipment, system and storage medium to solve the above problems in the prior art. SUMMARY

[0005] The purpose of the present application is to provide an automatic testing method, device, equipment, system and storage medium, which simulates various working parameters of real hardware using software, and uses virtual hardware to replace real hardware for automatic testing, thereby saving testing costs.

[0006] The purpose of the present application is achieved by adopting the following technical solutions:

[0007] In a first aspect, the present application provides an automatic testing method applied to an automatic testing device, wherein the automatic testing device is equipped with virtual hardware, and the virtual hardware is used to simulate real hardware to replace the real hardware for automatic testing.

[0008] The method comprises:

[0009] Obtaining a test condition of the real hardware, wherein the test condition is used to indicate a test parameter value of a working parameter of the real hardware;

[0010] Simulating the real hardware under the test condition using the virtual hardware;

[0011] When the virtual hardware receives a test instruction sent by an external device, the virtual hardware performs at least one of the following processing: sending feedback information corresponding to the test instruction to the external device; generating a visual result corresponding to the test instruction and displaying it on a display device.

[0012] The real hardware includes at least one of the following: a stimulator, a mobile phone, a tablet computer, and a charger.

[0013] The technical solution has the beneficial effects that various working parameters of the real hardware (such as a stimulator, a mobile phone, a tablet computer, and a charger) are simulated by software, so that the behaviors of the virtual hardware are completely consistent with those of the real hardware, and thus the virtual hardware can be used to replace the real hardware for automated testing, thereby saving testing costs.

[0014] The above method is applied to an automated testing device, which is equipped with non-physical virtual hardware. The virtual hardware is not real hardware, but software for simulating real hardware. The software is referred to as virtual hardware, which is distinguished from real hardware. The virtual hardware can simulate real hardware under different working parameters, such as a real hardware with full battery, a real hardware with depleted battery, a real hardware with a hardware temperature of -30 degrees Celsius, and a real hardware with a hardware temperature of 120 degrees Celsius.

[0015] Since the virtual hardware is used to simulate the automated testing process of the real hardware, it is necessary to determine the test conditions under which the software will simulate the real hardware during the automated testing process using the virtual hardware. Therefore, the test conditions (or test environment, test requirements) of the real hardware to be tested are first obtained. The test conditions can indicate the test parameter values of the working parameters of the real hardware. Different test conditions correspond to different test parameter values of the working parameters. Second, the virtual hardware is used to simulate the real hardware under the test conditions, that is, the control strategy of the virtual hardware during operation is adjusted, so that the virtual hardware is consistent with the behaviors of the real hardware under the same test conditions. When the external device sends a (automated) test instruction to the virtual hardware, the virtual hardware receives the test instruction and sends feedback information corresponding to the test instruction to the external device or generates a visual result corresponding to the test instruction and displays it.

[0016] The advantage of this is that various working parameters of real hardware do not need to be set, the problem that real hardware cannot meet some critical conditions (for example, working near absolute zero) or some operations must be manually intervened to be completed (for example, testing the manual reset function) is solved, the dependence of the real hardware on the automatic test process of various software is broken, the conditions for automation testing are provided, and diversified automation testing requirements are met. On the one hand, it is convenient to simulate critical conditions that real hardware cannot reach or is difficult to reach, such as a temperature of absolute zero or a position at an altitude of 8000 meters. Since the virtual hardware can simulate real hardware working under any test condition and is not limited by the above critical conditions, it can meet the testing needs of workers (test personnel, developers, etc.), and is highly flexible. On the one hand, it does not need human assistance to achieve, and realizes a truly automated test process, with low labor costs. On the one hand, even if the test conditions that can be met by real hardware in the prior art are used to perform automated testing using the virtual hardware provided by the present application, the testing cost is also lower. As long as the type and test condition of the real hardware simulated by the software are switched, one automated test device can be used to simulate multiple models of real hardware working under multiple test conditions, for example, the same virtual hardware can simulate an A model mobile phone with a power of 30%, a B model mobile phone with a built-in 5G chip, a C model stimulator with 2 electrode leads, a D model charger with a hardware temperature of 26 degrees Celsius, etc. Compared with testing using real hardware, the time for switching and placing multiple real hardware is reduced, and the occupied space of multiple real hardware is reduced. On the other hand, using one automated test device and directly setting the test parameter values of each working parameter can complete the automated test process, without waiting for the real hardware to reach various test conditions, which is more stable and reduces the time and difficulty of creating test conditions for real hardware, greatly saving the waiting time of the workers, improving the testing efficiency, and being simple to operate, avoiding human errors.

[0017] In some optional embodiments, the virtual hardware and the real hardware use the same communication protocol to communicate with the external device.

[0018] The technical scheme has the beneficial effects that: the virtual hardware completely complies with the communication protocol (i.e., a communication protocol) of the real hardware and external devices (for example, a cloud server or other electronic devices), such as an instruction A for querying a device power, for the real hardware (for example, a mobile phone), the instruction A should be returned to the current mobile phone power; for the virtual hardware, the instruction A is also returned to the current power of the virtual hardware. The advantage of this is that the virtual hardware and the real hardware are completely consistent in the communication interface and in the communication process, so that the virtual hardware can completely replace the entity hardware to test the performance of the real hardware in running various software (for example, program-controlled software, take-out software, instant messaging software) under a certain working parameter (power).

[0019] In some optional embodiments, the simulating the real hardware under the test condition by using the virtual hardware comprises:

[0020] obtaining a control strategy of the real hardware under the test condition, the control strategy comprising one or more of the following strategies: a power strategy, a memory strategy, a background process limiting strategy, a display strategy, an animation strategy, a communication strategy, and a sharing strategy;

[0021] controlling the running process of the virtual hardware on the automatic test device by using the obtained control strategy, so that the virtual hardware is consistent with the performance of the real hardware under the test condition when responding to the test instruction.

[0022] The technical scheme has the beneficial effects that: in order to make the virtual hardware consistent with the performance of the real hardware under the same test condition when responding to the test instruction, the same control strategy as the real hardware is used to control the running process of the virtual hardware, and the control strategy comprises a power strategy, a memory strategy, a background process limiting strategy, a display strategy, an animation strategy, a communication strategy, and a sharing strategy, etc., so as to ensure that the virtual hardware and the real hardware are completely consistent in performance in the corresponding functions of power control, memory control, background process limitation, display control, animation effect control, communication control, and sharing limitation.

[0023] In some optional embodiments, the obtaining the control strategy of the real hardware under the test condition comprises:

[0024] inputting the test condition into a control strategy model to obtain the control strategy corresponding to the test condition;

[0025] The training process of the control strategy model can comprise:

[0026] obtaining a training set, the training set comprising a plurality of training data, each training data comprising a sample parameter value of a working parameter of the real hardware and corresponding labeled data of a control strategy;

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

[0028] The sample parameter value of the working parameter of the real hardware is input to the preset deep learning model to obtain the prediction data of the corresponding control strategy;

[0029] Based on the prediction data and the labeled data of the corresponding control strategy result, the model parameters of the deep learning model are updated;

[0030] It is detected whether the preset training end condition is met; if yes, the trained deep learning model is taken as the control strategy model; if no, the next training data is used to continue training the deep learning model.

[0031] The technical scheme has the beneficial effects that: by designing, establishing an appropriate amount of neuron calculation nodes and a multi-layer operation hierarchy structure, and selecting appropriate input layers and output layers, the preset deep learning model can be obtained, the function relationship from input to output is established through the learning and optimization of the deep learning model, although the function relationship between input and output cannot be found 100%, but the real correlation relationship can be approximated as much as possible, and thus the control strategy model trained can predict the corresponding output data based on any input data, has a wide application range, and has high accuracy and reliability of the calculation result.

[0032] In some optional embodiments, the visualization result corresponding to the test instruction includes front-end content and background content;

[0033] The method further includes:

[0034] The selection operation of the user on the display element in the front-end content is received by using the interactive device;

[0035] In response to the selection operation, the background content corresponding to the selected display element is determined by using the virtual hardware;

[0036] The background content corresponding to the selected display element and other background content are differentially displayed by using the display device in different display manners.

[0037] The beneficial effects of the technical solution are that the visual result corresponding to the test instruction includes front-end content and background content. On the one hand, the working parameters in the front-end content are visualized, which facilitates the staff to understand the current test conditions adopted and the real-time change of the working parameters in the entire automated test process. On the other hand, the background content (i.e., the code lines, code blocks, etc. corresponding to the running process) of the virtual hardware is visualized, which makes the parameter interaction message between the external device and the virtual hardware transparent and facilitates the positioning of the discovered problems. For example, the real hardware simulated by the software is a stimulator. In the automated test process of the program control software, the program control software is carried on the external device, and the virtual hardware is sent a test instruction such as a stimulation control instruction to adjust the voltage amplitude of the stimulation pulse signal of the stimulator to 5V. The staff finds that the virtual hardware does not adjust the voltage amplitude of the stimulation pulse signal based on the stimulation control instruction. Therefore, the staff selects the display element in the front-end content corresponding to the voltage amplitude on the virtual hardware, and directly observes the given upper limit of the voltage amplitude of the virtual hardware through the background code corresponding to the selected display element. The voltage amplitude in the stimulation control instruction is greater than the given upper limit, which leads to adjustment failure. The staff can then adjust the allowed control upper limit of the program control software so that it does not exceed 4.5V, thereby avoiding the adjustment failure when the program control software is used by the doctor or the patient in the future.

[0038] In some optional embodiments, the real hardware is a stimulator, the stimulator is used to be implanted in a patient, and the stimulator includes an IPG and at least one electrode lead;

[0039] The working parameters of the stimulator include one or more of a hardware parameter, a software parameter, a communication parameter, and a log parameter;

[0040] The hardware parameter includes one or more of an electrode lead number, an electrode lead model, an electrode lead implantation position, an electrode contact number, a physical impedance, a chip type, a magnetic switch state, an electric quantity, a signal strength, a hardware temperature, an environmental humidity, a charging state, a voltage, and a current;

[0041] The software parameter includes one or more of a current mode, a listening period, pairing information, bound patient information, a stimulation mode, and a stimulation program;

[0042] The communication parameter includes a communication mode;

[0043] The log parameter includes one or more of an IPG running state log, an IPG running exception log, a working duration, a stimulation duration, a communication duration, and an activation number.

[0044] The technical scheme has the beneficial effects that: the virtual hardware is used to simulate various working parameters of the stimulator, and diversified test functions are provided. Since the stimulator product is expensive, the test process of the prior art has a high cost, and saturation test cannot be performed. The automatic test device provided in the application greatly reduces the test cost and test time, facilitates various automatic tests on the stimulator, further improves the safety of the stimulator, and improves the treatment effect of the stimulator as a whole, thereby improving the market prospect of the implantable medical device.

[0045] In some optional embodiments, the real hardware is a mobile phone.

[0046] The working parameters of the mobile phone include one or more of the following: power, signal strength, hardware temperature, environmental humidity, charging status, voltage, current, position, and posture.

[0047] The technical scheme has the beneficial effects that: the virtual hardware is used to simulate various working parameters of the mobile phone, and diversified test functions are provided.

[0048] In a second aspect, the application provides an automatic test device, which is applied to an automatic test equipment, and the automatic test equipment is provided with virtual hardware, and the virtual hardware is used to simulate real hardware to replace the real hardware for automatic test.

[0049] The device includes:

[0050] A condition module is configured to acquire a test condition of the real hardware, and the test condition is used to indicate a test parameter value of a working parameter of the real hardware.

[0051] An simulation module is configured to simulate the real hardware under the test condition by using the virtual hardware.

[0052] An execution module is configured to, when the virtual hardware receives a test instruction sent by an external device, execute at least one of the following processes by using the virtual hardware: sending feedback information corresponding to the test instruction to the external device; and generating a visual result corresponding to the test instruction and displaying the visual result on a display device.

[0053] The real hardware includes at least one of the following: a stimulator, a mobile phone, a tablet computer, and a charger.

[0054] In some optional embodiments, the virtual hardware and the real hardware use the same communication protocol to communicate with the external device.

[0055] In some optional embodiments, the simulation module is configured to:

[0056] obtaining a control policy of the real hardware under the test condition, the control policy comprising one or more of the following policies: an electric quantity policy, a memory policy, a background process limiting policy, a display policy, an animation policy, a communication policy, and a sharing policy;

[0057] controlling a running process of the virtual hardware on the automated test device by using the obtained control policy, so that the virtual hardware is consistent with the real hardware under the test condition in performance when responding to the test instruction.

[0058] In some optional embodiments, the simulation module obtains the control policy of the real hardware under the test condition in the following manner:

[0059] inputting the test condition into a control policy model to obtain a control policy corresponding to the test condition;

[0060] The training process of the control policy model can include:

[0061] obtaining a training set, the training set comprising a plurality of training data, each training data comprising a sample parameter value of a working parameter of the real hardware and corresponding labeled data of a control policy;

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

[0063] inputting the sample parameter value of the working parameter of the real hardware into a preset deep learning model to obtain predicted data of the corresponding control policy;

[0064] updating model parameters of the deep learning model based on the predicted data and the labeled data of the corresponding control policy result;

[0065] detecting whether a preset training end condition is met; if yes, the trained deep learning model is used as the control policy model; if no, the deep learning model is continuously trained by using the next training data.

[0066] In some optional embodiments, the visualized result corresponding to the test instruction comprises front-end content and background content;

[0067] The apparatus further comprises a positioning module, configured to:

[0068] receiving, by using an interactive device, a selection operation of a user on a display element in the front-end content;

[0069] determining, by using the virtual hardware, background content corresponding to the selected display element in response to the selection operation;

[0070] The display device is used to display the background content corresponding to the selected display element and other background content in different display manners.

[0071] In some optional embodiments, the real hardware is a stimulator for implanting in a patient, and the stimulator includes an IPG and at least one electrode lead;

[0072] The working parameters of the stimulator include one or more of a hardware parameter, a software parameter, a communication parameter, and a log parameter;

[0073] The hardware parameter includes one or more of an electrode lead number, an electrode lead model, an electrode lead implantation position, an electrode contact number, a physical impedance, a chip type, a magnetic switch state, an electric quantity, a signal strength, a hardware temperature, an environmental humidity, a charging state, a voltage, and a current;

[0074] The software parameter includes one or more of a current mode, a listening period, pairing information, bound patient information, a stimulation mode, and a stimulation program;

[0075] The communication parameter includes a communication mode;

[0076] The log parameter includes one or more of an IPG running state log, an IPG running exception log, a working duration, a stimulation duration, a communication duration, and an activation number.

[0077] In some optional embodiments, the real hardware is a mobile phone;

[0078] The working parameters of the mobile phone include one or more of an electric quantity, a signal strength, a hardware temperature, an environmental humidity, a charging state, a voltage, a current, a position, and a posture.

[0079] In a third aspect, the present application provides an automatic test device, wherein the automatic test device is equipped with a virtual hardware, and the virtual hardware is used to simulate a real hardware to replace the real hardware for automatic test;

[0080] The automatic test device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the methods or the functions of any one of the apparatuses when executing the computer program.

[0081] In a fourth aspect, the present application provides an automatic test system, wherein the automatic test system includes:

[0082] Any one of the automatic test devices;

[0083] An external device is used to send a test instruction to the automatic test device;

[0084] A display device for providing a display function.

[0085] An interactive device for providing an interactive function.

[0086] In a fifth aspect, the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps of any of the above methods or to implement the functions of any of the above apparatuses. BRIEF DESCRIPTION OF DRAWINGS

[0087] The present application will be further described below in conjunction with the accompanying drawings and embodiments.

[0088] Figure 1 A structural block diagram of an automatic test system provided by an embodiment of the present application is shown.

[0089] Figure 2 A flowchart of an automatic test method provided by an embodiment of the present application is shown.

[0090] Figure 3 A flowchart of simulating real hardware by using virtual hardware provided by an embodiment of the present application is shown.

[0091] Figure 4 A flowchart of locating a problem by using virtual hardware provided by an embodiment of the present application is shown.

[0092] Figure 5 A structural diagram of an automatic test apparatus provided by an embodiment of the present application is shown.

[0093] Figure 6 A structural block diagram of an automatic test device provided by an embodiment of the present application is shown.

[0094] Figure 7 A structural diagram of a program product provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0095] The technical solutions in the present application will be described below in conjunction with the accompanying drawings and embodiments of the present application. It should be noted that, under the premise of no conflict, the following described embodiments or technical features can be combined to form new embodiments.

[0096] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple 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, and a and b and c, wherein a, b and c can be single or multiple. It should be noted that "at least one" can also be interpreted as "one or more".

[0097] It should be further noted that in the embodiments of the present application, the words "exemplary" or "for example" are used to represent an example, illustration or description. Any implementation or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other implementation or design scheme. Rather, the use of "exemplary" or "for example" is intended to present the relevant concept in a specific manner.

[0098] Next, first, one of the application fields (i.e. implantable devices) of the embodiments of the present application is simply described.

[0099] An implantable neurostimulation system (an implantable medical system) mainly comprises a stimulator implanted in a patient's body and a programming device arranged outside the patient's body. The existing neuromodulation technology mainly implants an electrode in a specific structure (i.e., a target point) in the body through stereotactic surgery, and the stimulator implanted in the patient's body delivers an electrical pulse to the target point through the electrode to modulate the electrical activity and function of the corresponding nerve structure and network, thereby improving symptoms and relieving pain. Among them, the stimulator can be any one of an implantable neurostimulation device, an implantable cardiac electrical stimulation system (also known as a cardiac pacemaker), an implantable drug delivery device (IDDS), and a lead adapter device. The implantable neurostimulation device is, for example, a deep brain stimulation system (DBS), an implantable cortical nerve stimulation system (CNS), an implantable spinal cord stimulation system (SCS), an implantable sacral nerve stimulation system (SNS), an implantable vagus nerve stimulation system (VNS), etc.

[0100] The stimulator can include an IPG, an extension lead, and an electrode lead. The IPG (implantable pulse generator) is arranged in the patient's body, receives the programming instructions sent by the programming device, relies on a sealed battery and a circuit to provide controllable electrical stimulation energy to the tissue in the body, and delivers one or two controllable specific electrical stimulations to a specific region of the tissue in the body through the implanted extension lead and electrode lead. The extension lead is used in conjunction with the IPG as a transmission medium for electrical stimulation signals, and transmits the electrical stimulation signals generated by the IPG to the electrode lead. The electrode lead delivers electrical stimulation to a specific region of the tissue in the body through a plurality of electrode contacts. The stimulator is provided with one or more electrode leads on one side or both sides, and a plurality of electrode contacts are arranged on the electrode lead. The electrode contacts can be uniformly arranged or non-uniformly arranged on the circumference of the electrode lead. As an example, the electrode contacts can be arranged in a 4-row 3-column array (a total of 12 electrode contacts) on the circumference of the electrode lead. The electrode contacts can include stimulation electrode contacts and / or collection electrode contacts. The electrode contacts can have, for example, a sheet shape, a ring shape, a point shape, etc.

[0101] In some possible embodiments, the stimulated in-vivo tissue can be brain tissue of a patient, and the stimulated site can be a specific site of the brain tissue. The stimulated site is generally different when the patient has different types of diseases, and the number of stimulation contacts (single source or multiple sources) used, the use of one or more (single channel or multiple channels) specific electrical stimulation signals, and the stimulation parameter data are also different. The embodiments of the present application do not limit the applicable disease types, which can be applicable to deep brain stimulation (DBS), spinal cord stimulation (SCS), pelvic stimulation, stomach stimulation, peripheral nerve stimulation, and functional electrical stimulation. Among them, the disease types that can be treated or managed by DBS include but are not limited to: convulsive diseases (for example, epilepsy), pain, migraine, mental diseases (for example, major depressive disorder (MDD)), bipolar disorder, anxiety disorder, post-traumatic stress disorder, mild depression, obsessive-compulsive disorder (OCD), behavioral disorder, emotional disorder, memory disorder, mental state disorder, movement disorder (for example, essential tremor or Parkinson's disease), Huntington's disease, Alzheimer's disease, drug addiction, autism, or other neurological or psychiatric diseases and impairments.

[0102] In the embodiments of the present application, when the program control device and the stimulator establish a program control connection, the program control device can be used to adjust the stimulation parameters of the stimulator (different stimulation parameters correspond to different electrical stimulation signals), or the stimulator can be used to sense the bioelectricity of the deep brain of the patient to collect the electrophysiological signals, and the collected electrophysiological signals can be used to continue to adjust the stimulation parameters of the electrical stimulation signals of the stimulator.

[0103] The stimulation parameters can include at least one of the following: frequency (for example, the number of electrical stimulation pulse signals per unit time 1s, in Hz), pulse width (the duration of each pulse, in μs), amplitude (generally represented by voltage, that is, the intensity of each pulse, in V), timing (for example, continuous or triggered), stimulation mode (including one or more of current mode, voltage mode, timed stimulation mode, and cyclic stimulation mode), doctor control upper and lower limits (range adjustable by the doctor), and patient control upper and lower limits (range adjustable by the patient).

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

[0105] The programmable device can be a doctor programmable device (i.e., a programmable device used by a doctor) or a patient programmable device (i.e., a programmable device used by a patient). The doctor programmable device can be, for example, a smart terminal device such as a tablet computer, a notebook computer, a desktop computer, a mobile phone, etc. equipped with programmable software. The patient programmable device can be, for example, a smart terminal device such as a tablet computer, a notebook computer, a desktop computer, a mobile phone, etc. equipped with programmable software, and can also be other electronic devices with programmable functions (e.g., a charger with programmable functions, a data acquisition device).

[0106] The embodiments of the present application do not limit the data interaction between the doctor programmable device and the stimulator. When the doctor remotely programs, the doctor programmable device can interact with the stimulator through the server and the patient programmable device. When the doctor programs offline and face-to-face with the patient, the doctor programmable device can interact with the stimulator through the patient programmable device, and the doctor programmable device can also directly interact with the stimulator.

[0107] In some optional embodiments, the patient programmable device can include a host (communicating with the server) and a slave (communicating with the stimulator), and the host and the slave are communicable. The doctor programmable device can interact with the server through a 3G / 4G / 5G network, the server can interact with the host through a 3G / 4G / 5G network, the host can interact with the slave through a Bluetooth protocol / WIFI protocol / USB protocol, and the slave can interact with the stimulator through a 401MHz-406MHz operating frequency band / 2.4GHz-2.48GHz operating frequency band. The doctor programmable device can directly interact with the stimulator through a 401MHz-406MHz operating frequency band / 2.4GHz-2.48GHz operating frequency band.

[0108] In addition to the application field of the above-mentioned implantable device, the embodiments of the present application can also be applied to the technical field of other medical devices or even non-medical devices, and the embodiments of the present application do not limit this. As long as it is applied to occasions involving automatic testing, the instructions sent by the external device to the virtual hardware can not be limited to test instructions.

[0109] System embodiments

[0110] Reference Figure 1 , Figure 1 A structural block diagram of an automatic test system provided by an embodiment of the present application is shown.

[0111] An automatic test system is provided by an embodiment of the present application, and the automatic test system comprises:

[0112] An automatic test device 10;

[0113] An external device 20 is configured to send test instructions to the automated test device;

[0114] A display device 30 is configured to provide a display function.

[0115] An interactive device 40 is configured to provide an interactive function.

[0116] The external device 20 is not limited in the embodiments of the present application, and for example, can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, a local server, a cloud server, or the external device 20 can be a workstation or a console.

[0117] The interactive device 40 is not limited in the embodiments of the present application, and for example, can be a mobile phone, a tablet computer, a notebook computer, a desktop computer, a smart wearable device, or the like, or the interactive device 40 can be a workstation or a console.

[0118] The embodiments of the present application do not limit the manner of receiving various manual operations (or user operations) by the interactive device 40. According to the input manner, the operations can include, for example, text input operations, audio input operations, video input operations, key operations, mouse operations, keyboard operations, smart stylus operations, and the like. These operations include, but are not limited to, parameter setting operations, selection operations, and the like.

[0119] In some optional embodiments, the automated test device 10 can be integrated with the external device 20. The "external" of the external device 20 is external with respect to the "real hardware" and the "virtual hardware". That is, the external device 20 can be equipped with a first software for data interaction with the real hardware, and the automated test device 10 is equipped with a second software for simulating the real hardware. The first software and the second software can be installed on the same electronic device. The virtual hardware simulated by the second software is used to automatically test the first software, for example, to test possible problems of the first software running on the real hardware. The first software can be, for example, program control software, take-out software, instant messaging software, map software, and the like.

[0120] In some optional embodiments, the automated test device 10 can be integrated with the display device 30.

[0121] In some optional embodiments, the automated test device 10 can be integrated with the interactive device 40.

[0122] In some optional embodiments, the automated test device 10 can be integrated with the display device 30 and the interactive device 40.

[0123] In some optional embodiments, the automated test device 10 can be integrated with the external device 20, the display device 30, and the interactive device 40.

[0124] In the embodiments of the present application, the automated test device 10 is equipped with virtual hardware, which is used to simulate real hardware to replace the real hardware for automated testing. The automated test device 10 includes a memory and a processor. The memory stores a computer program, and the processor implements the steps of the automated test method or the functions of the automated test device when executing the computer program. Hereinafter, the automated test method will be described first.

[0125] Method embodiments

[0126] Referring to Figure 2 , Figure 2 A flowchart of an automated test method provided by the embodiments of the present application is shown.

[0127] The embodiments of the present application provide an automated test method applied to an automated test device. The automated test device is equipped with virtual hardware, which is used to simulate real hardware to replace the real hardware for automated testing.

[0128] The method includes:

[0129] Step S101: Obtain a test condition of the real hardware, the test condition being used to indicate a test parameter value of a working parameter of the real hardware.

[0130] Step S102: Simulate the real hardware under the test condition by using the virtual hardware.

[0131] Step S103: When the virtual hardware receives a test instruction sent by an external device, the virtual hardware performs at least one of the following processes: sending feedback information corresponding to the test instruction to the external device; generating a visual result corresponding to the test instruction and displaying the visual result on a display device.

[0132] The real hardware includes at least one of the following: a stimulator, a mobile phone, a tablet computer, and a charger.

[0133] In this way, the software simulates various working parameters of the real hardware (for example, a stimulator, a mobile phone, a tablet computer, and a charger), so that the various behaviors of the virtual hardware are completely consistent with those of the real hardware. Thus, the virtual hardware can be used to replace the real hardware for automated testing, thereby saving the test cost.

[0134] The above method is applied to an automated test device, which is equipped with a non-physical virtual hardware, which is not a real hardware, but a software for simulating a real hardware, which is called a virtual hardware, and its purpose is to distinguish from a real hardware. The virtual hardware can simulate a real hardware under different working parameters, for example, it can simulate a real hardware with full power, or a real hardware with low power; it can simulate a real hardware with a hardware temperature of minus 30 degrees Celsius, or a real hardware with a hardware temperature of 120 degrees Celsius, etc.

[0135] Since the virtual hardware is used to simulate the automated test process of the real hardware, it is necessary to determine the test condition under which the software will simulate the real hardware during the automated test using the virtual hardware. Therefore, the test condition (or test environment, test requirement) of the real hardware to be tested is first obtained, which can indicate the test parameter value of the working parameter of the real hardware. Different test conditions correspond to different test parameter values of the working parameter. Secondly, the virtual hardware simulates the real hardware under the test condition, that is, the control strategy of the virtual hardware during operation is adjusted, so that the virtual hardware is consistent with the behaviors of the real hardware under the same test condition. When the external device sends a (automated) test instruction to the virtual hardware, the virtual hardware receives the test instruction and sends feedback information corresponding to the test instruction to the external device or generates a visual result corresponding to the test instruction and displays it.

[0136] The advantage of this is that there is no need to set various working parameters of the real hardware, and the problem that the real hardware cannot meet some critical conditions (such as working near absolute zero) or some operations must be manually intervened (such as testing the manual reset function) is solved, and the dependence of the automated test process of various software on the real hardware is eliminated, providing conditions for automated testing and meeting diversified automated testing requirements.

[0137] On the one hand, it is convenient to simulate critical conditions that the real hardware cannot reach or is difficult to reach, such as a temperature of absolute zero and a position at an altitude of 8000 meters. Since the virtual hardware can simulate a real hardware working under any test condition and is not limited by the above critical conditions, it can meet the testing needs of workers (test personnel, developers, etc.), and has high flexibility.

[0138] On the one hand, it does not require manual assistance to achieve a truly automated test process, and the labor cost is low.

[0139] On the one hand, even if the test conditions that can be met by the real hardware in the prior art, the cost of testing is lower by using the virtual hardware provided in the present application. As long as the type of real hardware simulated by the software and the test conditions are switched, one automated testing device can be used to simulate a plurality of types of real hardware working under a plurality of test conditions. For example, the same virtual hardware can simulate a model A mobile phone with a 30% power level, a model B mobile phone with a built-in 5G chip, a model C stimulator with 2 electrode leads, and a model D charger with a hardware temperature of 26 degrees Celsius. Compared with testing using real hardware, the time for switching and placing multiple real hardware is reduced, and the space occupied by multiple real hardware is reduced.

[0140] On the other hand, using one automated testing device, the test parameter values of each working parameter can be directly set to complete the automated testing process, without waiting for the real hardware to reach various test conditions. The stability is higher, and the time and difficulty of creating test conditions for real hardware are reduced, greatly saving the waiting time of the staff, improving the testing efficiency, and avoiding human errors.

[0141] As an example, the real hardware is a stimulator, and the test instruction is, for example, a query instruction to query the power level, stimulation mode, physical impedance, communication mode, and stimulation duration of the stimulator. The feedback information corresponding to the stimulation instruction can be, for example, "power level: 65%; stimulation mode: timed stimulation mode; physical impedance: 2&3, 2.7KΩ; communication mode: LFP; stimulation duration: 236 days". Among them, the physical impedance: 2&3, 2.7KΩ means that the impedance between the 2nd electrode contact and the 3rd electrode contact is 2.7KΩ. LFP (Local Field Potential) is the local field potential of the in-vivo tissue or nucleus. The in-vivo tissue can be, for example, brain tissue or other in-vivo tissue. The local field potential is a special kind of electrophysiological signal. In a living body, the dendritic synaptic activity in a biological tissue with a certain volume will cause an electric current. When this electric current flows through the extracellular space with a certain impedance, a certain voltage distribution is formed, and the local voltage value recorded at a certain point is called the local field potential.

[0142] As another example, the real hardware is a mobile phone, and the test instruction is to display food business within 500 meters around position A on the mobile phone. The visual result corresponding to the test instruction includes front-end content and back-end content. The front-end content is the recommended information of the food business within 500 meters around position A, and the back-end content is the page source code corresponding to the front-end content.

[0143] In some optional embodiments, the virtual hardware and the real hardware use the same communication protocol to communicate with the external device.

[0144] Thus, the virtual hardware fully complies with the communication protocol (i.e. the communication protocol) of the real hardware and the external device (for example, a cloud server, other electronic devices), such as instruction A for querying the device power. For the real hardware (for example, a mobile phone), receiving the instruction A should return the current mobile phone power; for the virtual hardware, receiving the instruction A also returns the current power of the virtual hardware. The advantage of this is to ensure the consistency of the virtual hardware and the real hardware in the communication interface and in the communication process. Therefore, to test the performance of the real hardware in running various software (such as program-controlled software, take-out software, instant messaging software) on a certain working parameter (power), virtual hardware can completely replace physical hardware.

[0145] The communication protocol (English: Communications Protocol, also known as transmission protocol) in the field of telecommunications refers to: the system standard that allows two or more terminals in the transmission system to propagate information in any physical medium, and also refers to the common language of computer communication or network equipment. The communication protocol defines the syntax, semantics and synchronization rules in communication, and the possible error detection and correction. The communication protocol can be implemented between hardware, software or both. In the embodiments of the present application, the communication protocol used by the virtual hardware (non-physical hardware, a kind of development software) and the external device for communication is completely consistent with the communication protocol used by the real hardware (which is simulated by the virtual hardware) and the external device for communication.

[0146] The communication protocol is not limited in the embodiments of the present application, and for example, can include one or more of the following: ARP (Address Resolution Protocol), BGP, BOOTP, Bonjour, CAN (CANbus), DHCP (Dynamic Host Configuration Protocol), DNS, DVMRP (Distance-Vector Multicast Routing Protocol), DDNS, EGP (Exterior Gateway Protocol), FTP (File Transfer Protocol), FTPS, GIT, Gopher, HDLC, HELLO, HTTP, HTTPS, ICMP, IDRP (InterDomain Routing Protocol), IEEE 802, IGMP, IGP (Interior Gateway Protocol), IMAP, IP, IPX, IS-IS, LCP (Link Control Protocol), LLC (Logical Link Control), LBRY, MLD (Multicast Listener Discovery), NCP (Network Control Protocol), NNTP, NTP, PPP (Point-to-Point Protocol), POP (Post Office Protocol), RARP, RIP (Routing Information Protocol), RTP, RTSP (Real Time Streaming Protocol), RSVP, SLIP (Serial Link Internet Protocol), SNMP (Simple Network Management Protocol), SMTP, SIP, SOCKS, SPDY, TCP (Transmission Control Protocol), TFTP (Trivial File Transfer Protocol), Telnet, UDP (User Datagram Protocol), X.25, Yahoo! Messenger Instant Messaging Protocol, and the like.

[0147] The standard of Bluetooth is IEEE 802.15.1, and the Bluetooth protocol works in the 2.45 GHz of the unlicensed ISM (Industrial Scientific Medical) frequency band. In order to avoid interference with other protocols that can use 2.45 GHz, the Bluetooth protocol divides the frequency band into 79 channels (with a bandwidth of 1 MHz), and the channel switching can reach 1600 times per second.

[0148] Referring to Figure 3 , Figure 3 A flowchart for simulating real hardware by using virtual hardware is shown.

[0149] In some optional embodiments, the step S102 comprises:

[0150] Step S201: obtaining a control strategy of the real hardware under the test condition, the control strategy comprising one or more of the following strategies: power strategy, memory strategy, background process limitation strategy, display strategy, animation strategy, communication strategy and sharing strategy;

[0151] Step S202: controlling the running process of the virtual hardware on the automated test equipment by using the obtained control strategy, so that the virtual hardware is consistent with the performance of the real hardware under the test condition when responding to the test instruction.

[0152] Thus, in order to make the virtual hardware consistent with the performance of the real hardware under the same test condition when responding to the test instruction, the same control strategy as the real hardware is used to control the running process of the virtual hardware, and the control strategy comprises power strategy, memory strategy, background process limitation strategy, display strategy, animation strategy, communication strategy and sharing strategy, etc., which ensures that the virtual hardware and the real hardware are completely consistent in performance in corresponding functions such as power control, memory control, background process limitation, display control, animation effect control, communication control and sharing limitation.

[0153] The power strategy may, for example, comprise high-performance mode, balance mode and power-saving mode.

[0154] The memory strategy may, for example, comprise high-memory mode, medium-memory mode and low-memory mode.

[0155] The background process limitation strategy may, for example, comprise no limitation, standard limitation, no background process allowed, not more than 1 process, not more than 2 processes, not more than 3 processes, not more than 4 processes, etc.

[0156] The display strategy is used to indicate one or more of the following display parameters: display mode, font style, font size, font thickness, brightness, contrast, saturation, exposure, hue, gray scale, color temperature, resolution, refresh rate and zoom ratio.

[0157] The animation strategy may, for example, comprise animation duration, transition animation zoom ratio, window animation zoom ratio, etc.

[0158] The communication strategy may, for example, be used to indicate the opening and closing of communication functions such as 5G, 4G, 3G, 2G, WIFI, Bluetooth, NFC, etc.

[0159] The sharing strategy may, for example, be used to indicate the network sharing state and the shared data transmission state.

[0160] In some optional embodiments, the step S201 comprises:

[0161] inputting the test condition into the control strategy model to obtain a control strategy corresponding to the test condition;

[0162] The training process of the control strategy model can comprise:

[0163] obtaining a training set comprising a plurality of training data, each of the training data comprising a sample parameter value of a working parameter of the real hardware and corresponding labeled data of a control strategy;

[0164] For each of the training data in the training set, the following processing is performed:

[0165] inputting the sample parameter value of the working parameter of the real hardware into a preset deep learning model to obtain predicted data of the corresponding control strategy;

[0166] updating model parameters of the deep learning model based on the predicted data and the labeled data of the corresponding control strategy result;

[0167] detecting whether a preset training end condition is met; if yes, the trained deep learning model is taken as the control strategy model; if no, the deep learning model is continuously trained using the next training data.

[0168] Thus, by designing, a suitable number of neuron calculation nodes and a multi-layer operation hierarchy structure are established, and a suitable input layer and output layer are selected, so that the preset deep learning model is obtained. Through learning and optimization of the deep learning model, a function relationship from input to output is established. Although the function relationship between input and output cannot be found 100%, the real correlation relationship can be approximated as much as possible. Therefore, the control strategy model trained can predict corresponding output data based on any input data, has a wide application range, and has high accuracy and reliability of calculation results.

[0169] In some optional embodiments, the control strategy model can be trained by the embodiments of the application. In other optional embodiments, the embodiments of the application can use a pre-trained control strategy model.

[0170] In some optional embodiments, historical data can be mined to obtain sample parameter values and corresponding labeled data of a control strategy in the training set, etc. The sample parameter values in the training set can also be automatically generated by using a generation network of a GAN model.

[0171] The GAN model is a generative adversarial network, which is composed of a generative network and a discriminative network. The generative network randomly samples from a latent space as input, and the output result needs to imitate the real samples in the training set as much as possible. The input of the discriminative network is the real sample or the output of the generative network, and the purpose is to distinguish the output of the generative network from the real sample as much as possible. The generative network tries to deceive the discriminative network as much as possible. The two networks are in mutual opposition and constantly adjust the parameters, and the ultimate goal is to make the discriminative network unable to judge whether the output result of the generative network is real. Using the GAN model can generate multiple sample parameter values for the model training process, which can effectively reduce the amount of original data collection and greatly reduce the cost of data collection and labeling.

[0172] The embodiment of the application does not limit the acquisition method of the labeled data. For example, the artificial labeling method can be used, or the automatic labeling or semi-automatic labeling method can be used.

[0173] The embodiment of the application does not limit the training process of the control policy model. For example, the training method of supervised learning can be used, or the training method of semi-supervised learning can be used, or the training method of unsupervised learning can be used.

[0174] The embodiment of the application does not limit the preset training end condition. For example, it can be that the number of training reaches a preset number (the preset number is, for example, 1, 3, 10, 100, 1000, 10000, etc.), or the training data in the training set can be trained once or more, or the total loss value obtained by this training is not greater than a preset loss value.

[0175] Referring to Figure 4 , Figure 4 A flowchart for positioning a problem using virtual hardware is shown.

[0176] In some optional embodiments, the visualization result corresponding to the test instruction includes front-end content and background content.

[0177] The method further includes:

[0178] Step S104: receiving, by the interactive device, a selection operation of a user on a display element in the front-end content;

[0179] Step S105: in response to the selection operation, determining, by the virtual hardware, background content corresponding to the selected display element.

[0180] Step S106: Differentiate and display the background content corresponding to the selected display element and other background content in different display manners by using the display device.

[0181] Thus, the visualization result corresponding to the test instruction includes the front-end content and the background content. On the one hand, the work parameters in the front-end content are visualized, which facilitates the staff to understand the current test conditions and the real-time change of the work parameters in the entire automated test process. On the other hand, the background content of the virtual hardware (i.e., the code lines, code blocks, etc. corresponding to the running process) is visualized, which makes the parameter interaction message between the external device and the virtual hardware transparent and facilitates the positioning of the discovered problems.

[0182] As an example, the real hardware simulated by the software is a stimulator. In the automated test process of the program control software, the program control software is carried on the external device, and sends a test instruction such as a stimulation control instruction to the virtual hardware to adjust the voltage amplitude of the stimulation pulse signal of the stimulator to 5V. The staff finds that the virtual hardware does not adjust the voltage amplitude of the stimulation pulse signal based on the stimulation control instruction. Therefore, the staff selects the display element in the front-end content corresponding to the voltage amplitude on the virtual hardware, and directly observes the background code corresponding to the selected display element to find that the given upper limit of the voltage amplitude of the virtual hardware is 4.5V (i.e., the stimulator firmware only allows the voltage amplitude to be adjusted within the range of not higher than 4.5V), and the voltage amplitude in the stimulation control instruction is greater than the given upper limit, resulting in adjustment failure. The staff can then adjust the allowed control upper limit of the program control software to be not higher than 4.5V, so as to avoid the adjustment failure when the program control software is used by the doctor or the patient in the future, and improve the safety of the program control process, and ensure that the electrical stimulation treatment on the patient is always within a safe range.

[0183] In some optional embodiments, the real hardware is a stimulator, and the stimulator is used to be implanted in a patient, and the stimulator includes an IPG and at least one electrode lead.

[0184] The work parameters of the stimulator include one or more of a hardware parameter, a software parameter, a communication parameter, and a log parameter;

[0185] The hardware parameter includes one or more of an electrode lead number, an electrode lead model, an electrode lead implantation position, an electrode contact number, a physical impedance, a chip type, a magnetic switch state, an electric quantity, a signal strength, a hardware temperature, an environmental humidity, a charging state, a voltage, and a current;

[0186] The software parameter includes one or more of a current mode, a listening period, pairing information, bound patient information, a stimulation mode, and a stimulation program;

[0187] The communication parameter includes a communication mode;

[0188] The log parameters include one or more of IPG running state logs, IPG running exception logs, working time length, stimulation time length, communication time length, and activation times.

[0189] Thus, various working parameters of the virtual hardware simulation stimulator are utilized to provide diversified testing functions. Since the stimulator product is expensive, the testing process of the prior art has a high cost and cannot perform saturation testing. The automatic testing device provided by the present application greatly reduces the testing cost and testing time, facilitates various automatic testing of the stimulator, further improves the safety of the stimulator, and improves the overall treatment effect of the stimulator, thereby improving the market prospect of the implantable medical device.

[0190] The number of electrode leads may be, for example, 1, 2, 3, 4, and the like.

[0191] The electrode lead model may be represented by, for example, one or more of Chinese, letters, numbers, and symbols.

[0192] The electrode lead implantation position may be, for example, the left brain or the right brain.

[0193] The number of electrode contacts may be, for example, 4, 6, 8, 12, 16, 24, 36, and the like.

[0194] The physical impedance may be, for example, 2KΩ, 4KΩ, 6KΩ, 8KΩ, and the like.

[0195] The chip type may be, for example, a single-mode stimulation chip, a dual-mode stimulation chip, and the like.

[0196] The magnetic switch state may be, for example, on or off.

[0197] The power may be represented by, for example, a percentage.

[0198] The signal strength may include, for example, the signal strength of each communication chip.

[0199] The hardware temperature may be, for example, -100, -50, -20, 0, 20, 30, 50, 100, 200, 1000 degrees Celsius, and the like.

[0200] The environmental humidity may be, for example, the absolute humidity or the relative humidity of the test environment.

[0201] The charging state may be, for example, charging or non-charging.

[0202] The voltage may be, for example, 0V, 1V, 2V, 3V, 4V, 5V, and the like.

[0203] The current may be, for example, 0.01mA, 0.1mA, 0.5mA, 1mA, 2mA, and the like.

[0204] The current mode can be, for example, a surgery mode, a standard mode, a safety mode, etc.

[0205] The listening period can be, for example, 15 seconds, 1 minute, 5 minutes, etc.

[0206] The pairing information can include, for example, identification information of a programming device (which is in a programmed connection with the IPG).

[0207] The binding patient information can include, for example, a name, a date of birth, a gender, an implant hospital, an implant date, etc. of a patient to which the IPG is bound.

[0208] The stimulation mode can include, for example, one or more of a current mode, a voltage mode, a timed stimulation mode, and a cyclic stimulation mode, each of which is used to determine a type and a timing of a stimulation program.

[0209] The stimulation program is used to indicate at least one of the following parameters of a stimulation pulse signal: a frequency (e.g. a number of stimulation pulse signals per unit time 1s, in Hz), a pulse width (a duration of each pulse, in μs), an amplitude (generally expressed in voltage, i.e. an intensity of each pulse, in V), and a timing (e.g. can be continuous or triggered).

[0210] The software parameters can further include a physician control upper limit and a lower limit (a range that can be adjusted by a physician) and a patient control upper limit and a lower limit (a range that can be autonomously adjusted by a patient).

[0211] In some optional embodiments, the real hardware is a mobile phone;

[0212] The working parameters of the mobile phone include one or more of a power level, a signal strength, a hardware temperature, an ambient humidity, a charging status, a voltage, a current, a position, and an attitude.

[0213] In this way, the virtual hardware is used to simulate a plurality of working parameters of the mobile phone, thereby providing diversified testing functions.

[0214] The position can be expressed, for example, by using longitude and latitude, or by using a preset spatial rectangular coordinate system.

[0215] The attitude can be expressed, for example, by using three attitude angles, i.e. a pitch angle, a roll angle, and a yaw angle.

[0216] Device embodiment

[0217] Referring to Figure 5 , Figure 5 A structure schematic diagram of an automatic testing device provided by an embodiment of the present application is shown.

[0218] The embodiment of the application further provides an automatic testing device, and specific embodiments and achieved technical effects of the automatic testing device are consistent with those of the method embodiment.

[0219] The embodiment of the application further provides an automatic testing device, and specific embodiments and achieved technical effects of the automatic testing device are consistent with those of the method embodiment.

[0220] The device comprises:

[0221] The condition module 101 is configured to acquire a test condition of the real hardware, and the test condition is used to indicate a test parameter value of a working parameter of the real hardware.

[0222] The simulation module 102 is configured to simulate the real hardware in the test condition by using the virtual hardware.

[0223] The execution module 103 is configured to, when the virtual hardware receives a test instruction sent by an external device, execute at least one of the following processes by using the virtual hardware: sending feedback information corresponding to the test instruction to the external device; and generating a visual result corresponding to the test instruction and displaying the visual result on a display device.

[0224] The real hardware comprises at least one of the following: a stimulator, a mobile phone, a tablet computer and a charger.

[0225] In some optional embodiments, the virtual hardware and the real hardware use the same communication protocol to communicate with the external device.

[0226] In some optional embodiments, the simulation module 102 is configured to:

[0227] acquire a control strategy of the real hardware in the test condition, and the control strategy comprises one or more of the following strategies: an electric quantity strategy, a memory strategy, a background process limiting strategy, a display strategy, an animation strategy, a communication strategy and a sharing strategy;

[0228] The acquired control strategy is used to control a running process of the virtual hardware on the automatic testing device, so that the virtual hardware is consistent with the performance of the real hardware in the test condition when responding to the test instruction.

[0229] In some optional embodiments, the simulation module 102 acquires the control strategy of the real hardware in the test condition in the following manner:

[0230] The test condition is input into a control strategy model to obtain a control strategy corresponding to the test condition.

[0231] The training process of the control strategy model can include:

[0232] obtaining a training set, the training set including a plurality of training data, each of the training data including a sample parameter value of a working parameter of the real hardware and its corresponding labeled data of the control strategy;

[0233] for each training data in the training set, performing the following processing:

[0234] inputting the sample parameter value of the working parameter of the real hardware into a preset deep learning model to obtain the prediction data of the corresponding control strategy;

[0235] updating the model parameters of the deep learning model based on the prediction data and the labeled data of the corresponding control strategy result;

[0236] detecting whether a preset training end condition is met; if yes, the trained deep learning model is taken as the control strategy model; if no, the next training data is used to continue training the deep learning model.

[0237] In some optional embodiments, the visualization result corresponding to the test instruction includes front-end content and background content.

[0238] The apparatus further includes a positioning module 104, which is configured to:

[0239] receive, by using an interactive device, a selection operation of a user on a display element in the front-end content;

[0240] in response to the selection operation, determine, by using the virtual hardware, the background content corresponding to the selected display element;

[0241] differentially display, by using the display device, the background content corresponding to the selected display element and other background content in different display manners.

[0242] In some optional embodiments, the real hardware is a stimulator for implanting in a patient, and the stimulator includes an IPG and at least one electrode lead.

[0243] The working parameters of the stimulator include one or more of a hardware parameter, a software parameter, a communication parameter, and a log parameter.

[0244] The hardware parameter includes one or more of an electrode lead number, an electrode lead model, an electrode lead implantation position, an electrode contact number, a physical impedance, a chip type, a magnetic switch state, an electric quantity, a signal strength, a hardware temperature, an environmental humidity, a charging state, a voltage, and a current.

[0245] The software parameters include one or more of a current mode, a listening period, pairing information, bound patient information, a stimulation mode, and a stimulation program;

[0246] The communication parameters include a communication mode;

[0247] The log parameters include one or more of an IPG running state log, an IPG running exception log, a working time length, a stimulation time length, a communication time length, and an activation number.

[0248] In some optional embodiments, the real hardware is a mobile phone;

[0249] The working parameters of the mobile phone include one or more of a power, a signal strength, a hardware temperature, an environmental humidity, a charging state, a voltage, a current, a location, and a posture.

[0250] Device embodiments

[0251] The embodiments of the present application further provide an automatic test device, which is equipped with a virtual hardware, the virtual hardware being used to simulate a real hardware to replace the real hardware for automatic test;

[0252] The automatic test device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the above methods or the functions of any one of the above devices when executing the computer program.

[0253] Referring to Figure 6 , Figure 6 A structural block diagram of an automatic test device provided by the embodiments of the present application is shown.

[0254] The automatic test device may, for example, include at least one memory 210, at least one processor 220, and a bus 230 connecting different platform systems.

[0255] The memory 210 can include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 211 and / or a cache memory 212, and can further include a read-only memory (ROM) 213.

[0256] The memory 210 further stores a computer program, which can be executed by the processor 220, so that the processor 220 implements the functions of any one of the above methods, the specific embodiments and the achieved technical effects of which are consistent with those described in the above method embodiments, and some contents will not be described again.

[0257] The memory 210 can also include a utilities 214 having at least one program module 215, such as an operating system, one or more application programs, other program modules, and program data, and each or certain combinations thereof can include implementation of a network environment.

[0258] In turn, the processor 220 can execute the aforementioned computer program, and can execute the utilities 214.

[0259] The processor 220 can employ one or more application-specific integrated circuits (ASICs) 220, DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic elements.

[0260] The bus 230 can be one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures, and the like.

[0261] The automated test equipment can also communicate with one or more external devices 240 such as a keyboard or a pointing device, a Bluetooth device, etc., further can communicate with one or more devices that enable a user to interact with the automated test equipment, and / or any devices (e.g., a router, a modem, etc.) that enable the automated test equipment to communicate with one or more other computing devices. Such communication can occur via the input / output interface(s) 250. Still yet, the automated test equipment can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or the Internet) through a network adapter 260. The network adapter 260 can communicate with the other modules of the automated test equipment through the bus 230. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with the automated test equipment. Such as, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0262] Medium embodiments

[0263] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps of any of the above methods or implement the functions of any of the above apparatuses. The specific embodiments and the achieved technical effects are the same as those described in the above method embodiments, and some contents will not be described herein.

[0264] Referring to Figure 7 , Figure 7 A structure schematic diagram of a program product provided by the embodiment of the present application is shown.

[0265] The program product is used to implement any of the above methods. The program product can adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and can run on a terminal device, for example, a personal computer. However, the program product of the present application is not limited to this, and in the embodiment of the present application, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, apparatus or device. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0266] A computer readable storage medium can include a data signal traveling in or on a carrier wave, in baseband, or in elements of a baseband and carrier wave combined. The program code embodied on the computer readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Computer readable program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).

[0267] The present application is described from the use, efficiency, progress and novelty, and meets the functional improvement and use requirements emphasized by the patent law. The above description and drawings are only the preferred embodiments of the present application, and are not limited to the present application. Therefore, all similar, similar, equivalent, and similar structures, devices, features, etc. of the present application, and all equivalent replacements or modifications made within the scope of the present application, shall be within the scope of the patent application protection.

Claims

1. An automated testing method, characterized by, The application is applied to an automated test equipment, and the automated test equipment is provided with virtual hardware used for simulating real hardware to replace the real hardware for automated test; The method comprises: obtaining a test condition of the real hardware, the test condition being used for indicating a test parameter value of a working parameter of the real hardware; simulating the real hardware under the test condition by using the virtual hardware, comprising: inputting the test condition into a control strategy model to obtain a control strategy corresponding to the test condition; the control strategy comprises one or more of the following strategies: power strategy, memory strategy, background process limiting strategy, display strategy, animation strategy, communication strategy and sharing strategy; controlling a running process of the virtual hardware on the automated test equipment by using the obtained control strategy, so that the virtual hardware is consistent with the performance of the real hardware under the test condition when responding to a test instruction; when the virtual hardware receives a test instruction sent by an external device, the virtual hardware performs at least one of the following processes: sending feedback information corresponding to the test instruction to the external device; generating a visual result corresponding to the test instruction and displaying it on a display device; wherein the real hardware comprises at least one of the following: stimulator; mobile phone; tablet computer; charger.

2. The automated testing method of claim 1, wherein, The virtual hardware and the real hardware use the same communication protocol to communicate with the external device.

3. The automated testing method of claim 1, wherein, The training process of the control strategy model comprises: obtaining a training set, the training set comprising a plurality of training data, each training data comprising sample parameter values of working parameters of the real hardware and corresponding labeled data of control strategies; for each training data in the training set, the following processing is performed: inputting the sample parameter values of the working parameters of the real hardware into a preset deep learning model to obtain prediction data of the corresponding control strategies; updating the model parameters of the deep learning model based on the prediction data and the labeled data of the corresponding control strategy results; detecting whether a preset training end condition is met; if yes, the trained deep learning model is used as the control strategy model; if no, the deep learning model is continuously trained by using the next training data.

4. The automated testing method of claim 1, wherein, The visual result corresponding to the test instruction comprises front-end content and background content; The method further comprises: receiving a selection operation of a user on a display element in the front-end content by using an interactive device; in response to the selection operation, determining the background content corresponding to the selected display element by using the virtual hardware; differentially displaying the background content corresponding to the selected display element and other background content in different display modes by using the display device.

5. The automated testing method of claim 1, wherein, The real hardware is a stimulator, which is implanted in a patient's body, and the stimulator comprises an IPG and at least one electrode lead; the working parameters of the stimulator comprise one or more of the following: hardware parameters, software parameters, communication parameters and log parameters; The hardware parameters include one or more of the following: number of electrode leads, electrode lead model, electrode lead implantation location, number of electrode contacts, physical impedance, chip type, magnetic switch state, power level, signal strength, hardware temperature, ambient humidity, charge status, voltage, and current; The software parameters include one or more of the following: current mode, listening period, pairing information, bound patient information, stimulation mode, and stimulation program; The communication parameters include a communication mode; The log parameters include one or more of the following: IPG operating status log, IPG operating exception log, working time length, stimulation time length, communication time length, and activation number.

6. The automated testing method of claim 1, wherein, The real hardware is a mobile phone; The working parameters of the mobile phone include one or more of the following: power level, signal strength, hardware temperature, ambient humidity, charge status, voltage, current, location, and posture.

7. An automated test device, characterized by, The application is applied to an automated test device, and the automated test device is provided with a virtual hardware, which is used to simulate a real hardware to replace the real hardware for automated test; The device comprises: A condition module is configured to acquire a test condition of the real hardware, and the test condition is used to indicate a test parameter value of a working parameter of the real hardware; A simulation module is configured to simulate the real hardware under the test condition by using the virtual hardware, comprising: inputting the test condition into a control strategy model to obtain a control strategy corresponding to the test condition; the control strategy comprises one or more of the following strategies: power level strategy, memory strategy, background process limiting strategy, display strategy, animation strategy, communication strategy, and sharing strategy; controlling a running process of the virtual hardware on the automated test device by using the acquired control strategy, so that the virtual hardware is consistent with the performance of the real hardware under the test condition when responding to a test instruction; An execution module is configured to, when the virtual hardware receives a test instruction sent by an external device, execute at least one of the following processes by using the virtual hardware: sending feedback information corresponding to the test instruction to the external device; generating a visual result corresponding to the test instruction and displaying the visual result on a display device; The real hardware comprises at least one of the following: a stimulator, a mobile phone, a tablet computer, and a charger.

8. An automated test equipment, characterized by, The automated test device is provided with a virtual hardware, which is used to simulate a real hardware to replace the real hardware for automated test; The automated test device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1-6 or the functions of the device according to claim 7 when executing the computer program.

9. An automated test system, characterized by, The automated test system comprises: The automated test device according to claim 8; An external device is configured to send a test instruction to the automated test device; A display device is configured to provide a display function; An interactive device is configured to provide an interactive function.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the method according to any one of claims 1-6 or the functions of the device according to claim 7.

Citation Information

Patent Citations

  • Strategy model training method and device, electronic equipment and storage medium

    CN113759709A

  • Hardware simulation test method and device

    CN114780315A