WO2022099569A1 - Application processing program dynamic loading method for brain-like computer operating system - Google Patents

Application processing program dynamic loading method for brain-like computer operating system Download PDF

Info

Publication number
WO2022099569A1
WO2022099569A1 PCT/CN2020/128499 CN2020128499W WO2022099569A1 WO 2022099569 A1 WO2022099569 A1 WO 2022099569A1 CN 2020128499 W CN2020128499 W CN 2020128499W WO 2022099569 A1 WO2022099569 A1 WO 2022099569A1
Authority
WO
WIPO (PCT)
Prior art keywords
brain
processing program
binary code
application processing
application
Prior art date
Application number
PCT/CN2020/128499
Other languages
French (fr)
Chinese (zh)
Inventor
吕攀
程书意
杨国青
李红
邓水光
潘纲
Original Assignee
浙江大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 浙江大学 filed Critical 浙江大学
Publication of WO2022099569A1 publication Critical patent/WO2022099569A1/en

Links

Images

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/061Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using biological neurons, e.g. biological neurons connected to an integrated circuit

Definitions

  • the invention belongs to the technical field of novel computers, in particular to a method for dynamically loading an application processing program of a brain-like computer operating system.
  • Brain-like computing chips based on spiking neural networks directly implement some biological neural networks in hardware. meta-model, and the data transmission between neurons is similar to the pulse between biological neurons. Brain-like computers composed of brain-like computers can simulate part of the behavior of the brain by running spiking neural networks due to their natural advantages in architecture and implementation, and have low power consumption and high computing performance.
  • brain-like computers will generate a large amount of result data, such as membrane voltage, calculation results and other data after completing the calculation task. If the data generated by the brain-like computer is stored directly or returned to the user through the network without any processing, it will cause a large delay in the system.
  • the delay is mainly reflected in two aspects: one is the delay caused by multiple memory copies of the data, and the other is the delay caused by the network transmission of the data.
  • the calculation results are also different in structure. Therefore, there is an urgent need for a dynamic loading method, which can be used according to different spiking neural networks when the brain-like computer generates the result data.
  • the model type dynamically loads different application handlers to realize the structuring of the data required by the user, thereby improving the overall performance of the system.
  • the existing dynamic loading methods are relatively complex, such as the kprobe method provided by the Linux system, which can dynamically insert code into the kernel without recompiling the kernel.
  • the kprobe method is not suitable for pure bare-metal software systems for two reasons: first, the kprobe method needs to establish a symbol table; second, the kprobe method has poor performance, mainly because of its interrupt-based method, which needs to save the context.
  • Another example is the hot patch technology, which is mainly used for online repair and online update of the code. Hot patching technology also needs to establish symbol table information, which is not suitable for brain-like computer operating system.
  • the brain-like computer operating system is a static operating system, a simple solution is needed to realize the dynamic loading of the application processing program of the brain-like computer.
  • the brain-like computer has high processing frequency of calculation results and short single time, and the general processing time is millisecond level, a low performance overhead is required to realize the dynamic loading of application processing programs.
  • the present invention provides a method for dynamically loading an application processing program of a brain-like computer operating system, which can solve the problem that the brain-like computer system generates a large delay due to the large amount of data generated by the brain-like computer system, and enhances the brain-like computer system. overall processing performance.
  • a method for dynamically loading an application processing program of a brain-like computer operating system comprising the following steps:
  • the formal parameters of the application processing program include the storage location and length of the processed data, and the storage location and length of the processed data;
  • the configuration information includes the user ID, the spiking neural network model ID, and the application handler ID;
  • Extract the binary code of the application handler and transmit the binary code and configuration information of the application handler to the brain-like computer.
  • the application processing program is used to process the result data of the spiking neural network model of the brain-like computer, and is written by the user, so the configuration information of the application processing program includes the user ID.
  • the application processing program corresponds to at least one data processing method and corresponds to the spiking neural network model.
  • the data processing method includes filtering or extracting the data required by the user from the result data.
  • the formal parameters of the application processing program should be consistent with the formal parameters passed in by the binary code that executes the application processing program.
  • copying the binary code to the corresponding memory according to the configuration information includes:
  • a structure member variable is obtained according to the application handler identifier in the configuration information and the spiking neural network model structure, and the structure member variable is used to store the binary code of the application handler.
  • the binary code of the application handler into the structure member variable it further includes:
  • the binary code of the default application handler is used to completely copy the resulting data generated by the brain-like computer.
  • the binary code for executing the application processing program includes:
  • the brain-like computer When the brain-like computer generates the result data, it executes the binary code of the application handler in the form of a callback function;
  • the formal parameters passed in by the callback function indicate the storage location and length of the processed data, and the storage location and length of the processed data.
  • the beneficial effects of the present invention at least include:
  • the method for dynamically loading the application processing program of the brain-like computer operating system provided by the present invention, when the brain-like computer generates data, the binary code of the application processing program downloaded by the upper computer through the network is called in the form of a callback function, so that the operating system can dynamically
  • the call handler code allows different spiking neural network models to implement different result data processing methods, which can efficiently return the key data required by users, significantly reduce the amount of data, and avoid a large amount of data copying in memory and network transmission.
  • the delay brought by the time can enhance the overall performance of the brain-like computing system.
  • FIG. 1 is a schematic flowchart of a method for dynamically loading an application processing program of a brain-like computer operating system according to an embodiment of the present invention
  • FIG. 2 is a specific implementation flowchart of a method for dynamically loading an application processing program of a brain-like computer operating system according to an embodiment of the present invention.
  • this embodiment provides a method for dynamically loading application processing programs of the brain-like computer operating system, as shown in FIG. 1 , including: The following steps are: obtaining the binary code and configuration information of the application processing program; copying the binary code into the corresponding memory according to the configuration information; when the brain-like computer generates result data, execute the binary code of the application processing program.
  • the method for dynamically loading the application processing program of the brain-like computer operating system when the brain-like computer generates data, the operating system calls the remotely downloaded application processing program binary code in the form of a callback function, which provides different impulse neural network models.
  • Data processing method and return the key result data required by the user, reducing the delay caused by data storage and transmission.
  • FIG. 2 is a specific implementation flowchart of a method for dynamically loading an application processing program of a brain-like computer operating system provided by an embodiment. Specifically include:
  • Step 1 write application handler and configuration information.
  • the formal parameters of the application processing program indicate the location and length of the processed data storage, the location and length of the processed data storage.
  • the formal parameters of the application handler should be consistent with the parameters passed in by the binary code that executes the application handler.
  • the configuration information contains some key feature information, including user identification, spiking neural network model identification and application handler identification.
  • Step 2 compile the application handler.
  • the readelf-s target file command reads the length of the application handler and the offset of the application handler in the text segment;
  • the readelf-S target file command reads the first address of the text segment in the target file.
  • the binary code of the application processing program can be extracted according to the first address of the text segment in the target file, the length of the application processing program and the offset of the application processing program in the text segment.
  • Step 3 the binary code and configuration information of the application processing program are transmitted to the brain-like computer through the network.
  • the network transmission method adopts the tcp protocol.
  • Step 4 extract the binary code of the application handler.
  • Step 5 the brain-like computer finds the spiking neural network model structure according to the spiking neural network model identifier in the configuration information.
  • Step 6 the brain-like computer finds the structure member variables of the spiking neural network model according to the application processing program identifier in the configuration information.
  • Step 7 Assign the binary code of the application processing program to the member variable of the spiking neural network model structure.
  • Step 8 When the brain-like computer generates the result data, it calls the binary code of the application processing program from the member variables of the spiking neural network model structure in the form of a callback function and executes it.
  • the application processing program binary code downloaded by the upper computer through the network is called in the form of a callback function, so that the operating system can dynamically call the application processing program binary code.
  • the processing program code implements different data processing methods for different spiking neural network models, which can efficiently return the key data required by the user, reducing the amount of data, thereby avoiding the copying of a large amount of data in memory and network transmission. time delay.

Abstract

Disclosed is an application processing program dynamic loading method for a brain-like computer operating system, comprising the following steps: obtaining a binary code and configuration information of an application processing program; copying the binary code into a corresponding memory according to the configuration information; and when a brain-like computer generates result data, executing the binary code of the application processing program. The application processing program dynamic loading method can solve the problem of long delay of the brain-like computer system due to the fact that the brain-like computer generates a large amount of data, and improve the overall processing performance of the brain-like computer system.

Description

一种类脑计算机操作系统的应用处理程序动态加载方法A method for dynamically loading application processing program of brain-like computer operating system 技术领域technical field
本发明属于新型计算机技术领域,具体涉及一种类脑计算机操作系统的应用处理程序动态加载方法。The invention belongs to the technical field of novel computers, in particular to a method for dynamically loading an application processing program of a brain-like computer operating system.
背景技术Background technique
随着后摩尔定律时代的到来,冯诺依曼体系结构的计算性能由于多方面的瓶颈而不再能够维持高速的增长,基于脉冲神经网络的类脑计算芯片是直接用硬件实现了一些生物神经元模型,并且神经元之间的数据传输都是类似生物神经元之间脉冲。由类脑计算机组成的类脑计算机由于在架构和实现上的天然优势,能够通过运行脉冲神经网络来模拟大脑的部分行为,并且有着较低的功耗和较高的计算性能。With the advent of the post-Moore's Law era, the computing performance of the von Neumann architecture can no longer maintain high-speed growth due to various bottlenecks. Brain-like computing chips based on spiking neural networks directly implement some biological neural networks in hardware. meta-model, and the data transmission between neurons is similar to the pulse between biological neurons. Brain-like computers composed of brain-like computers can simulate part of the behavior of the brain by running spiking neural networks due to their natural advantages in architecture and implementation, and have low power consumption and high computing performance.
一般地,类脑计算机在完成计算任务后会产生大量的结果数据,如膜电压、计算结果等数据。如果类脑计算机产生的数据不经过任何处理,直接存储或者通过网络返回给用户,那么会导致系统产生较大的时延。该时延主要体现在两个方面:一个是数据的多次内存拷贝造成的时延,另一个是数据的网络传输造成的时延。同时由于脉冲神经网络模型的差异性会导致其计算结果在结构上也各不相同,因此,亟需一种动态加载方法,用于在类脑计算机产生结果数据时,能够根据不同的脉冲神经网络模型类型动态地加载不同的应用处理程序,来实现用户所需数据的结构化,从而提升系统整体性能。Generally, brain-like computers will generate a large amount of result data, such as membrane voltage, calculation results and other data after completing the calculation task. If the data generated by the brain-like computer is stored directly or returned to the user through the network without any processing, it will cause a large delay in the system. The delay is mainly reflected in two aspects: one is the delay caused by multiple memory copies of the data, and the other is the delay caused by the network transmission of the data. At the same time, due to the differences of the spiking neural network models, the calculation results are also different in structure. Therefore, there is an urgent need for a dynamic loading method, which can be used according to different spiking neural networks when the brain-like computer generates the result data. The model type dynamically loads different application handlers to realize the structuring of the data required by the user, thereby improving the overall performance of the system.
一般地,现有的动态加载方法都比较复杂,如linux系统提供的kprobe 方式,可以在不重新编译内核的情况下,向内核中动态地插入代码。但是kprobe方式并不适合纯裸机软件系统,有两方面原因:第一,kprobe方式需要建立符号表;第二,kprobe方式性能较差,主要是因为其基于中断的方式,需要保存上下文。再如热补丁技术,其主要用于代码的在线修复及在线更新。热补丁技术同样也需要建立符号表信息,不适合于类脑计算机操作系统。Generally, the existing dynamic loading methods are relatively complex, such as the kprobe method provided by the Linux system, which can dynamically insert code into the kernel without recompiling the kernel. However, the kprobe method is not suitable for pure bare-metal software systems for two reasons: first, the kprobe method needs to establish a symbol table; second, the kprobe method has poor performance, mainly because of its interrupt-based method, which needs to save the context. Another example is the hot patch technology, which is mainly used for online repair and online update of the code. Hot patching technology also needs to establish symbol table information, which is not suitable for brain-like computer operating system.
由于类脑计算机操作系统属于一种静态操作系统,因此,需要一种简单的方案实现类脑计算机应用处理程序的动态加载。Since the brain-like computer operating system is a static operating system, a simple solution is needed to realize the dynamic loading of the application processing program of the brain-like computer.
又因为类脑计算机计算结果处理的频次高,且单次时间短,一般处理时间为毫秒级别,因此需要一种低的性能开销实现应用处理程序的动态加载。And because the brain-like computer has high processing frequency of calculation results and short single time, and the general processing time is millisecond level, a low performance overhead is required to realize the dynamic loading of application processing programs.
发明内容SUMMARY OF THE INVENTION
鉴于上述,本发明提供了一种类脑计算机操作系统的应用处理程序动态加载方法,能够解决由于类脑计算机产生大量的数据,导致类脑计算机系统产生较大时延的问题,增强类脑计算机系统的整体处理性能。In view of the above, the present invention provides a method for dynamically loading an application processing program of a brain-like computer operating system, which can solve the problem that the brain-like computer system generates a large delay due to the large amount of data generated by the brain-like computer system, and enhances the brain-like computer system. overall processing performance.
本发明的技术方案为:The technical scheme of the present invention is:
一种类脑计算机操作系统的应用处理程序动态加载方法,包括以下步骤:A method for dynamically loading an application processing program of a brain-like computer operating system, comprising the following steps:
获取应用处理程序的二进制代码和配置信息;Get the binary code and configuration information of the application handler;
根据配置信息将二进制代码拷贝到相应的内存中;Copy the binary code to the corresponding memory according to the configuration information;
当类脑计算机产生结果数据时,则执行应用处理程序的二进制代码。When the brain-like computer produces the resulting data, the binary code of the application handler is executed.
优选地,在获取应用处理程序的二进制代码和配置信息之前,包括:Preferably, before acquiring the binary code and configuration information of the application handler, include:
编写应用处理程序,应用处理程序的形式参数包括被处理数据的存储 位置及长度、处理后数据的存储位置及长度;Write an application processing program. The formal parameters of the application processing program include the storage location and length of the processed data, and the storage location and length of the processed data;
提供应用处理程序的配置信息,配置信息包括用户身份标识、脉冲神经网络模型标识以及应用处理程序标识;Provide the configuration information of the application handler, the configuration information includes the user ID, the spiking neural network model ID, and the application handler ID;
提取应用处理程序的二进制代码,并将应用处理程序的二进制代码和配置信息传输至类脑计算机。Extract the binary code of the application handler, and transmit the binary code and configuration information of the application handler to the brain-like computer.
本发明中,应用处理程序用于处理类脑计算机的脉冲神经网络模型的结果数据,由用户编写,因此应用处理程序的配置信息包含用户身份标识。所述应用处理程序对应至少一种数据处理方式,且与脉冲神经网络模型对应。其中,所述数据处理方式包括从结果数据中筛选或提取用户所需数据。In the present invention, the application processing program is used to process the result data of the spiking neural network model of the brain-like computer, and is written by the user, so the configuration information of the application processing program includes the user ID. The application processing program corresponds to at least one data processing method and corresponds to the spiking neural network model. Wherein, the data processing method includes filtering or extracting the data required by the user from the result data.
为了保证类脑计算机操作系统加载应用处理程序时不会出错,优选地,所述应用处理程序的形式参数应与执行应用处理程序的二进制代码传入的形式参数保持一致。In order to ensure that no error occurs when the brain-like computer operating system loads the application processing program, preferably, the formal parameters of the application processing program should be consistent with the formal parameters passed in by the binary code that executes the application processing program.
优选地,根据配置信息将二进制代码拷贝到相应的内存中包括:Preferably, copying the binary code to the corresponding memory according to the configuration information includes:
根据配置信息中的脉冲神经网络模型标识获得脉冲神经网络模型结构体;Obtain the spiking neural network model structure according to the spiking neural network model identifier in the configuration information;
根据配置信息中的应用处理程序标识和脉冲神经网络模型结构体得到结构体成员变量,该结构体成员变量用于存储应用处理程序的二进制代码。A structure member variable is obtained according to the application handler identifier in the configuration information and the spiking neural network model structure, and the structure member variable is used to store the binary code of the application handler.
优选地,将应用处理程序的二进制代码存储到结构体成员变量之前,还包括:Preferably, before storing the binary code of the application handler into the structure member variable, it further includes:
将用于存储应用处理程序的二进制代码的结构体成员变量初始化为默认应用处理程序的二进制代码;Initialize the structure member variable used to store the binary code of the application handler to the binary code of the default application handler;
默认应用处理程序的二进制代码用于完整地拷贝类脑计算机产生的结果数据。The binary code of the default application handler is used to completely copy the resulting data generated by the brain-like computer.
优选地,当类脑计算机产生结果数据时,则执行应用处理程序的二进制代码包括:Preferably, when the brain-like computer generates the result data, the binary code for executing the application processing program includes:
当类脑计算机产生结果数据时,以回调函数的方式执行应用处理程序的二进制代码;When the brain-like computer generates the result data, it executes the binary code of the application handler in the form of a callback function;
回调函数传入的形式参数指明了被处理数据的存储位置及长度、处理后数据的存储位置及长度。The formal parameters passed in by the callback function indicate the storage location and length of the processed data, and the storage location and length of the processed data.
与现有技术相比,本发明具有的有益效果至少包括:Compared with the prior art, the beneficial effects of the present invention at least include:
本发明提供的类脑计算机操作系统的应用处理程序动态加载方法,在类脑计算机产生数据时,以回调函数的方式调用上位机通过网络下载的应用处理程序的二进制代码,使其操作系统能够动态的调用处理程序代码,让不同的脉冲神经网络模型实现了不同的结果数据处理方式,可以高效地返回用户所需的关键数据,显著降低数据量,从而避免了大量数据在内存中拷贝和网络传输时带来的时延,增强类脑计算系统的整体性能。The method for dynamically loading the application processing program of the brain-like computer operating system provided by the present invention, when the brain-like computer generates data, the binary code of the application processing program downloaded by the upper computer through the network is called in the form of a callback function, so that the operating system can dynamically The call handler code allows different spiking neural network models to implement different result data processing methods, which can efficiently return the key data required by users, significantly reduce the amount of data, and avoid a large amount of data copying in memory and network transmission. The delay brought by the time can enhance the overall performance of the brain-like computing system.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图做简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动前提下,还可以根据这些附图获得其他附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative efforts.
图1是本发明实施例提供的类脑计算机操作系统的应用处理程序动态加载方法的流程示意图;1 is a schematic flowchart of a method for dynamically loading an application processing program of a brain-like computer operating system according to an embodiment of the present invention;
图2是本发明实施例提供的类脑计算机操作系统的应用处理程序动态加载方法的具体实施流程图。FIG. 2 is a specific implementation flowchart of a method for dynamically loading an application processing program of a brain-like computer operating system according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例对本发明进行进一步的详细说明。应当理解,此处所描述的具体实施方式仅仅用以解释本发明,并不限定本发明的保护范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and do not limit the protection scope of the present invention.
为了解决由于类脑计算机产生大量的数据,导致类脑计算机系统产生较大时延的问题,本实施例提供了一种类脑计算机操作系统的应用处理程序动态加载方法,如图1所示,包括以下步骤:获取应用处理程序的二进制代码和配置信息;根据配置信息将二进制代码拷贝到相应的内存中;当类脑计算机产生结果数据时,则执行应用处理程序的二进制代码。In order to solve the problem that the brain-like computer system generates a large delay due to the large amount of data generated by the brain-like computer, this embodiment provides a method for dynamically loading application processing programs of the brain-like computer operating system, as shown in FIG. 1 , including: The following steps are: obtaining the binary code and configuration information of the application processing program; copying the binary code into the corresponding memory according to the configuration information; when the brain-like computer generates result data, execute the binary code of the application processing program.
该类脑计算机操作系统的应用处理程序动态加载方法,在类脑计算机产生数据时,操作系统以回调函数的方式调用远程下载的应用处理程序二进制代码,给不同的脉冲神经网络模型提供了不同的数据处理方式,并返回用户所需的关键结果数据,降低了由于数据存储和传输带来的时延。The method for dynamically loading the application processing program of the brain-like computer operating system, when the brain-like computer generates data, the operating system calls the remotely downloaded application processing program binary code in the form of a callback function, which provides different impulse neural network models. Data processing method, and return the key result data required by the user, reducing the delay caused by data storage and transmission.
在实施例中,使用了集成12颗达尔文神经拟态芯片的类脑计算机来进行实现。图2为实施例提供的类脑计算机操作系统的应用处理程序动态加载方法的具体实施流程图。具体包括:In the embodiment, a brain-like computer integrating 12 Darwinian neuromorphic chips is used for implementation. FIG. 2 is a specific implementation flowchart of a method for dynamically loading an application processing program of a brain-like computer operating system provided by an embodiment. Specifically include:
步骤1,编写应用处理程序和配置信息。Step 1, write application handler and configuration information.
其中应用处理程序的形式参数指明了被处理的数据存储的位置及其长度、处理后的数据存储的位置及其长度。其中应用处理程序的形式参数应和执行应用处理程序的二进制代码传入的参数保持一致。其中配置信息包含一些关键的特征信息,包括用户身份标识、脉冲神经网络模型标识和应用处理程序标识。The formal parameters of the application processing program indicate the location and length of the processed data storage, the location and length of the processed data storage. The formal parameters of the application handler should be consistent with the parameters passed in by the binary code that executes the application handler. The configuration information contains some key feature information, including user identification, spiking neural network model identification and application handler identification.
步骤2,编译应用处理程序。Step 2, compile the application handler.
采用交叉编译编译应用处理程序。Compile the application handler using cross-compilation.
其中交叉编译的命令为:arm-none-eabi-gcc-Wall-O0-g3-c-fmessage-length=0-mcpu=cortex-a9-mfpu=vfpv3-mfloat-abi=hard源文件名字-o目标文件名字。The cross-compilation command is: arm-none-eabi-gcc-Wall-O0-g3-c-fmessage-length=0-mcpu=cortex-a9-mfpu=vfpv3-mfloat-abi=hard source file name-o target file name.
提取应用处理程序二进制代码;Extract application handler binary code;
其中,readelf-s目标文件命令读取应用处理程序长度和在应用处理程序在text段内的偏移;Among them, the readelf-s target file command reads the length of the application handler and the offset of the application handler in the text segment;
其中,readelf-S目标文件命令读取text段在目标文件的首地址。Among them, the readelf-S target file command reads the first address of the text segment in the target file.
其中,根据text段在目标文件的首地址、应用处理程序长度和应用处理程序在text段内的偏移可以提取应用处理程序的二进制代码。The binary code of the application processing program can be extracted according to the first address of the text segment in the target file, the length of the application processing program and the offset of the application processing program in the text segment.
步骤3,应用处理程序的二进制代码和配置信息通过网络传输给类脑计算机。网络传输的方式采用tcp协议。Step 3, the binary code and configuration information of the application processing program are transmitted to the brain-like computer through the network. The network transmission method adopts the tcp protocol.
步骤4,提取应用处理程序的二进制代码。Step 4, extract the binary code of the application handler.
步骤5,类脑计算机根据配置信息中的脉冲神经网络模型标识找到脉冲神经网络模型结构体。Step 5, the brain-like computer finds the spiking neural network model structure according to the spiking neural network model identifier in the configuration information.
步骤6,类脑计算机根据配置信息中的应用处理程序标识找到脉冲神经网络模型结构体成员变量。Step 6, the brain-like computer finds the structure member variables of the spiking neural network model according to the application processing program identifier in the configuration information.
步骤7,将应用处理程序的二进制代码赋值给脉冲神经网络模型结构体成员变量。Step 7: Assign the binary code of the application processing program to the member variable of the spiking neural network model structure.
步骤8,当类脑计算机产生结果数据时,以回调函数的方式从脉冲神经网络模型结构体成员变量中调取应用处理程序的二进制代码并执行。Step 8: When the brain-like computer generates the result data, it calls the binary code of the application processing program from the member variables of the spiking neural network model structure in the form of a callback function and executes it.
上述类脑计算机操作系统的应用处理程序动态加载方法中,在类脑计算机产生数据时,以回调函数的方式调用上位机通过网络下载的应用处理程序二进制代码,使其操作系统能够动态的调用该处理程序代码,针对不 同的脉冲神经网络模型实现不同的数据处理方式,可以高效的返回用户所需的关键数据,降低了数据量,从而避免了大量数据在内存中拷贝和网络传输时带来的时延。In the above-mentioned method for dynamically loading the application processing program of the brain-like computer operating system, when the brain-like computer generates data, the application processing program binary code downloaded by the upper computer through the network is called in the form of a callback function, so that the operating system can dynamically call the application processing program binary code. The processing program code implements different data processing methods for different spiking neural network models, which can efficiently return the key data required by the user, reducing the amount of data, thereby avoiding the copying of a large amount of data in memory and network transmission. time delay.
以上所述的具体实施方式对本发明的技术方案和有益效果进行了详细说明,应理解的是以上所述仅为本发明的最优选实施例,并不用于限制本发明,凡在本发明的原则范围内所做的任何修改、补充和等同替换等,均应包含在本发明的保护范围之内。The above-mentioned specific embodiments describe in detail the technical solutions and beneficial effects of the present invention. It should be understood that the above-mentioned embodiments are only the most preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, additions and equivalent substitutions made within the scope shall be included within the protection scope of the present invention.

Claims (8)

  1. 一种类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,包括以下步骤:A method for dynamically loading an application processing program of a brain-like computer operating system, comprising the following steps:
    获取应用处理程序的二进制代码和配置信息;Get the binary code and configuration information of the application handler;
    根据配置信息将二进制代码拷贝到相应的内存中;Copy the binary code to the corresponding memory according to the configuration information;
    当类脑计算机产生结果数据时,则执行应用处理程序的二进制代码。When the brain-like computer produces the resulting data, the binary code of the application handler is executed.
  2. 如权利要求1所述的类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,在获取应用处理程序的二进制代码和配置信息之前,包括:The method for dynamically loading an application processing program of a brain-like computer operating system as claimed in claim 1, wherein before acquiring the binary code and configuration information of the application processing program, the method includes:
    编写应用处理程序,应用处理程序的形式参数包括被处理数据的存储位置及长度、处理后数据的存储位置及长度;Write an application processing program. The formal parameters of the application processing program include the storage location and length of the processed data, and the storage location and length of the processed data;
    提供应用处理程序的配置信息,配置信息包括用户身份标识、脉冲神经网络模型标识以及应用处理程序标识;Provide the configuration information of the application handler, the configuration information includes the user ID, the spiking neural network model ID, and the application handler ID;
    提取应用处理程序的二进制代码,并将应用处理程序的二进制代码和配置信息传输至类脑计算机。Extract the binary code of the application handler, and transmit the binary code and configuration information of the application handler to the brain-like computer.
  3. 如权利要求2所述的类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,所述应用处理程序的形式参数应与执行应用处理程序的二进制代码传入的形式参数保持一致。The method for dynamically loading an application processing program of a brain-like computer operating system according to claim 2, wherein the formal parameters of the application processing program should be consistent with the formal parameters passed in by the binary code executing the application processing program.
  4. 如权利要求2所述的类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,根据配置信息将二进制代码拷贝到相应的内存中包括:The method for dynamically loading an application processing program of a brain-like computer operating system according to claim 2, wherein the copying of the binary code to the corresponding memory according to the configuration information comprises:
    根据配置信息中的脉冲神经网络模型标识获得脉冲神经网络模型结构体;Obtain the spiking neural network model structure according to the spiking neural network model identifier in the configuration information;
    根据配置信息中的应用处理程序标识和脉冲神经网络模型结构体得到结构体成员变量,该结构体成员变量用于存储应用处理程序的二进制代码。A structure member variable is obtained according to the application handler identifier in the configuration information and the spiking neural network model structure, and the structure member variable is used to store the binary code of the application handler.
  5. 如权利要求4所述的类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,将应用处理程序的二进制代码存储到结构体成员变量之前,还包括:The method for dynamically loading an application processing program of a brain-like computer operating system according to claim 4, wherein before storing the binary code of the application processing program into the structure member variable, the method further comprises:
    将用于存储应用处理程序的二进制代码的结构体成员变量初始化为默认应用处理程序的二进制代码;Initialize the structure member variable used to store the binary code of the application handler to the binary code of the default application handler;
    默认应用处理程序的二进制代码用于完整地拷贝类脑计算机产生的结果数据。The binary code of the default application handler is used to completely copy the resulting data generated by the brain-like computer.
  6. 如权利要求1所述的类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,当类脑计算机产生结果数据时,则执行应用处理程序的二进制代码包括:The method for dynamically loading an application processing program of a brain-like computer operating system according to claim 1, wherein when the brain-like computer generates result data, the binary code for executing the application processing program comprises:
    当类脑计算机产生结果数据时,以回调函数的方式执行应用处理程序的二进制代码;When the brain-like computer generates the result data, it executes the binary code of the application handler in the form of a callback function;
    回调函数传入的形式参数指明了被处理数据的存储位置及长度、处理后数据的存储位置及长度。The formal parameters passed in by the callback function indicate the storage location and length of the processed data, and the storage location and length of the processed data.
  7. 如权利要求1~6任一项所述的类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,所述应用处理程序对应至少一种数据处理方式,且与脉冲神经网络模型对应。The method for dynamically loading an application processing program of a brain-like computer operating system according to any one of claims 1 to 6, wherein the application processing program corresponds to at least one data processing method and corresponds to a spiking neural network model.
  8. 如权利要求7所述的类脑计算机操作系统的应用处理程序动态加载方法,其特征在于,所述数据处理方式包括从结果数据中筛选或提取用户所需数据。The method for dynamically loading an application processing program of a brain-like computer operating system according to claim 7, wherein the data processing method comprises filtering or extracting the data required by the user from the result data.
PCT/CN2020/128499 2020-11-12 2020-11-13 Application processing program dynamic loading method for brain-like computer operating system WO2022099569A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011264115.3A CN112269606B (en) 2020-11-12 2020-11-12 Application processing program dynamic loading method of brain-like computer operating system
CN202011264115.3 2020-11-12

Publications (1)

Publication Number Publication Date
WO2022099569A1 true WO2022099569A1 (en) 2022-05-19

Family

ID=74340041

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/128499 WO2022099569A1 (en) 2020-11-12 2020-11-13 Application processing program dynamic loading method for brain-like computer operating system

Country Status (2)

Country Link
CN (1) CN112269606B (en)
WO (1) WO2022099569A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115392443B (en) * 2022-10-27 2023-03-10 之江实验室 Pulse neural network application representation method and device of brain-like computer operating system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541598A (en) * 2011-12-26 2012-07-04 深圳联友科技有限公司 Method and system for dynamically loading component
US20160092246A1 (en) * 2014-09-26 2016-03-31 Oracle International Corporation Reverse dependency injection in a system with dynamic code loading
CN109858620A (en) * 2018-12-29 2019-06-07 北京灵汐科技有限公司 One type brain computing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309684A (en) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 Method and device for dynamically loading application
CN109783157B (en) * 2018-12-29 2020-11-24 深圳云天励飞技术有限公司 Method and related device for loading algorithm program
CN110909869B (en) * 2019-11-21 2022-08-23 浙江大学 Brain-like computing chip based on impulse neural network
CN111325321B (en) * 2020-02-13 2023-08-29 中国科学院自动化研究所 Brain-like computing system based on multi-neural network fusion and execution method of instruction set

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541598A (en) * 2011-12-26 2012-07-04 深圳联友科技有限公司 Method and system for dynamically loading component
US20160092246A1 (en) * 2014-09-26 2016-03-31 Oracle International Corporation Reverse dependency injection in a system with dynamic code loading
CN109858620A (en) * 2018-12-29 2019-06-07 北京灵汐科技有限公司 One type brain computing system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIE JIANQUN: "Research on the Architecture of Large-Scale Neuromorphic Computer", CHINESE MASTER’S DISSERTATIONS - GUANGDONG UNIVERSITY OF TECHNOLOGY, 1 May 2018 (2018-05-01), XP055928935 *

Also Published As

Publication number Publication date
CN112269606B (en) 2021-12-07
CN112269606A (en) 2021-01-26

Similar Documents

Publication Publication Date Title
US9201676B2 (en) Reducing or suspending transfer rate of virtual machine migration when dirtying rate exceeds a convergence threshold
US8667489B2 (en) Systems and methods for sharing the results of analyses among virtual machines
US10417023B2 (en) GPU simulation method
CN111046072A (en) Data query method, system, heterogeneous computing acceleration platform and storage medium
WO2021057807A1 (en) Deep learning model generation method and apparatus, device, and storage medium
US20120158770A1 (en) Client-Side Statement Cache
JP4491254B2 (en) Replication command distribution system and method
KR20080023728A (en) Selective pre-compilation of virtual code to enhance emulator performance
US20100306766A1 (en) Adding aspects to virtual machine monitors
US20200342008A1 (en) System for lightweight objects
WO2022099569A1 (en) Application processing program dynamic loading method for brain-like computer operating system
US20090077563A1 (en) Systems And Methods For Grid Enabling Computer Jobs
US20220237057A1 (en) Code consolidation system
CN110569105B (en) Self-adaptive memory consistency protocol of distributed virtual machine, design method thereof and terminal
US10621163B2 (en) Tracking and reusing function results
US9009731B2 (en) Conversion of lightweight object to a heavyweight object
CN112883088A (en) Data processing method, device, equipment and storage medium
CN108446186B (en) Method for recovering Dex source file from shelled Android application program
Sudsee et al. An improvement of a checkpoint-based distributed testing technique on a big data environment
CN114490834B (en) Method and device for replacing big data calculation operation data source based on Kubernetes
KR102457154B1 (en) Method and system for generating intermediate representation for program for execution on accelerator
CN114006703B (en) Intersystem data transmission method and device
CN111796806B (en) Method and device for generating object, electronic equipment and readable storage medium
CN110971631B (en) Method, device, server and medium for accessing ceph cluster
US20210397382A1 (en) System and method for optimizing write requests of a write queue

Legal Events

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

Ref document number: 20961126

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20961126

Country of ref document: EP

Kind code of ref document: A1