CN112134859B - 一种基于arm架构的聚焦超声治疗设备控制方法 - Google Patents

一种基于arm架构的聚焦超声治疗设备控制方法 Download PDF

Info

Publication number
CN112134859B
CN112134859B CN202010941501.5A CN202010941501A CN112134859B CN 112134859 B CN112134859 B CN 112134859B CN 202010941501 A CN202010941501 A CN 202010941501A CN 112134859 B CN112134859 B CN 112134859B
Authority
CN
China
Prior art keywords
control program
thread
interrupt
focused ultrasound
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010941501.5A
Other languages
English (en)
Other versions
CN112134859A (zh
Inventor
杨博
张胜发
古家玮
***
郭骏杰
魏博
吴昊
刘自豪
苏志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong Shende Medical Equipment Technology Co ltd
Shanghai Shende Wuchuang Era Medical Technology Co ltd
Shende Ningbo Medical Device Technology Co Ltd
Original Assignee
Nantong Shende Medical Equipment Technology Co ltd
Shanghai Shende Green Medical Era Healthcare Technology Co Ltd
Shende Ningbo Medical Device Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nantong Shende Medical Equipment Technology Co ltd, Shanghai Shende Green Medical Era Healthcare Technology Co Ltd, Shende Ningbo Medical Device Technology Co Ltd filed Critical Nantong Shende Medical Equipment Technology Co ltd
Priority to CN202010941501.5A priority Critical patent/CN112134859B/zh
Publication of CN112134859A publication Critical patent/CN112134859A/zh
Priority to EP21865505.8A priority patent/EP4203399A1/en
Priority to PCT/CN2021/082585 priority patent/WO2022052442A1/zh
Priority to AU2021341042A priority patent/AU2021341042B2/en
Priority to JP2023515867A priority patent/JP7492653B2/ja
Priority to KR1020237008434A priority patent/KR20230048542A/ko
Application granted granted Critical
Publication of CN112134859B publication Critical patent/CN112134859B/zh
Priority to US18/180,466 priority patent/US20230218275A1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B8/00Diagnosis using ultrasonic, sonic or infrasonic waves
    • A61B8/48Diagnostic techniques
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61NELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
    • A61N7/00Ultrasound therapy
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61NELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
    • A61N7/00Ultrasound therapy
    • A61N7/02Localised ultrasound hyperthermia
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0426Programming the control sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/3009Thread control instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4825Interrupt from clock, e.g. time of day
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61NELECTROTHERAPY; MAGNETOTHERAPY; RADIATION THERAPY; ULTRASOUND THERAPY
    • A61N7/00Ultrasound therapy
    • A61N2007/0086Beam steering
    • A61N2007/0091Beam steering with moving parts, e.g. transducers, lenses, reflectors
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23219Different tasks in different memory, called as function of priority of tasks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5021Priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Veterinary Medicine (AREA)
  • Radiology & Medical Imaging (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Biomedical Technology (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Automation & Control Theory (AREA)
  • Multimedia (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Surgical Instruments (AREA)
  • Ultra Sonic Daignosis Equipment (AREA)

Abstract

本发明涉及一种基于ARM架构的聚焦超声治疗设备控制方法,聚焦超声治疗设备连接有工作站以及运行Linux操作***的ARM嵌入式处理器,ARM嵌入式处理器中存储有第一控制程序,工作站中存储有第二控制程序,方法具体为:第一控制程序通过执行任务对聚焦超声治疗设备进行控制;任务包括内部事件和操作指令,内部事件包括第一控制程序的定时器事件和Linux内核的中断消息,第二控制程序通过工作站接收操作指令并发送至第一控制程序;第一控制程序包括主线程和工作线程,工作线程执行任务并对寄存器进行读写,同时主线程将任务执行结果反馈至第二控制程序。与现有技术相比,本发明具有响应及时、高并发和可靠性高等优点。

Description

一种基于ARM架构的聚焦超声治疗设备控制方法
技术领域
本发明涉及医疗技术领域,尤其是涉及一种基于ARM架构的聚焦超声治疗设备控制方法。
背景技术
聚焦超声治疗***是一种新型无创的治疗技术,以非侵入的方式将聚焦超声波能量传递到人体内。在约15-30秒内,位于超声波声束焦点处的组织被加热到不可逆的热凝固,而周围的组织仍然保持自然状态。随着时间的推移,人体逐渐吸收烧灼过的组织。聚焦超声治疗设备一般使用单片机或ARM嵌入***控制治疗超声探头移动,采用相控方式进行超声聚焦,控制功放***进行能量输出;同时需要监控水冷***、配电***等多个传感器的工作状态,并且能够在设备异常时尽快响应,停止能量输出。传统的嵌入式应用软件开发是面向设备的开发方式,即根据设备的功能和硬件情况来针对性的进行应用软件的开发。然而随着硬件和技术的发展,嵌入式应用软件的规模越来大,功能越来越复杂,这种软件架构所表现出来的弊端也越来越大,首先这种应用软件架构可复用性差,无法适应于非常复杂的业务场景,尤其是在需求变化时,需要大量的代码修改才能尽快适应新的业务逻辑。其次传统的嵌入式应用程序不能很好且一致性地处理请求消息和中断消息的优先级顺序,从而影响了业务处理的及时性和可靠性。因此传统的嵌入式程序控制架构因为缺乏高效性、可靠性和扩展性而不能适用。
发明内容
本发明的目的就是为了克服上述现有技术存在的缺陷而提供一种基于ARM架构的聚焦超声治疗设的控制方法,响应及时,可靠性高,扩展性好。
本发明的目的可以通过以下技术方案来实现:
一种基于ARM架构的聚焦超声治疗设备控制方法,所述的聚焦超声治疗设备连接有工作站以及运行Linux操作***的ARM嵌入式处理器,所述的ARM嵌入式处理器中存储有第一控制程序,所述的工作站中存储有第二控制程序,所述的第一控制程序和第二控制程序通过TCP/IP协议进行通讯,所述的方法具体为:
所述的第一控制程序通过执行任务对聚焦超声治疗设备进行控制,并将任务执行结果反馈至第二控制程序;
其中,所述的任务包括内部事件和操作指令,所述的操作指令包括控制指令和状态查询指令,所述的内部事件包括第一控制程序的定时器事件和Linux内核的中断消息,所述的第二控制程序通过工作站接收操作指令并发送至第一控制程序;
所述的第一控制程序包括主线程和工作线程,所述的主线程对任务进行优先级排序,所述的中断消息、控制指令、状态查询指令和定时器事件的优先级依次降低,所述的工作线程按照优先级顺序由高到低依次执行任务,根据任务执行结果对ARM嵌入式处理器的寄存器进行读写,实现对聚焦超声治疗设备的控制,同时主线程将任务执行结果反馈至第二控制程序,工作站通过用户界面呈现任务执行结果。
进一步地,所述的第一控制程序还包括信号线程,所述的任务还包括退出消息,所述的退出消息的优先级介于中断消息和控制指令之间,所述的信号线程通过关闭套接字向主线程发送退出消息,所述的信号线程接收到退出信号时关闭套接字,所述的信号线程通过关闭套接字向主线程发送退出消息,所述的退出信号包括SIGNINT和SIGTERM,由与ARM嵌入式处理器连接的操作终端发出,所述的套接字为Unix Socket Pair。
进一步地,所述的主线程收到Linux内核的中断消息时向工作线程发送Linux信号,所述的工作线程接收到Linux信号后中断当前任务,并执行中断响应处理函数而后再返回之前任务上下文并根据中断执行结果选择继续或终止任务,所述的Linux信号为SIGUSR1。
进一步地,所述的工作线程执行退出消息时关闭聚焦超声设备,释放***资源并安全退出。
进一步地,采用Google Protocol Buffer封装第一控制程序和第二控制程序之间的协议,便于协议扩展和兼容,适用范围广。
进一步地,所述的第一控制程序通过Netlink方式接收Linux内核的中断消息。
进一步地,所述的主线程通过libevent库接收任务,libevent库为轻量级、高性能的事件驱动库。
进一步地,所述的第一控制程序采用C++抽象机制,对任务进行封装,第一控制程序架构与业务处理逻辑无关,通过扩展封装机制进行业务逻辑扩展,扩展性和通用性强。
与现有技术相比,本发明具有以如下有益效果:
(1)本发明采用守护进程执行任务,主线程接收任务,并将任务按照优先等级排序,任务包括第二控制程序的控制指令和状态查询指令以及第一控制程序的Linux内核的中断消息和定时器事件,工作线程执行任务后将任务执行结果发送至主线程,主线程通过TCP/IP端口将任务执行结果发送至第二控制程序,主线程能够接收和缓存任务,避免消息拥塞,提高并发处理能力,聚焦超声治疗设备响应及时,同时任务的优先级排序进一步提高了聚焦超声治疗设备的响应及时性,可靠性高,实现对聚焦超声治疗设备各个工作模块的监控,在聚焦超声治疗设备发生故障时及时停止能量输出,安全性高,同时通过工作线程对寄存器进行读写,避免多个线程同时竞争而带来的加锁负担,进一步提高了任务的处理速度;
(2)本发明设置了信号线程,信号线程通过关闭套接字向主线程发送退出消息,主线程接收到退出消息后安全退出,从而避免了后台进程被突然结束时可能导致的***资源泄露和硬件损坏,增加***安全性;
(3)本发明采用Google Protocol Buffer封装第一控制程序和第二控制程序之间的协议,便于协议扩展和兼容,适用范围广;
(4)本发明通过Netlink方式实现第一控制程序和Linux内核之间的通信,Netlink方式支持双向通讯,Netlink方式支持双向通讯,可以由Linux内核发起,支持广播模式,当中断发生时Linux内核通过Netlink方式向主线程发送中断消息,确保中断通知消息时长短,响应及时,提高了聚焦超声治疗设备处理的可靠性;
(5)本发明采用C++抽象机制对第一控制程序的任务进行封装,第一控制程序架构与业务处理逻辑无关,通过扩展封装机制进行业务逻辑扩展,扩展性和通用性强。
附图说明
图1为本发明的方法流程图;
图2为本发明的程序控制架构图;
图3为本发明使用C++抽象机制对任务进行封装的类结构图;
具体实施方式
下面结合附图和具体实施例对本发明进行详细说明。本实施例以本发明技术方案为前提进行实施,给出了详细的实施方式和具体的操作过程,但本发明的保护范围不限于下述的实施例。
一种基于ARM架构的聚焦超声治疗设备控制方法,如图1,图2和图3,聚焦超声治疗设备连接有工作站以及运行Linux操作***的ARM嵌入式处理器,ARM嵌入式处理器中存储有第一控制程序,第一控制程序为采用C++抽象机制封装任务的聚焦超声控制程序fusd,工作站中存储有第二控制程序,第二控制程序为上位机治疗控制程序mrgfus,fusd和mrgfus通过TCP/IP协议进行通讯,采用Google Protocol Buffer封装mrgfus和fusd之间的协议,Linux内核启动完成时自动加载寄存器驱动程序register driver和中断驱动程序irqdriver;
控制方法具体为:
fusd包括主线程main、工作线程worker和信号线程signal,主线程通过libevent库接收任务,同时对任务进行优先级排序,工作线程按照任务优先级顺序由高到低依次调用register driver,通过总线对ARM嵌入式处理器的寄存器进行读写操作实现对聚焦超声治疗设备的控制,同时工作线程通过管道PIPE将任务执行结果发送至主线程,主线程将任务执行结果反馈至mrgfus,工作站通过用户交互界面呈现任务执行结果;
任务包括内部事件和操作指令,内部事件包括fusd的定时器事件、Linux内核的中断消息以及来自信号线程的退出消息,中断消息、退出消息、控制指令、状态查询指令和定时器事件的优先级依次降低;
irq driver负责接收通用中断控制器Generic Interrupt Controler的中断消息,并通过Netlink方式将中断消息发送至主线程,主线程收到Linux内核的中断消息时向工作线程发送Linux信号,所述的工作线程接收到Linux信号后中断当前任务,并执行中断响应处理函数,Linux信号为SIGUSR1;工作站线程从中断处理程序返回到任务上下文,会根据中断执行结果选择继续或终止执行任务;
操作指令包括控制指令和状态查询指令,mrgfus通过工作站的用户交互界面接收操作指令并发送至fusd;
信号线程通过关闭套接字向主线程发送退出消息,信号线程阻塞等待退出信号,退出信号包括SIGNINT和SIGTERM,由与ARM嵌入式处理器连接的操作终端发出或由Linux操作***发出,当信号线程接收到退出信号关闭套接字,套接字为Unix Socket Pair,工作线程执行退出消息时,关闭聚焦超声治疗设备,释放***资源并安全退出。
如图3,采用C++抽象机制建立IProto基类,内部定时器事件模板类ProtoTmpl和封装了Google Protocol Buffer的任务模板类PbProtoTmpl均继承于IProto,ResetProto类用于重置设备,InvalidProto类用于处理***异常,继承于ProtoTmpl,状态查询类MonitorProto、配置安装类ConfigureProto、功放控制类AmplifierProto和探头控制类XdcrProto需要和应用程序mrgfus进行协议交互,继承于PbProtoTmpl。后续新的任务扩充均可以分别新增继承于ProtoTmpl或PbProtoTmpl的类而无需改动其他代码。
实例:
用户在工作站的用户交互界面上设置治疗参数,即控制指令,治疗参数包括探头移动参数、能量设置参数和能量输出治疗参数,ARM嵌入式处理器控制聚焦超声治疗设备工作,mrgfus通过Google Protocol Buffer封装的协议进行控制指令的封装,并通过TCP/IP一次性发送给运行在ARM嵌入式处理器上的fusd,fusd的主线程接收到mrgfus的控制指令,并进行缓存和优先级排序,工作线程根据优先级排序依次执行控制指令。当工作线程在执行控制指令时如果聚焦超声治疗设备发生异常,Linux内核会通过Netlink方式发送中断消息发送给主线程,主线程收到中断消息后立即向工作线程发送SIGUSR1,工作线程立即中止当前任务并执行中断响应函数,并通过主线程将执行结果发送至mrgfus,并在工作站的用户交互界面上显示,工作线程再从中断响应函数返回,且不再执行其他任务,实现通过决断发现聚焦超声治疗设备异常)。
本实施例提出了一种基于ARM架构的聚焦超声治疗设备控制方法,采用守护进程执行任务,mrgfus通过工作站的用户交互界面接收操作指令,并通过TCP/IP协议发送至fusd的主线程,主线程接收并缓存任务,确保消息不会阻塞,尤其是中断消息,并同时主线程对任务进行优先等级排序,工作线程按照任务排序执行任务,通过读写寄存器控制聚焦超声治疗设备,主线程和信号线程不会与工作线程进行竞争,避免了加锁负担,同时主线程将任务执行结果反馈至mrgfus,工作站的用户交互界面显示任务执行结果,反馈至用户,聚焦超声治疗设备的控制过程响应及时,可靠性高,信号线程向主线程发送退出消息,主线程接收到退出消息后安全退出,安全性好,采用Google Protocol Buffer封装mrgfus和fusd之间的协议,便于根据业务场景进行协议扩展和兼容,通过Netlink方式实现fusd和Linux内核之间的通信,确保中断通知消息时长短,响应及时,提高了聚焦超声治疗设备处理的可靠性,fusd采用C++抽象机制,对关于聚焦超声治疗的控制指令和状态查询指令等任务进行封装,fusd架构与业务处理逻辑无关,通过扩展封装机制进行业务逻辑扩展,扩展性和通用性强。综上所述,本实施例提出的控制方法采用低耦合、高内聚的设计方案,具有高并发、高可靠和高扩展的优点。
以上详细描述了本发明的较佳具体实施例。应当理解,本领域的普通技术人员无需创造性劳动就可以根据本发明的构思作出诸多修改和变化。因此,凡本技术领域中技术人员依本发明的构思在现有技术的基础上通过逻辑分析、推理或者有限的实验可以得到的技术方案,皆应在由权利要求书所确定的保护范围内。

Claims (7)

1.一种基于ARM架构的聚焦超声治疗设备控制方法,所述的聚焦超声治疗设备连接有工作站以及运行Linux操作***的ARM嵌入式处理器,所述的ARM嵌入式处理器中存储有第一控制程序,所述的工作站中存储有第二控制程序,所述的第一控制程序和第二控制程序通过TCP/IP协议进行通讯,所述的方法具体为:
所述的第一控制程序通过执行任务对聚焦超声治疗设备进行控制,并将任务执行结果反馈至第二控制程序;
其中,所述的任务包括内部事件和操作指令,所述的内部事件包括第一控制程序的定时器事件和Linux内核的中断消息,所述的第二控制程序通过工作站接收操作指令并发送至第一控制程序;
其特征在于,所述的第一控制程序包括主线程和工作线程,所述的主线程对任务进行优先级排序,所述的中断消息、操作指令和定时器事件的优先级依次降低,所述的工作线程按照优先级顺序执行任务,根据任务执行结果对ARM嵌入式处理器的寄存器进行读写,实现对聚焦超声治疗设备的控制,同时主线程将任务执行结果反馈至第二控制程序;
所述的Linux内核启动完成时自动加载寄存器驱动程序register driver和中断驱动程序irq driver,所述的irq driver负责接收通用中断控制器Generic InterruptControler的中断消息,并通过Netlink方式将中断消息发送至主线程,主线程收到Linux内核的中断消息时向工作线程发送Linux信号,所述的工作线程接收到Linux信号后中断当前任务,并执行中断响应处理函数,所述的Linux信号为SIGUSR1,所述的工作线程从中断处理程序返回到任务上下文,会根据中断执行结果选择继续或终止执行任务。
2.根据权利要求1所述的一种基于ARM架构的聚焦超声治疗设备控制方法,其特征在于,所述的第一控制程序还包括信号线程,所述的任务还包括退出消息,所述的退出消息的优先级介于中断消息和操作指令之间,所述的信号线程通过关闭套接字向主线程发送退出消息,所述的操作指令包括控制指令和状态查询指令。
3.根据权利要求2所述的一种基于ARM架构的聚焦超声治疗设备控制方法,其特征在于,所述的信号线程接收到退出信号时关闭套接字,所述的退出信号包括SIGNINT和SIGTERM。
4.根据权利要求2所述的一种基于ARM架构的聚焦超声治疗设备控制方法,其特征在于,所述的套接字为Unix Socket Pair。
5.根据权利要求1所述的一种基于ARM架构的聚焦超声治疗设备控制方法,其特征在于,采用Google Protocol Buffer封装第一控制程序和第二控制程序之间的协议。
6.根据权利要求1所述的一种基于ARM架构的聚焦超声治疗设备控制方法,其特征在于,所述的主线程通过libevent库接收任务。
7.根据权利要求1所述的一种基于ARM架构的聚焦超声治疗设备控制方法,其特征在于,所述的第一控制程序采用C++抽象机制封装任务。
CN202010941501.5A 2020-09-09 2020-09-09 一种基于arm架构的聚焦超声治疗设备控制方法 Active CN112134859B (zh)

Priority Applications (7)

Application Number Priority Date Filing Date Title
CN202010941501.5A CN112134859B (zh) 2020-09-09 2020-09-09 一种基于arm架构的聚焦超声治疗设备控制方法
EP21865505.8A EP4203399A1 (en) 2020-09-09 2021-03-24 Control method for focused ultrasonic treatment device based on arm architecture
PCT/CN2021/082585 WO2022052442A1 (zh) 2020-09-09 2021-03-24 一种基于arm架构的聚焦超声治疗设的控制方法
AU2021341042A AU2021341042B2 (en) 2020-09-09 2021-03-24 Control method for focused ultrasonic treatment device based on arm architecture
JP2023515867A JP7492653B2 (ja) 2020-09-09 2021-03-24 Armアーキテクチャに基づく集束超音波治療機器の制御方法
KR1020237008434A KR20230048542A (ko) 2020-09-09 2021-03-24 Arm 아키텍처 기반의 집속 초음파 치료 장치의 제어 방법
US18/180,466 US20230218275A1 (en) 2020-09-09 2023-03-08 Method for controlling focused ultrasound therapy device based on arm architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010941501.5A CN112134859B (zh) 2020-09-09 2020-09-09 一种基于arm架构的聚焦超声治疗设备控制方法

Publications (2)

Publication Number Publication Date
CN112134859A CN112134859A (zh) 2020-12-25
CN112134859B true CN112134859B (zh) 2021-07-06

Family

ID=73845322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010941501.5A Active CN112134859B (zh) 2020-09-09 2020-09-09 一种基于arm架构的聚焦超声治疗设备控制方法

Country Status (7)

Country Link
US (1) US20230218275A1 (zh)
EP (1) EP4203399A1 (zh)
JP (1) JP7492653B2 (zh)
KR (1) KR20230048542A (zh)
CN (1) CN112134859B (zh)
AU (1) AU2021341042B2 (zh)
WO (1) WO2022052442A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112134859B (zh) * 2020-09-09 2021-07-06 上海沈德医疗器械科技有限公司 一种基于arm架构的聚焦超声治疗设备控制方法
CN115033472B (zh) * 2022-04-18 2024-03-22 大连理工大学 基于线程循环调度顺序化的中断驱动程序模型检测方法

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7398309B2 (en) 2000-12-08 2008-07-08 Loma Linda University Medical Center Proton beam therapy control system
CN1273890C (zh) * 2004-04-30 2006-09-06 浙江大学 Arm处理器架构的微内核设计方法
MY174984A (en) * 2010-03-24 2020-05-31 Mimos Berhad Method of communicating signals in 6lowpan network to ipv6 network
EP3002989B1 (en) 2011-11-04 2017-04-19 DEKA Products Limited Partnership Medical treatment system and methods using a plurality of fluid lines
DE112013007751B3 (de) * 2012-10-22 2023-01-12 Intel Corporation Hochleistungs-Zusammenschaltungs-Bitübertragungsschicht
KR101519952B1 (ko) * 2013-05-03 2015-05-14 고려대학교 산학협력단 목적지 노드 기반 네트워크 혼잡 감지 장치 및 방법
CN103559085B (zh) * 2013-10-21 2016-10-05 福建星网锐捷通讯股份有限公司 一种嵌入式***中进行中断以及临界事件管理操作的方法
US9860307B2 (en) * 2014-10-16 2018-01-02 Futurewei Technologies, Inc. System and method for virtual desktop infrastructure user level virtual channel
CN108710552B (zh) * 2018-05-04 2022-04-12 北京航天控制仪器研究所 一种基于VxWorks的惯性器件图形化测试***
CN208723624U (zh) * 2018-08-07 2019-04-09 北京太格时代自动化***设备有限公司 一种电力远动分布式终端
CN109558235B (zh) * 2018-11-30 2020-11-06 杭州迪普科技股份有限公司 一种处理器的调度方法、装置及计算机设备
CN111209046A (zh) * 2019-12-25 2020-05-29 北京时代民芯科技有限公司 一种面向多任务处理的嵌入式sparc处理器操作***设计方法
CN112134859B (zh) * 2020-09-09 2021-07-06 上海沈德医疗器械科技有限公司 一种基于arm架构的聚焦超声治疗设备控制方法

Also Published As

Publication number Publication date
JP7492653B2 (ja) 2024-05-29
JP2023545622A (ja) 2023-10-31
US20230218275A1 (en) 2023-07-13
EP4203399A1 (en) 2023-06-28
KR20230048542A (ko) 2023-04-11
AU2021341042B2 (en) 2024-03-14
WO2022052442A1 (zh) 2022-03-17
CN112134859A (zh) 2020-12-25
AU2021341042A1 (en) 2023-04-27

Similar Documents

Publication Publication Date Title
CN112134859B (zh) 一种基于arm架构的聚焦超声治疗设备控制方法
WO2020103706A1 (zh) 一种数据处理***及数据处理方法
US9852038B2 (en) Debugging system and debugging method of multi-core processor
JP5400443B2 (ja) 集積回路、デバッグ回路、デバッグコマンド制御方法
TW200527195A (en) Mechanism to control hardware interrupt acknowledgement in a virtual machine system
JP2982875B2 (ja) スレーブ制御装置
US11360832B2 (en) Operation method of robot operating system and a robot control method
JP2009524159A (ja) マルチコアシステムをデバッグするための方法及び装置
US20060259753A1 (en) Automatic halting of a processor in debug mode due to reset
RU2809768C1 (ru) Способ управления устройством фокусированной ультразвуковой терапии на основе архитектуры arm
JP2010521730A (ja) インタフェース・プロセッサ
CN110716791B (zh) 一种实时虚拟化***及其执行方法
Wen-zheng et al. Design and implementation of CNC machine remote monitoring and controlling system based on embedded internet
JPH1165623A (ja) プログラマブルコントローラ
EP0614148B1 (en) Data processing apparatus
JP2808757B2 (ja) デバッグ用マイクロプロセッサ
CN115357414B (zh) 基于SystemC和C++的多线程数据传输***
US20220214993A1 (en) Electronic computing device
KR100289039B1 (ko) 교차디버깅서버에서프로세스실행제어서비스실현방법
He et al. A self monitoring remote measurement and control platform design and implementation
JP3449812B2 (ja) 制御用電子装置
CN115629973A (zh) Cht技术处理器在线调试架构
JPS61180344A (ja) 高級言語のステツプ実行システム
JPS62290942A (ja) デバツガ起動方式
CN117909042A (zh) 一种基于Cortex-R核的***中断及任务切换管理方法及***

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Yang Bo

Inventor after: Zhang Shengfa

Inventor after: Gu Jiawei

Inventor after: Wen Jiabao

Inventor after: Guo Junjie

Inventor after: Wei Bo

Inventor after: Wu Hao

Inventor after: Liu Zihao

Inventor after: Su Zhiqiang

Inventor before: Yang Bo

Inventor before: Su Zhiqiang

Inventor before: Zhang Shengfa

Inventor before: Gu Jiawei

Inventor before: Wen Jiabao

Inventor before: Guo Junjie

Inventor before: Wei Bo

Inventor before: Qiao Shan

Inventor before: Wu Hao

Inventor before: Liu Zihao

GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A control method of focused ultrasound treatment equipment based on ARM architecture

Effective date of registration: 20220216

Granted publication date: 20210706

Pledgee: The Bank of Shanghai branch Caohejing Limited by Share Ltd.

Pledgor: SHANGHAI SHENDE MEDICAL INSTRUMENT TECHNOLOGY CO.,LTD.

Registration number: Y2022310000027

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230504

Granted publication date: 20210706

Pledgee: The Bank of Shanghai branch Caohejing Limited by Share Ltd.

Pledgor: SHANGHAI SHENDE MEDICAL INSTRUMENT TECHNOLOGY CO.,LTD.

Registration number: Y2022310000027

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 200233 4th floor, building 8, No. 1001, Qinzhou North Road, Xuhui District, Shanghai

Patentee after: Shanghai Shende Wuchuang Era Medical Technology Co.,Ltd.

Country or region after: China

Patentee after: Nantong Shende medical equipment Technology Co.,Ltd.

Patentee after: Shen De (Ningbo) medical equipment Technology Co.,Ltd.

Address before: 200233 4th floor, building 8, No. 1001, Qinzhou North Road, Xuhui District, Shanghai

Patentee before: SHANGHAI SHENDE MEDICAL INSTRUMENT TECHNOLOGY CO.,LTD.

Country or region before: China

Patentee before: Nantong Shende medical equipment Technology Co.,Ltd.

Patentee before: Shen De (Ningbo) medical equipment Technology Co.,Ltd.