WO2016112625A1 - 一种在预设嵌入式系统中实现脚本操作的系统 - Google Patents

一种在预设嵌入式系统中实现脚本操作的系统 Download PDF

Info

Publication number
WO2016112625A1
WO2016112625A1 PCT/CN2015/081388 CN2015081388W WO2016112625A1 WO 2016112625 A1 WO2016112625 A1 WO 2016112625A1 CN 2015081388 W CN2015081388 W CN 2015081388W WO 2016112625 A1 WO2016112625 A1 WO 2016112625A1
Authority
WO
WIPO (PCT)
Prior art keywords
script
unit
thread
management unit
virtual machine
Prior art date
Application number
PCT/CN2015/081388
Other languages
English (en)
French (fr)
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 芋头科技(杭州)有限公司
Priority to US14/764,122 priority Critical patent/US20170315831A1/en
Priority to JP2017554628A priority patent/JP2018504730A/ja
Priority to EP15877541.1A priority patent/EP3246815A4/en
Priority to NZ734390A priority patent/NZ734390A/en
Priority to CA2973020A priority patent/CA2973020A1/en
Priority to KR1020177022425A priority patent/KR102225691B1/ko
Priority to SG11201705656UA priority patent/SG11201705656UA/en
Publication of WO2016112625A1 publication Critical patent/WO2016112625A1/zh
Priority to ZA2017/05409A priority patent/ZA201705409B/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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • 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
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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
    • 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
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a system for implementing script operations in a preset embedded system.
  • process-oriented refers to a process-centric programming idea.
  • the process-oriented process is to analyze the steps needed to solve the problem, and then use the function to implement these steps step by step, and use them one by one.
  • the application has evolved from a command line interface to a window interface. Because the application is based on process-oriented development, there are problems such as poor flexibility and difficulty in maintenance. Just like the traditional way of graphical interaction, the advance and retreat of the window is limited and certain. Since the context of the program is contextual (so-called contextuality refers to the interaction, the user's instructions are contextual), the programmer needs to write a lot of if...else...determine the context to change the program flow, and the same interaction Ways may correspond to different results in different contexts. If you use traditional programming ideas, these contexts will trigger a lot of object coupling, which will destroy the advantages of object-oriented programming. Moreover, the traditional embedded development process is long, and the program needs to be compiled, deployed, programmed, etc. after the program is written. The process can verify the function, and if the system is complex, the process will consume a lot of time and money.
  • an intelligent robot which is designed to realize a direct callable functional unit, which is flexible, exclusive and easy to maintain.
  • a system for implementing script operations in a preset embedded system, applied to intelligent robots including:
  • a thread pool for storing an instance of the virtual machine associated with a script task
  • a management unit configured to connect the virtual machine to the thread pool according to the received script task, and store the virtual machine in the thread pool according to a preset policy. Threads are scheduled accordingly;
  • a global table connected to the thread pool, for storing identification information of the thread corresponding to the script task interrupted by the management unit scheduling;
  • the matching unit is configured to connect the management unit and the global table, and use the local script task to query whether the matching record exists in the global table, and if yes, notify the management unit to schedule execution of the corresponding thread in the record.
  • the method further includes:
  • An execution unit connected to the thread pool, to execute the corresponding thread in the thread pool according to the scheduling of the management unit.
  • the method further includes:
  • a script execution unit for executing the received script task
  • the script running unit and the interface unit are formed by a JAVA native interface running on a JAVA virtual machine.
  • the preset strategy includes a first in first out strategy and a advanced outbound strategy.
  • the global table adopts a hash table.
  • the method further includes a communication unit that is connected to the execution unit, and the communication unit reads the execution unit to execute task information and/or execution result of the thread, and sends the result to a remote server.
  • the thread pool can improve the completeness of the intelligent robot in the complex environment for the emergent situation; the global table is used to solve the context problem of the robot in the interaction, the corresponding operation can be performed according to the user's context trajectory, and the management unit can maintain the robot's Exclusive hardware to ensure the correct execution of script tasks, and can directly call the functional unit, flexible and easy to maintain.
  • FIG. 1 is a block diagram of an embodiment of an intelligent robot of the present invention.
  • a system for implementing script operations in a preset embedded system is applied to an intelligent robot, including:
  • Virtual machine 7 used to interpret the script and execute it
  • a thread pool 6 for storing an instance of the virtual machine 7 associated with the script task
  • the management unit 5 is configured to connect the thread pool 6 and the virtual machine 7 to instantiate the virtual machine 7 according to the received script task and store it in the thread pool 6, and perform corresponding scheduling on the thread in the thread pool 6 according to a preset policy. ;
  • the global table 3 is connected to the thread pool 6 for storing the identification information of the thread corresponding to the script task interrupted by the scheduling of the management unit 5;
  • the matching unit 2, the connection management unit 5 and the global table 3 are used to query the global table 3 for the local script task to check whether there is a matching record. If yes, the notification management unit 5 schedules the corresponding thread execution in the record.
  • the management unit 5 After receiving a script task, the management unit 5 needs to instantiate the script task and store it in the thread pool 6.
  • the thread in the thread pool 6 is scheduled according to the preset policy. The following situations exist:
  • the thread corresponding to the script task being executed is interrupted, the state of the thread is stored in the thread pool 6, and the thread is identified.
  • the information is stored in the global table 3, and the management unit 5 stores the interrupted script task and executes the thread with high priority;
  • the management unit 5 Determining whether the management unit 5 receives the preset system message at a preset time interval, and the preset system message is a plurality of system messages with priority preset by the system, and the priority of the system message is higher than the priority of the executing thread. After receiving the system message, the management unit 5 needs to interrupt the thread corresponding to the script task being executed, store the state of the thread in the thread pool 6, and identify the thread. The information is stored in the global table 3, and the management unit 5 stores the interrupted script task and executes the system message;
  • the matching unit 2 checks whether the record matching in the local script task exists in the global table 3, and if so, notifies the management unit 5 to execute the corresponding thread in the scheduled record. , that is, resume the state when the last interrupted state continues to execute.
  • the management unit 5 can be used to maintain the hardware functions of the intelligent robot because the hardware has an exclusive feature in the intelligent robot. For example, mechanical mechanisms, such hardware does not allow multiple script tasks to be called at the same time. In order to prevent this behavior from occurring, the management unit 5 schedules the execution of the program flow. The management unit 5 can maintain the exclusive hardware of the intelligent robot to ensure the correct execution of the program.
  • the thread pool 6 can improve the completeness of the intelligent robot for the emergency situation in the complex environment; the global table 3 is used to solve the context problem of the robot in the interaction, and the corresponding operation can be performed according to the user's context trajectory.
  • the management unit 5 can be used to maintain the exclusive hardware of the robot, thereby ensuring the correct execution of the script task and directly calling the functional unit.
  • the method further includes:
  • the execution unit 8 is connected to the thread pool 6 for executing the corresponding thread in the thread pool 6 according to the scheduling of the management unit 5.
  • the execution unit 8 can execute the corresponding thread according to the scheduling of the management unit 5 to ensure the correctness of the script task execution.
  • the method further includes:
  • the interface unit 4 connects the script running unit 1 and the management unit 5 for transmitting the script task to the management unit 5.
  • script execution unit 1 and interface unit 4 are hosted by JAVA native interface (Java Native Interface, JNI, JNI standard) which is part of the JAVA platform, which allows JAVA code and other languages to be written. The code interacts to form.
  • JAVA native interface Java Native Interface, JNI, JNI standard
  • the JAVA engine can be used as the script running unit 1, and can be connected through JAVA.
  • the port runs the script, loads the binary executable, and lazily reads the script task to register into the management unit 5, creating a new scenario to manage and schedule the execution flow of the script task.
  • the preset policies include a first in first out strategy and a advanced outbound strategy.
  • the first-in first-out policy in this embodiment actually allows first-in first-service (such as: first-in-first-service), and the advanced-out-out strategy actually allows first-come-first-served services (First-in Last- Service) such as: arranged in a stacked manner.
  • the script task can save and restore points through the label design. When the scheduling occurs, the script task will unconditionally jump to the label to save and restore the program stream, which can improve the completeness of the intelligent robot in the complex environment. .
  • global table 3 employs a hash table.
  • the hash table is a data structure for recording the trajectory of the user's operation, and the program can select the closest context according to the trajectory.
  • the identification information of all interrupted script tasks will be recorded in the hash table. If the user calls a function that exists in multiple functions, the call will determine the specific call according to the identification information of the current hash table. Which function is a function.
  • the communication unit 9 is further included, and the execution unit 8 is connected.
  • the communication unit 9 reads the task information and/or the execution result of the execution unit 8 and sends it to a remote server. Used to feed back the task information and/or execution result of the current thread to the remote server.
  • the script task is written in a script programming language, which is an interpreted scripting language based on the stacked virtual machine 7.
  • the script programming language does not need to be compiled, and the local machine code is generated for the hot code after interpretation by the interpreter. It can then be run directly on the embedded operating system of the intelligent robot.
  • the scripting language is Turing-complete (the so-called Turing complete means that the language can fully simulate all the things Turing functions can do, can solve all current computable problems, support traditional process-oriented software development techniques in programming ideas and Object-oriented software development technology), which is a functional-oriented development method for the interactive environment of intelligent robots.
  • the function-oriented basic unit within the language is a function, and these functions are independent of each other, and these independent basic functional units can be utilized. Perform specific complex scene design. For example, the user may randomly use multiple unrelated functions of the robot, and there is no connection between these functions. For example, the user may first let the robot help to play music, and then suddenly let the robot report the current weather.
  • the operating system of the robot uses an Android (Android) smart operating system.
  • the script running unit 1 is responsible for opening up the connection between the script task and the Android system.
  • the management unit 5 is responsible for managing and scheduling the script task execution flow.
  • the execution unit 8 executes the corresponding thread in the thread pool 6 in accordance with the scheduling of the management unit 5.
  • the following code shows the logic of a specific application, which is a play music logic.
  • the "//" is a comment symbol, and the data after "//" does not appear in the program.
  • the script task is used to solve the problem of long-term compilation, deployment, and programming using traditional high-level languages.
  • the script task the function of the system can be directly exposed to the programmer, reducing the burden on the application developer and improving The development efficiency of the intelligent robot program;
  • the writer does not need to write a large number of if...else...the context to change the program flow, but directly
  • the function unit is called, and these functions internally determine which program flow to execute based on the global table 3.
  • the operation is simple and convenient.
  • Applying the embodiment to the intelligent robot can make the robot completely simulate the human machine system in terms of perception, thinking and effect. It is not only a comprehensive embodiment of the high-efficiency intelligent system but also the artificial intelligence technology.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Numerical Control (AREA)
  • Devices For Executing Special Programs (AREA)
  • User Interface Of Digital Computer (AREA)
  • Manipulator (AREA)

Abstract

本发明公开了一种在预设嵌入式系统中实现脚本操作的系统,应用于智能机器人,所述系统包括:虚拟机,用以解释脚本并执行;线程池,用以存储与关联脚本任务的所述虚拟机的实例;管理单元,连接线程池和所述虚拟机,用以将所述虚拟机根据接收到的所述脚本任务实例化后存储入所述线程池,并根据预设策略对所述线程池中的线程进行相应的调度;全局表,连接所述线程池,用以存储因所述管理单元调度而打断的脚本任务对应的所述线程的识别信息;匹配单元,连接所述管理单元和所述全局表,用以本局脚本任务于所述全局表中查询是否存在匹配的记录,如存在时通知所述管理单元调度所述记录中相应的线程执行。采用全局表解决了机器人在交互中的上下文问题。

Description

一种在预设嵌入式系统中实现脚本操作的系统 技术领域
本发明涉及通信技术领域,尤其涉及一种在预设嵌入式系统中实现脚本操作的系统。
背景技术
随着机器人的应用领域的扩大和电子技术的高速发展,机器人在人们生活中的应用逐渐增多,传统的机器人普遍采用面向过程的编程思想进行编程。所谓面向过程指的是一种以过程为中心的编程思想。面向过程就是分析出解决问题所需要的步骤,然后用函数把这些步骤一步一步实现,使用的时候一个一个依次调用。
目前应用程序已经从命令行界面发展到窗口界面。因为应用程序是基于面向过程开发的,所以存在灵活性差以及不易维护等问题,就像传统的图形交互方式,窗口的前进和后退是有限并且一定的。由于程序运行时存在上下文关联性(所谓上下文关联性指的是交互时,用户的指令是存在上下文的),程序编写者需要编写大量的if…else…判断上下文来改变程序流,且相同的交互方式可能在不同的上下文中对应不同的结果。如果采用传统编程思想,这些上下文将引发大量的对象耦合,会毁灭掉面向对象程序设计的优势。而且传统的嵌入式开发流程较长,程序编写完成后需要经过编译,部署,烧写等 过程才能验证功能,如果系统复杂,则这个过程将消耗大量的时间和金钱。
综上所述,传统可执行特定任务的可编程多功能专用机器人功能局限、灵活性差且不易维护,已经无法满足人们日益增长的需求。
发明内容
针对传统的嵌入式开发流程存在的上述问题,现提供一种旨在实现可直调用功能单元,灵活性强、独占性强且容易维护的智能机器人。
具体技术方案如下:
一种在预设嵌入式系统中实现脚本操作的系统,应用于智能机器人,包括:
虚拟机,用以解释脚本并执行;
线程池,用以存储与关联脚本任务的所述虚拟机的实例;
管理单元,连接所述线程池和所述虚拟机,用以将所述虚拟机根据接收到的所述脚本任务实例化后存储入所述线程池,并根据预设策略对所述线程池中的线程进行相应的调度;
全局表,连接所述线程池,用以存储因所述管理单元调度而打断的脚本任务对应的所述线程的识别信息;
匹配单元,连接所述管理单元和所述全局表,用以本局脚本任务于所述全局表中查询是否存在匹配的记录,如存在时通知所述管理单元调度所述记录中相应的线程执行。
优选的,还包括:
执行单元,连接所述线程池,用以根据所述管理单元的调度执行所述线程池中相应的所述线程。
优选的,还包括:
脚本运行单元,用以执行接收到的脚本任务;
接口单元,连接所述脚本运行单元和所述管理单元,用以将所述脚本任务发送至所述管理单元。
优选的,所述脚本运行单元和所述接口单元由运行于JAVA虚拟机的JAVA原生接口形成。
优选的,所述预设策略包括先进先出策略和先进后出策略。
优选的,所述全局表采用哈希表。
优选的,还包括通讯单元,连接所述执行单元,所述通讯单元读取所述执行单元执行所述线程的任务信息和/或执行结果,并发送至一远程服务器。
上述技术方案的有益效果:
通过线程池可提高智能机器人在复杂环境下针对突发状况的完备性;采用全局表解决了机器人在交互中的上下文问题,可根据用户的上下文轨迹执行相应的操作,采用管理单元可以维护机器人的独占性硬件,从而保证脚本任务执行的正确性,且可直调用功能单元,灵活性强且容易维护。
附图说明
图1为本发明所述智能机器人的一种实施例的模块图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
需要说明的是,在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。
下面结合附图和具体实施例对本发明作进一步说明,但不作为本发明的限定。
如图1所示,一种在预设嵌入式系统中实现脚本操作的系统,应用于智能机器人,包括:
虚拟机7,用以解释脚本并执行;
线程池6,用以存储与关联脚本任务的虚拟机7的实例;
管理单元5,连接线程池6和虚拟机7,用以将虚拟机7根据接收到的脚本任务实例化后存储入线程池6,并根据预设策略对线程池6中的线程进行相应的调度;
全局表3,连接线程池6,用以存储因管理单元5调度而打断的脚本任务对应的线程的识别信息;
匹配单元2,连接管理单元5和全局表3,用以本局脚本任务于全局表3中查询是否存在匹配的记录,如存在时通知管理单元5调度记录中相应的线程执行。
管理单元5接收到一条脚本任务后,需将该条脚本任务实例化后存储入线程池6中,根据预设策略对线程池6中的线程进行相应的调度,存在如下情况:
若当前脚本任务的优先级高于线程池6中其他任务的优先级时,则打断正在执行的脚本任务对应的线程,将该线程的状态存入线程池6中,且将该线程的识别信息存入全局表3中,同时管理单元5存储被打断的脚本任务,执行优先级高的线程;
在预设的时间间隔判断管理单元5是否接收到预设系统消息,预设系统消息为系统预设的若干个具有优先级的系统消息,该系统消息的优先级高于正在执行线程的优先级,当管理单元5接收到系统消息后,需打断正在执行的脚本任务对应的线程,将该线程的状态存入线程池6中,且将线程的识别 信息存入全局表3中,同时管理单元5存储被打断的脚本任务,执行系统消息;
当被打断的脚本任务再次发送至管理单元5后,通过匹配单元2对在全局表3中查询是否存在于本局脚本任务匹配的记录,如存在则通知管理单元5调度记录中相应的线程执行,即恢复上次一被打断时的状态继续执行。
管理单元5可以用来维护智能机器人的硬件功能,因为在智能机器人中硬件具有独占性的特点。例如机械机构,这类硬件不允许多个脚本任务同时调用。为了防止这种行为的发生,管理单元5会对程序流的执行进行调度。采用管理单元5可以维护智能机器人的独占性硬件,保证程序执行的正确性。
在本实施例中通过线程池6可提高智能机器人在复杂环境下针对突发状况的完备性;采用全局表3解决了机器人在交互中的上下文问题,可根据用户的上下文轨迹执行相应的操作,采用管理单元5可以维护机器人的独占性硬件,从而保证脚本任务执行的正确性,且可直调用功能单元。
在优选的实施例中,还包括:
执行单元8,连接线程池6,用以根据管理单元5的调度执行线程池6中相应的线程。
在本实施例中执行单元8可根据管理单元5的调度执行的相应的线程,以保证脚本任务执行的正确性。
在优选的实施例中,还包括:
脚本运行单元1,用以执行接收到的脚本任务;
接口单元4,连接脚本运行单元1和管理单元5,用以将脚本任务发送至管理单元5。
在优选的实施例中,脚本运行单元1和接口单元4由运行于JAVA虚拟机7的JAVA原生接口(Java Native Interface,JNI,JNI标准成为JAVA平台的一部分,它允许JAVA代码和其他语言写的代码进行交互)形成。
在本实施例中JAVA引擎可作为脚本运行单元1,可通过JAVA原生接 口运行脚本,加载二进制可执行文件,惰性读取脚本任务以注册进管理单元5中,创建一个新的场景,以管理和调度脚本任务的执行流程。
在优选的实施例中,预设策略包括先进先出策略和先进后出策略。
在本实施例中的先进先出策略实际就是允许先来先服务(First-in First-service)如:采用排队的方式排列,先进后出策略实际就是允许先来后服务(First-in Last-service)如:采用堆载的方式排列。脚本任务可通过标签设计保存和恢复点,在发生调度时,脚本任务会无条件跳转到标签中对程序流进行保存和恢复操作,这样可以提高智能机器人在复杂环境下针对突发状况的完备性。
在优选的实施例中,全局表3采用哈希表。
在本实施例中哈希表是一个数据结构用来记录用户运行的轨迹,程序可根据轨迹选择最接近的上下文。所有被打断的脚本任务的识别信息都会记录到该哈希表中,如果用户调用了一个存在于多个功能中的函数,那么该次调用会根据当前哈希表的识别信息来决定具体调用哪一个功能中的函数。
在优选的实施例中,还包括通讯单元9,连接执行单元8,通讯单元9读取执行单元8执行线程的任务信息和/或执行结果,并发送至一远程服务器。用以将执行当前线程的任务信息和/或执行结果反馈至远程服务器。
在本实施例中脚本任务采用脚本编程语言编写,脚本编程语言是一种基于堆栈式虚拟机7的解释型脚本语言,脚本编程语言不需要编译,经过解释器解释后对热点代码生成本地机器码后可直接运行在智能机器人的嵌入式操作系统上。脚本编程语言是图灵完备的(所谓图灵完备是指该语言可以完全模拟出图灵机能做的所有事情,可以解决目前所有的可计算问题,在编程思想上支持传统面向过程软件开发技术和面向对象软件开发技术),该语言面向智能机器人的交互环境采用面向功能的开发方式。面向功能即语言内的基本单元是功能,这些功能之间互相独立,可利用这些独立的基础功能单元来 进行具体复杂场景设计。例如:用户可能会随机使用机器人的多个不相关功能,这些功能之间毫无联系。比如用户可能先让机器人帮忙放音乐,接下来又突然让机器人报告当前的天气。
现已某具有开灯,音乐播放,语言交互,电影播放,机械运动功能的智能机器人为例:
机器人的操作系统采用安卓(Android)智能操作系统。脚本运行单元1负责打通脚本任务和安卓系统之间的联系。管理单元5负责管理和调度脚本任务执行流。执行单元8根据管理单元5的调度执行线程池6中相应的线程。下面代码给出了一个具体应用的逻辑,该应用是一个播放音乐逻辑。其中”//”为注释符号,“//”后的数据不会出现在程序当中。
Figure PCTCN2015081388-appb-000001
Figure PCTCN2015081388-appb-000002
在本实施例中采用脚本任务解决了使用传统高级语言编译,部署,烧写漫长的问题。只需要将脚本任务的源代码放到智能机器人的文件系统后,即可直接运行进行功能验证;通过脚本任务可将系统的功能直接暴露给程序编写者,减少了应用程序开发者的负担,提高了针对智能机器人程序的开发效率;通过一随时变化的全局表3解决如交互中的上下文问题,编写者不需要像传统语言那样编写大量的if…else…判断上下文来改变程序流,而是直接调用功能单元,这些功能内部会根据全局表3来判断执行哪一个程序流。操作简单方便。
将本实施例应用于智能机器人上,可使机器人成为在感知、思维和效应方面完全模拟人的机器系统,它不仅是高效智能系统也是人工智能技术的综合体现。
以上所述仅为本发明较佳的实施例,并非因此限制本发明的实施方式及保护范围,对于本领域技术人员而言,应当能够意识到凡运用本发明说明书及图示内容所作出的等同替换和显而易见的变化所得到的方案,均应当包含在本发明的保护范围内。

Claims (7)

  1. 一种在预设嵌入式系统中实现脚本操作的系统,应用于智能机器人,其特征在于,包括:
    虚拟机,用以解释脚本并执行;
    线程池,用以存储与关联脚本任务的所述虚拟机的实例;
    管理单元,连接所述线程池和所述虚拟机,用以将所述虚拟机根据接收到的所述脚本任务实例化后存储入所述线程池,并根据预设策略对所述线程池中的线程进行相应的调度;
    全局表,连接所述线程池,用以存储因所述管理单元调度而打断的脚本任务对应的所述线程的识别信息;
    匹配单元,连接所述管理单元和所述全局表,用以本局脚本任务于所述全局表中查询是否存在匹配的记录,如存在时通知所述管理单元调度所述记录中相应的线程执行。
  2. 如权利要求1所述系统,其特征在于,还包括:
    执行单元,连接所述线程池,用以根据所述管理单元的调度执行所述线程池中相应的所述线程。
  3. 如权利要求1所述系统,其特征在于,还包括:
    脚本运行单元,用以执行接收到的脚本任务;
    接口单元,连接所述脚本运行单元和所述管理单元,用以将所述脚本任务发送至所述管理单元。
  4. 如权利要求3所述系统,其特征在于,所述脚本运行单元和所述接口单元由运行于JAVA虚拟机的JAVA原生接口形成。
  5. 如权利要求1所述系统,其特征在于,所述预设策略包括先进先出策略和先进后出策略。
  6. 如权利要求1所述系统,其特征在于,所述全局表采用哈希表。
  7. 如权利要求2所述系统,其特征在于,还包括通讯单元,连接所述执行单元,所述通讯单元读取所述执行单元执行所述线程的任务信息和/或执行结果,并发送至一远程服务器。
PCT/CN2015/081388 2015-01-12 2015-06-12 一种在预设嵌入式系统中实现脚本操作的系统 WO2016112625A1 (zh)

Priority Applications (8)

Application Number Priority Date Filing Date Title
US14/764,122 US20170315831A1 (en) 2015-01-12 2015-06-12 A System for Implementing Script Operation in a Preset Embedded System
JP2017554628A JP2018504730A (ja) 2015-01-12 2015-06-12 プリセット組み込み式システムでスクリプトオペレーションを実現するシステム
EP15877541.1A EP3246815A4 (en) 2015-01-12 2015-06-12 System realizing script operation in preset embedded system
NZ734390A NZ734390A (en) 2015-01-12 2015-06-12 System realizing script operation in preset embedded system
CA2973020A CA2973020A1 (en) 2015-01-12 2015-06-12 A system for implementing script operation in a preset embedded system
KR1020177022425A KR102225691B1 (ko) 2015-01-12 2015-06-12 임베디드 시스템의 프리인스톨 중의 스크립트 작업 수행 시스템
SG11201705656UA SG11201705656UA (en) 2015-01-12 2015-06-12 A system for implementing script operation in a preset embedded system
ZA2017/05409A ZA201705409B (en) 2015-01-12 2017-08-10 System realizing script operation in preset embedded system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510014270.2 2015-01-12
CN201510014270.2A CN105843592A (zh) 2015-01-12 2015-01-12 一种在预设嵌入式系统中实现脚本操作的系统

Publications (1)

Publication Number Publication Date
WO2016112625A1 true WO2016112625A1 (zh) 2016-07-21

Family

ID=56405171

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081388 WO2016112625A1 (zh) 2015-01-12 2015-06-12 一种在预设嵌入式系统中实现脚本操作的系统

Country Status (13)

Country Link
US (1) US20170315831A1 (zh)
EP (1) EP3246815A4 (zh)
JP (1) JP2018504730A (zh)
KR (1) KR102225691B1 (zh)
CN (1) CN105843592A (zh)
AU (1) AU2015101899A4 (zh)
CA (1) CA2973020A1 (zh)
HK (1) HK1222244A1 (zh)
NZ (1) NZ734390A (zh)
SG (1) SG11201705656UA (zh)
TW (1) TWI545503B (zh)
WO (1) WO2016112625A1 (zh)
ZA (1) ZA201705409B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107608774A (zh) * 2017-09-08 2018-01-19 新智云数据服务有限公司 一种任务调度方法、装置、设备及存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3432236A1 (en) * 2017-07-18 2019-01-23 Siemens Aktiengesellschaft Method and system for automatic maintenance of a machine
US10929186B2 (en) * 2018-12-12 2021-02-23 Servicenow, Inc. Control token and hierarchical dynamic control
CN110704210B (zh) * 2019-09-20 2023-10-10 天翼电子商务有限公司 脚本任务调用方法、系统、介质及装置
CN114079698A (zh) * 2020-08-12 2022-02-22 北京有限元科技有限公司 智能外呼机器人轮询的方法、装置以及存储介质
CN112306637A (zh) * 2020-11-06 2021-02-02 深圳市广和通无线股份有限公司 脚本扩展方法、装置、计算机设备和存储介质
CN112817762A (zh) * 2021-01-29 2021-05-18 中汽创智科技有限公司 一种基于自适应汽车开放系统架构标准的调度系统及其调度方法
CN114578727A (zh) * 2022-01-29 2022-06-03 深圳市云鼠科技开发有限公司 用于清洁机器人的业务逻辑控制方法
CN115033393B (zh) * 2022-08-11 2023-01-17 苏州浪潮智能科技有限公司 批量请求下发的优先排队处理方法、装置、服务器及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070174821A1 (en) * 2006-01-25 2007-07-26 Microsoft Corporation Script-based object adaptation
CN102402588A (zh) * 2011-10-26 2012-04-04 百度在线网络技术(北京)有限公司 一种对页面中的页面脚本进行预触发处理的设备和方法
CN104021080A (zh) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 基于自定义脚本的自动化测试系统

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW466419B (en) * 1998-11-20 2001-12-01 Via Tech Inc Automatic placement method for array device
US7120783B2 (en) * 1999-12-22 2006-10-10 Ubicom, Inc. System and method for reading and writing a thread state in a multithreaded central processing unit
DE10065419B4 (de) * 2000-12-27 2011-01-20 Siemens Ag Industrielle Steuerung mit taktsynchronem Ablaufebenenmodell
US20020161957A1 (en) * 2001-02-09 2002-10-31 Guillaume Comeau Methods and systems for handling interrupts
US20030126416A1 (en) * 2001-12-31 2003-07-03 Marr Deborah T. Suspending execution of a thread in a multi-threaded processor
US7363474B2 (en) * 2001-12-31 2008-04-22 Intel Corporation Method and apparatus for suspending execution of a thread until a specified memory access occurs
US20030225816A1 (en) * 2002-06-03 2003-12-04 Morrow Michael W. Architecture to support multiple concurrent threads of execution on an arm-compatible processor
US7093258B1 (en) * 2002-07-30 2006-08-15 Unisys Corporation Method and system for managing distribution of computer-executable program threads between central processing units in a multi-central processing unit computer system
US7840664B2 (en) * 2003-05-21 2010-11-23 Ixia Automated characterization of network traffic
JP4011523B2 (ja) * 2003-07-07 2007-11-21 シャープ株式会社 アプリケーション管理装置
US7318128B1 (en) * 2003-08-01 2008-01-08 Sun Microsystems, Inc. Methods and apparatus for selecting processes for execution
US7647370B1 (en) * 2003-10-24 2010-01-12 Verizon Data Services Llc Screen scraping interface
CN1801101A (zh) * 2006-01-17 2006-07-12 浙江大学 Java操作系统中线程的实现和线程状态切换的方法
US7984440B2 (en) * 2006-11-17 2011-07-19 Sap Ag Interactive audio task system with interrupt recovery and confirmations
CN101599027B (zh) * 2009-06-30 2013-02-13 中兴通讯股份有限公司 一种线程池管理方法及其系统
JP5458998B2 (ja) * 2010-03-19 2014-04-02 富士通株式会社 仮想マシンシステムおよび仮想マシン管理方法
US8843684B2 (en) * 2010-06-11 2014-09-23 International Business Machines Corporation Performing call stack sampling by setting affinity of target thread to a current process to prevent target thread migration
CN102546437B (zh) * 2012-02-20 2014-10-22 南京邮电大学 一种面向物联网平台的套接字实现方法
US9065778B2 (en) * 2012-03-20 2015-06-23 International Business Machines Corporation Dynamic message retrieval by subdividing a message queue into sub-queues

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070174821A1 (en) * 2006-01-25 2007-07-26 Microsoft Corporation Script-based object adaptation
CN102402588A (zh) * 2011-10-26 2012-04-04 百度在线网络技术(北京)有限公司 一种对页面中的页面脚本进行预触发处理的设备和方法
CN104021080A (zh) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 基于自定义脚本的自动化测试系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3246815A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107608774A (zh) * 2017-09-08 2018-01-19 新智云数据服务有限公司 一种任务调度方法、装置、设备及存储介质

Also Published As

Publication number Publication date
HK1222244A1 (zh) 2017-06-23
TWI545503B (zh) 2016-08-11
TW201626213A (zh) 2016-07-16
EP3246815A4 (en) 2018-09-05
KR102225691B1 (ko) 2021-03-15
CA2973020A1 (en) 2016-07-21
KR20170105054A (ko) 2017-09-18
SG11201705656UA (en) 2017-08-30
EP3246815A1 (en) 2017-11-22
US20170315831A1 (en) 2017-11-02
NZ734390A (en) 2020-07-31
CN105843592A (zh) 2016-08-10
AU2015101899A4 (en) 2017-09-28
ZA201705409B (en) 2019-09-25
JP2018504730A (ja) 2018-02-15

Similar Documents

Publication Publication Date Title
WO2016112625A1 (zh) 一种在预设嵌入式系统中实现脚本操作的系统
CN102508716B (zh) 任务控制装置和任务控制方法
US9141422B2 (en) Plug-in task scheduler
CN104205109B (zh) 持续性和弹性的工作者进程
JP2009532754A (ja) 継続ベースのメタランタイムのための抽象実行モデル
JP2009532758A (ja) ワークフローにおいて継続をモデル化するフレームワーク
CN110134499A (zh) 任务调度方法、任务调度系统、存储介质和计算机设备
US20230034881A1 (en) Scheduling method and device based on deep learning node computation, and storage medium
CN104081351B (zh) 用于混合系统的分布式功能执行的方法、系统及介质
CN107861715B (zh) 一种业务组建系统及方法
CN109359092A (zh) 文件管理方法、桌面显示方法、装置、终端及介质
CN112559153B (zh) 一种多线程和多进程一体的仿真模型组件调度方法和系统
US7877629B2 (en) Facilitating handling of exceptions in a program implementing a M-on-N threading model
CN115658278B (zh) 一种支持高并发协议交互的微任务调度机
CN107391274A (zh) 离线消息的处理方法及装置
Pinto et al. Porting SLOTH system to FreeRTOS running on ARM Cortex-M3
CN114741121A (zh) 用于模块加载的方法与装置、电子设备
CN112162840B (zh) 一种基于中断重入机制的协程处理及管理方法
CN109254838B (zh) 一种基于JAVA BeanShell的自动化任务
JP2013522710A (ja) Itシステムの構成方法、そのコンピュータプログラムおよびitシステム
CN110442404A (zh) 一种对象释放方法、装置、设备和存储介质
OA18766A (en) A system for implementing script operation in a preset embedded system.
CN105739959B (zh) 一种应用编程时对外部存储器管理操作的装置
WO2024031553A1 (zh) 实时控制方法、实时控制装置、计算设备及存储介质
CN109614221B (zh) 一种实时操作系统的应用框架及其方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 14764122

Country of ref document: US

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

Ref document number: 15877541

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2973020

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 2017554628

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 11201705656U

Country of ref document: SG

WWE Wipo information: entry into national phase

Ref document number: 2015376659

Country of ref document: AU

REEP Request for entry into the european phase

Ref document number: 2015877541

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20177022425

Country of ref document: KR

Kind code of ref document: A