WO2023213295A1 - 自定义组件控制系统、方法、设备及存储介质 - Google Patents

自定义组件控制系统、方法、设备及存储介质 Download PDF

Info

Publication number
WO2023213295A1
WO2023213295A1 PCT/CN2023/092259 CN2023092259W WO2023213295A1 WO 2023213295 A1 WO2023213295 A1 WO 2023213295A1 CN 2023092259 W CN2023092259 W CN 2023092259W WO 2023213295 A1 WO2023213295 A1 WO 2023213295A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
custom
executor
functional
data
Prior art date
Application number
PCT/CN2023/092259
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 节卡机器人股份有限公司
Publication of WO2023213295A1 publication Critical patent/WO2023213295A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Definitions

  • This application relates to the field of software framework technology, specifically, to a custom component control system, method, device and storage medium.
  • Existingly developed processing solutions usually include basic components for adding or modifying various functional plug-ins in the plug-in library components in the form of script files, and communicating instructions and status with intelligent equipment control systems such as robots, and for providing basic components with A plugin library component for one or more feature plugins.
  • the software architecture using a combination of basic components and plug-in library components has enhanced the flexibility of software development to a certain extent and reduced the development workload.
  • it because it only supports a certain fixed programming language, it is difficult to meet the requirements between different versions. Universal application, poor versatility and poor scalability.
  • the purpose of the embodiments of the present application is to provide a custom component control system, method, device and storage medium, by setting functional components and executors, using embedded scripts to create corresponding processes and run them compiled by multiple programming languages. executable file, thereby solving the technical problem of "only supporting a certain fixed programming language, difficulty in meeting universal application between different versions, poor versatility, and poor scalability.”
  • embodiments of the present application provide a custom component control system.
  • the system includes: a functional component and an actuator, and the functional component is communicatively connected to the actuator; and the functional component is configured to control the customized component.
  • the data of the component is passed to the executor; wherein the custom component includes an executable file compiled by multiple programming languages; and the executor is configured to create the corresponding component of the custom component through an embedded script. process, and run the executable file within the process.
  • the software architecture of functional components and actuators is used to develop a custom component control system.
  • the unified interface of functional components can be used to realize interactive communication of custom components with multiple functional applications; by configuring script commands in the actuator , creating corresponding processes can monitor and display the running status of custom component files compiled in multiple programming languages; at the same time, multiple processes are independent of each other and do not interfere with each other, improving development efficiency and increasing universality. , versatility.
  • the executor includes: a main process component, configured to create a sub-process and shared memory space corresponding to the custom component through an embedded script in the executor, and obtain all data from the shared memory space.
  • the running status data of the sub-process is configured to run the executable file in the sub-process created by the main process component and output the running status data to the shared memory space; and the shared memory space component is configured to Receive running status data generated when the executable file is run in the sub-process component.
  • the sub-process component outputs data or obtains data to the shared memory space component.
  • the main process component of the executor can obtain the data of the sub-process component running the executable file from the shared memory space component; by creating an independent process, Runs user-defined components implemented in different programming languages in a separate process; it simplifies the development of software architecture systems, reduces the waste of resource memory space, has good compatibility, and is convenient for users to use.
  • the executor is configured to create multiple sub-processes corresponding to the number of the custom components in the main process component for the custom component.
  • custom component files compiled in multiple different programming languages can be run at the same time, and at the same time, the executable file can be run At this time, multiple processes are independent of each other and do not interfere with each other, which improves development efficiency, universality, and versatility.
  • the functional component includes: a proxy server, configured to receive data generated on the operation interface of the custom component, and transmit the data to the functional interface server through a preset communication protocol; the functional interface server, configured to To provide a functional interface to receive data transmitted by the proxy server and trigger a component manager; and the component manager accesses the executor through the functional interface and transmits the data to the executor.
  • a proxy server configured to receive data generated on the operation interface of the custom component, and transmit the data to the functional interface server through a preset communication protocol
  • the functional interface server configured to To provide a functional interface to receive data transmitted by the proxy server and trigger a component manager
  • the component manager accesses the executor through the functional interface and transmits the data to the executor.
  • the operation data of the custom component is transmitted to the executor, and the executor creates a corresponding sub-process to run one or more executable components contained in the custom component.
  • Execution files simplify the development of software architecture systems, reduce the waste of resource memory space, and improve development efficiency.
  • the custom component includes one or more of a custom instruction component, a custom function component, and a custom service component.
  • the operation of intelligent equipment such as robots can be realized by developing three different types of custom components.
  • the control of intelligent equipment such as robots is defined by software, the software is defined by users, and the custom components are plug-and-play. , which enhances the flexibility of development.
  • the number of executable files is determined by one or more of the number of instructions, the number of functions, and the number of services of the custom component.
  • a custom instruction is an executable file
  • a custom function is an executable file
  • a custom service is an executable file
  • the multiple programming languages include Python language, C++ language, Java language and JavaScript language.
  • the actuators in the custom component control system can handle multiple programming languages, including a variety of common programming languages.
  • the development method will be more flexible and can support developers to utilize different programming language ecology, thereby improving Compatibility and versatility of system architecture.
  • embodiments of the present application provide a method for controlling a custom component.
  • the method includes: transmitting data of the custom component to an actuator through a functional component; wherein the custom component includes a variety of programming methods.
  • the executable file compiled by the language; and the executor creates a process corresponding to the custom component through an embedded script, and runs the executable file in the process.
  • the operation data of the custom component is transmitted to the executor through the functional component, and the executor creates a corresponding sub-process to run the executable files compiled by multiple programming languages included in the custom component.
  • Multiple processes are independent of each other and do not interfere with each other, which simplifies the development of software architecture systems, reduces the waste of resource memory space, improves development efficiency, and solves the technical problems of poor universality and versatility.
  • embodiments of the present application further provide an electronic device, including: a processor and a memory.
  • the memory stores machine-readable instructions executable by the processor.
  • the machine-readable instructions are stored in the memory.
  • the instructions when executed by the processor, perform the steps of the above method.
  • embodiments of the present application provide a computer-readable storage medium.
  • a computer program is stored on the storage medium, and the computer program executes the steps of the above method when run by a processor.
  • Figure 1 is a schematic diagram of functional components of the first custom component control system provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of the functional components of the second custom component control system provided by the embodiment of the present application.
  • Figure 3 is a schematic diagram of the functional components of the third custom component control system provided by the embodiment of the present application.
  • Figure 4 is a flow chart of a custom component control method provided by an embodiment of the present application.
  • FIG. 5 is a block diagram of an electronic device providing a device according to an embodiment of the present application.
  • Icon 10-custom component control system; 12-functional component; 121-proxy server; 122-functional interface server; 123-component manager; 14-executor; 141-main process component; 142-shared memory space component; 143-Sub-process component; 300-Electronic device; 311-Memory; 312-Storage controller; 313-Processor; 314-Peripheral interface; 315-Input and output unit; 316-Display unit.
  • an industrial robot usually includes three parts: a robot body, a controller and a teaching pendant.
  • the teach pendant is a human-computer interaction device that is controlled through the developed teach pendant program, monitors system status, and sends and receives control instructions.
  • the current common way for controllers is to set up a control system based on Lua scripts and plug-ins.
  • system status and instructions through scripts Define the status structure of the control system in the script file. After starting the program, send the system status to the teach pendant according to the structure defined in the script. After receiving the status, the teach pendant reads the script file and obtains the status analysis method. All states are parsed out in turn, but the script of this solution only supports a certain fixed language and cannot take advantage of the language ecology of different programming languages. Therefore, it is difficult to meet the universal application between different versions and has poor versatility.
  • the embodiment of the present application provides a custom component control system 10.
  • the system includes: a functional component 12 and an actuator 14.
  • the functional component 12 is configured to transfer data of the custom component to the actuator 14. ;
  • the custom component includes executable files compiled by multiple programming languages; and the executor 14 is set to create a process corresponding to the custom component through an embedded script, and run the executable file in the process, which can make full use of
  • the inherent ecology of different programming languages supports multiple programming languages, improves development flexibility, and increases universality and versatility.
  • Figure 1 is a schematic diagram of the functional components 12 of the first custom component control system 10 provided by the embodiment of the present application. The system of Figure 1 will be described in detail below.
  • the custom component control system 10 includes: a functional component 12 and an actuator 14.
  • the functional component 12 is communicatively connected with the actuator 14; the functional component 12 is configured to transmit the data of the custom component to the actuator 14; wherein, the custom component It includes executable files compiled by multiple programming languages; and an executor 14 configured to create a process corresponding to the custom component through an embedded script and run the executable file in the process.
  • the custom component can be a collection of functions defined by the user in order to control intelligent equipment such as robots and implement corresponding functions such as gripper control, visual guidance, sensor control, communication protocols, custom instructions, etc.;
  • the functional component 12 can be A function is encapsulated through a function, and the same function is encapsulated into a file to form a collection of functions that store a certain function. Since the functional component 12 is used to pass the data of the custom component to the executor 14, its component The encapsulated function is the function used to implement the data transfer process.
  • Embedded scripts can be shell scripts.
  • Shell is a scripting language for interpretation and execution. It can be directly called Programming with Linux commands.
  • the shell is the command interpreter (command interpreter), which is the user interface of the Unix operating system.
  • the program obtains input information from the user interface.
  • the shell translates the user program and its input into instructions that can be recognized by the operating system kernel (kernel), and operates After the system kernel is executed, the returned output will be presented to the user through the shell.
  • the shell script can handle various programming languages, the shell script is used to create a process in the executor 14 and run the executable files compiled by various programming languages in the custom component, so that the customization of compilation of different programming languages can be realized. Processing and operation of components.
  • the custom component control system 10 is developed using the software architecture of the functional component 12 and the executor 14.
  • the unified interface of the functional component 12 can be used to realize interactive communication of custom components with multiple functional applications; by configuring script commands in the executor 14, Creating corresponding processes can monitor and display the running status of custom component files compiled in multiple programming languages; at the same time, the resources (CPU, memory, etc.) used between multiple processes are independent of each other and do not interfere with each other, improving the efficiency of Development efficiency solves the technical problems of poor universality and versatility.
  • Figure 2 is a schematic diagram of the functional components 12 of the second custom component control system 10 provided by the embodiment of the present application.
  • the system of Figure 2 will be described in detail below.
  • the executor 14 in the custom component control system 10 may specifically include: a main process component 141, a sub-process component 143 and a shared memory space component 142.
  • the main process component 141 is configured to create a sub-process and shared memory space corresponding to the custom component through an embedded script in the executor 14, and obtain the running status data of the sub-process from the shared memory space;
  • the sub-process component 143 is configured to To run the executable file in the sub-process created by the main process component 141 and output the running status data to the shared memory space;
  • the shared memory space component 142 is configured to receive the operation generated when the executable file is run in the sub-process component 143 status data.
  • both the main process and the sub-process can be programs created on the executor 14 through a Linux shell script; the main process can be the main program necessary for the executor 14 to work; the sub-process can be created through Fork in the main program.
  • a (derivative) function spawns multiple, almost identical processes, Each process starts a thread that starts executing from the same location in the code to open a new process, but does not load the code from the disk, but copies a copy from the existing process in the memory; the main process and the child process share the same block
  • the memory space performs data exchange.
  • the child process can output data to the shared memory space or obtain data by calling the pipe created by the pipe() function.
  • the pipe can be a mechanism that connects the standard input and standard output between the two processes. , thereby providing a method for communication between multiple processes.
  • the user operates a certain custom component to generate relevant data, such as saving, deleting, setting relevant parameter information, etc.
  • the functional component 12 receives these data, and these data can be passed as parameters by calling the relevant interface function.
  • the json data form is passed to the executor 14.
  • the executor 14 After receiving the data, the executor 14 first uses shell script Linux programming to create a running main program in the main process component 141, and establishes the custom component through the fork() function in the main program.
  • the corresponding sub-process at the same time, creates a pipe for the sub-process to output data to the shared memory space or obtain data by calling the pipe() function in the fork() function.
  • the write() function to write data, and use read () function reads the data; then the sub-process component 143 runs the data in the sub-process in the form of an executable file, generates relevant running status data, and outputs the running status data to the shared memory space through the pipeline; finally the shared memory space component 142 receives The sub-process component 143 outputs the running status data through the pipeline and stores it accordingly, so that the main process component 141 can obtain the running status data of the sub-process from the shared memory space at any time.
  • the executor 14 creates an independent shared memory space for data interaction.
  • the sub-process outputs or obtains data to the shared memory space through a pipe.
  • the main process of the executor 14 can obtain the running status and other data of the sub-process from the shared memory space; Create independent processes through the underlying Fork technology of Linux, and run custom components implemented by users in different programming languages in separate processes; simplifying the development of software architecture systems, reducing the waste of resource memory space, and having good compatibility , convenient for users to use.
  • the actuator 14 in the custom component control system 10 can be specifically It includes: main process component 141, sub-process component 143 and shared memory space component 142.
  • the executor 14 is configured to create multiple sub-processes corresponding to the number of custom components in the main process component 141 for the custom component.
  • the main process component 141 in the executor 14 when the user operates a certain custom component by saving, deleting, setting relevant parameter information, etc., the main process component 141 in the executor 14 will create the first subroutine corresponding to the custom component in the main program. process, one or more executable files included in the custom component are run in the first sub-process; if another or N custom components are operated at the same time, the main process component 141 in the executor 14 will Create a second sub-process or N-th sub-process corresponding to the custom component in the program, and run one or more executable files included in the custom component in the second sub-process or N-th sub-process.
  • the fork() function in the main process of the executor 14 By using the fork() function in the main process of the executor 14 to create multiple independent sub-processes corresponding to each of the custom components, it is possible to run custom component files compiled in multiple different programming languages at the same time, and at the same time, the executable file runs At this time, the resources (CPU, memory, etc.) used by multiple processes are independent of each other and do not interfere with each other, which improves development efficiency, universality, and versatility.
  • FIG. 3 is a schematic diagram of the functional components 12 of the third custom component control system 10 provided by the embodiment of the present application. The system of FIG. 3 will be described in detail below.
  • the functional components 12 in the custom component control system 10 may specifically include: a proxy server 121 , a functional interface server 122 and a component manager 123 .
  • the proxy server 121 is configured to receive data generated in the operation interface of the custom component, and transmit the data to the functional interface server 122 through a preset communication protocol; the functional interface server 122 is configured to provide a functional interface to receive the proxy The server 121 passes the data and triggers the component manager 123; and the component manager 123 accesses the executor 14 through the functional interface and transmits the data to the executor 14.
  • the preset communication protocol may be the Protobuf communication protocol, which is a structured data storage format that can be used for structured data serialization or serialization, and is used for language-independent and platform-based communication protocols, data storage and other fields.
  • Independent, extensible serialized structured data format self-
  • the operation interface of the defined component can be the front end corresponding to the running background of the custom component, for example: the operation interface of the user-defined component on the APP. In this operation interface, the custom component can be saved, deleted, and related parameter information can be set, etc.
  • proxy server 121 (Addon proxy server), which can provide REST (Representational State Transfer, a software architecture style) API interface protocol for custom components for communication and interaction
  • functional interface server 122 (Grpc server ) may provide multiple functional interface protocols including REST API interfaces for custom components for communication and interaction
  • the component manager 123 (Addon manager) may be mainly responsible for the installation, deployment, and operation management of different types of Addon components.
  • the user installs the custom component through the REST API on the APP side.
  • the proxy server 121 converts the information operated by the user on the custom component operation interface on the APP side into json data and creates a file with the extension ".proto" file, and write a program, compile the .proto file, generate a Go language file, use Protobuf in the program and execute the program, forward the data to the functional interface server 122 through the REST API interface, and the functional interface server 122 processes the data according to the corresponding interface protocol Transmit and trigger the component manager 123.
  • the component manager 123 accesses the executor 14.
  • the executor 14 creates a corresponding sub-process in the main process component 141 to run one or more executable files contained in the custom component. At the same time, it can pass Linux signal Signal to obtain the running status of custom components.
  • the operation data of the custom component is transmitted to the executor 14.
  • the executor 14 creates a corresponding sub-process to run one or more executables contained in the custom component. files, simplifying the development of software architecture systems, reducing the waste of resource memory space, and improving development efficiency.
  • the custom components in the custom component control system 10 include one or more of custom instruction components, custom function components, and custom service components.
  • custom components there are three types of custom components that users can develop and define: custom instruction components, custom function components, and custom service components.
  • application functions such as gripper control, visual guidance, and sensor control can be developed by custom components.
  • Communication services such as negotiation can be implemented by custom service components, and operation instructions such as commands and custom instructions can be implemented by custom instruction components.
  • the custom instruction component can be: other instructions other than the standard operating program instructions developed by the user according to the script specifications of the robot and other intelligent equipment;
  • the custom function component can be: the user develops through the REST API provided by the proxy server 121 function component Function;
  • Custom service components can be: secondary development interfaces in multiple different programming languages provided by smart devices such as robots.
  • the number of executable files is determined by one or more of the number of instructions, the number of functions, and the number of services of the custom component.
  • the number of executable files contained in the custom component is determined by the number of instructions, that is, one custom instruction is an executable file; if the user develops and defines , the defined custom component type is a custom function component, the number of executable files contained in the custom component is determined by the number of functions, that is, a custom function is an executable file; if the user develops and defines a custom component type If it is a custom service component, the number of executable files contained in the custom component is determined by the number of services, that is, a custom service is an executable file.
  • a custom instruction is an executable file
  • a custom function is an executable file
  • a custom service is an executable file
  • the plurality of programming languages include Python language, C++ language, Java language, and JavaScript language.
  • the multiple programming languages that the actuator 14 in the custom component control system 10 can process include multiple common programming languages.
  • Common programming languages can be divided into two categories: one is compiled language, such as: c/c++/java and other languages, all of which need to be compiled by a compiler before traveling; the other is interpreted language, such as: awk/perl /python/shell and other languages, when they are executed, they need to use an interpreter to convert them into code line by line.
  • the shell Since the shell has been standardized by POSIX, it can be transplanted on different Linux systems and can handle and support various programming languages. This makes the development method of this application more flexible and can support developers to utilize different programming language ecology. Thereby improving the compatibility and versatility of the system architecture.
  • Figure 4 is a flow chart of a custom component control method provided by an embodiment of the present application. The process of Figure 4 will be described in detail below.
  • the method may include: step 100 and step 120.
  • step 100 the functional component 12 transfers the data of the custom component to the executor 14; wherein the custom component includes executable files compiled by multiple programming languages; and step 120: the executor 14 , create a process corresponding to the custom component through an embedded script, and run the executable file in the process.
  • the operation data of the custom component is transmitted to the executor 14, and the executor 14 creates the corresponding subsystem through shell script Linux programming.
  • the process runs one or more executable files compiled by multiple programming languages contained in this custom component, which simplifies the development of the software architecture system and reduces the waste of resource and memory space; multiple processes are independent and independent of each other. Interference improves development efficiency and solves technical problems with poor universality and versatility.
  • the electronic device 300 may include a memory 311, a storage controller 312, a processor 313, a peripheral interface 314, an input and output unit 315, and a display unit 316.
  • a memory 311, a storage controller 312, a processor 313, a peripheral interface 314, an input and output unit 315, and a display unit 316 may be included in the structure shown in FIG. 5 .
  • electronic device 300 may also include more or fewer components than shown in FIG. 5 , or have a different configuration than shown in FIG. 5 .
  • the above-mentioned components of the memory 311, storage controller 312, processor 313, peripheral interface 314, input and output unit 315, and display unit 316 are directly or indirectly electrically connected to each other to realize data transmission or interaction.
  • these components may be electrically connected to each other through one or more communication buses or signal lines.
  • the above-mentioned processor 313 is used to execute executable components stored in the memory.
  • the memory 311 can be, but is not limited to, random access memory (RandomAccess Memory, RAM for short), read-only memory (Read Only Memory, ROM for short), programmable read-only memory (Programmable Read-Only Memory, PROM for short) , Erasable Programmable Read-Only Memory (EPROM for short), Electrically Erasable Programmable Read-Only Memory (EEPROM for short), etc.
  • RAM Random Access Memory
  • ROM Read Only Memory
  • PROM programmable read-only memory
  • PROM Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • the above-mentioned processor 313 may be an integrated circuit chip with signal processing capabilities.
  • the above-mentioned processor 313 can be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; it can also be a digital signal processor (digital signal processor, referred to as DSP) ), Application Specific Integrated Circuit (ASIC for short), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • peripheral interface 314 couples various input/output devices to the processor 313 and the memory 311 .
  • peripheral interface 314, processor 313, and memory controller 312 may be implemented in a single chip. In some other instances, they may each consist of separate chips accomplish.
  • the above-mentioned input and output unit 315 is used to provide input data to the user.
  • the input and output unit 315 may be, but is not limited to, a mouse, a keyboard, etc.
  • the above-mentioned display unit 316 provides an interactive interface (such as a user operation interface) between the electronic device 300 and the user for the user's reference.
  • the display unit 316 may be a liquid crystal display or a touch display.
  • a liquid crystal display or a touch display can display the process of the processor executing the program.
  • the electronic device 300 in this embodiment can be used to perform each step in each method provided by the embodiment of this application.
  • embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program. When the computer program is run by a processor, the steps in the above method embodiments are executed.
  • the computer program product of the above-mentioned method provided by the embodiment of the present application includes a computer-readable storage medium storing program code.
  • the instructions included in the program code can be used to execute the steps in the above-mentioned method embodiment.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the components is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • Each functional component in the embodiment of the present application can be integrated together to form an independent part, each component can exist alone, or two or more components can be integrated to form an independent part.
  • relational terms such as first, second, etc. are used merely to distinguish one entity or operation from another entity or operation and do not necessarily require or imply the existence of any such entity or operation between these entities or operations. Actual relationship or sequence.
  • the solutions provided by the embodiments of this application can be applied in the field of software framework technology.
  • a custom component control system with functional components and actuators is used, and embedded scripts are used to create corresponding processes run by multiple programming languages.
  • the compiled executable file has achieved the technical effects of simplifying the development process of software architecture systems, reducing the waste of resource and memory space, and improving development efficiency.

Abstract

本申请提供一种自定义组件控制系统、方法、设备及存储介质,涉及软件框架领域,该系统包括:功能组件和执行器,功能组件,设置为将自定义组件的数据传递至所述执行器;其中,自定义组件包括由多种编程语言所编译的可执行文件;以及执行器,设置为通过嵌入式脚本创建自定义组件对应的进程,并在进程中运行可执行文件,多个进程之间相互独立、互不干扰,能够支持多种编程语言的可执行文件同时运行,提高了开发的灵活性,增加了普适性、通用性。

Description

自定义组件控制系统、方法、设备及存储介质
本申请要求于2022年5月5日提交中国专利局、申请号为202210479430.0、发明名称为“自定义组件控制系统、方法、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及软件框架技术领域,具体而言,涉及一种自定义组件控制系统、方法、设备及存储介质。
背景技术
随着社会成本人力增加,机器人等智能设备被广泛应用在各行各业,应用场景越来越复杂。用户自定义的定制化需求也随之增长,市场上急需一种能够满足用户进行自定义开发的机器人等智能设备产品。现有开发的处理方案,通常包括用于以脚本文件形式添加或修改插件库组件中的各个功能插件,并与机器人等智能设备控制系统进行指令和状态通信的基础组件和用于为基础组件提供一个或多个功能插件的插件库组件。
目前,采用基础组件和插件库组件组合配合的软件架构,一定程度上增强了软件的开发灵活度,降低了开发工作量,但是由于仅支持某一种固定编程语言,难以满足不同版本之间的普适应用,通用性差,可扩展性差。
发明内容
有鉴于此,本申请实施例的目的在于提供一种自定义组件控制系统、方法、设备及存储介质,通过设置功能组件与执行器,利用嵌入式脚本创建对应进程运行由多种编程语言编译形成的可执行文件,从而解决“仅支持某一种固定编程语言,难以满足不同版本之间的普适应用,通用性差,可扩展性差”的技术问题。
第一方面,本申请实施例提供一种自定义组件控制系统,所述系统包括:功能组件和执行器,所述功能组件与所述执行器通信连接;所述功能组件,设置为将自定义组件的数据传递至所述执行器;其中,所述自定义组件包括由多种编程语言所编译的可执行文件;以及所述执行器,设置为通过嵌入式脚本创建所述自定义组件对应的进程,并在进程中运行所述可执行文件。
在上述实现过程中,采用功能组件和执行器的软件架构开发自定义组件控制系统,利用功能组件的统一接口可以实现带多种功能应用的自定义组件交互通信;通过在执行器中配置脚本命令,创建对应的进程,可以实现对多种编程语言编译的自定义组件文件运行状态的监控与显示;同时,多个进程之间相互独立、互不干扰,提高了开发效率,增加了普适性、通用性。
可选地,所述执行器包括:主进程组件,设置为在所述执行器中通过嵌入式脚本创建所述自定义组件对应的子进程、共享内存空间,并从所述共享内存空间获取所述子进程的运行状态数据;子进程组件,设置为在所述主进程组件创建的子进程中运行所述可执行文件,并向共享内存空间输出运行状态数据;以及共享内存空间组件,设置为接收所述可执行文件在所述子进程组件中运行时产生的运行状态数据。
在上述实现过程中,子进程组件向共享内存空间组件输出数据或者获取数据,同时执行器的主进程组件可以从共享内存空间组件获取子进程组件运行可执行文件的数据;通过创建独立的进程,在单独的进程内运行用户通过不同编程语言实现的自定义组件;简化了软件架构系统的开发,减小了资源内存空间的浪费,具有良好的兼容性,方便用户使用。
可选地,其中,若所述自定义组件为多个,则所述执行器配置为对所述自定义组件在所述主进程组件中创建对应所述自定义组件数目的多个子进程。
在上述实现过程中,通过在执行器的主进程组件中创建多个自定义组件各自对应的独立子进程,可以实现多种不同编程语言编译的自定义组件文件同时运行,同时,可执行文件运行时,多个进程之间相互独立、互不干扰,提高了开发效率,普适性、通用性。
可选地,所述功能组件包括:代理服务器,设置为接收在所述自定义组件的操作界面产生的数据,并通过预设通信协议将所述数据传输至功能接口服务器;功能接口服务器,设置为提供功能接口以接收所述代理服务器传递的数据,并触发组件管理器;以及组件管理器,通过所述功能接口访问所述执行器,并将所述数据传输至所述执行器。
在上述实现过程中,通过代理服务器、功能接口服务器以及组件管理器的配合,将自定义组件的操作数据传输至执行器,执行器创建对应子进程运行该自定义组件包含的一个或多个可执行文件,简化了软件架构系统的开发,减少了资源内存空间的浪费,提高了开发效率。
可选地,所述自定义组件包括自定义指令组件、自定义功能组件、自定义服务组件中的一种或多种。
在上述实现过程中,可以通过开发三种不同类型的自定义组件实现对机器人等智能设备的操作,实现了机器人等智能设备的控制由软件定义,软件由用户定义,自定义组件即插即用,增强了开发的灵活性。
可选地,其中,所述可执行文件的个数由所述自定义组件的指令个数、功能个数、服务个数中的一个或多个决定。
在上述实现过程中,一个自定义指令是一个可执行文件,一个自定义功能是一个可执行文件,一个自定义服务是一个可执行文件,从而实现在运行时指令之间、功能之间、服务之间相互独立,减小开发难度,提高程序出错时的错误排查效率。
可选地,所述多种编程语言包括Python语言、C++语言、Java语言以及JavaScript语言。
在上述实现过程中,该自定义组件控制系统中的执行器可以处理的多种编程语言包括多种常见的编程语言,开发方式会更加灵活,能够支持开发者利用不同的编程语言生态,从而提高系统架构的兼容性、通用性。
第二方面,本申请实施例提供了一种自定义组件控制方法,所述方法包括:由功能组件,将自定义组件的数据传递至执行器;其中,所述自定义组件包括由多种编程语言所编译的可执行文件;以及由执行器,通过嵌入式脚本创建所述自定义组件对应的进程,并在进程中运行所述可执行文件。
在上述实现过程中,通过功能组件将自定义组件的操作数据传输至执行器,执行器创建对应的子进程运行该自定义组件包含的由多种编程语言所编译的可执行文件,多个进程之间相互独立、互不干扰,简化了软件架构系统的开发,减少了资源内存空间的浪费,提高了开发效率,解决了普适性、通用性差的技术问题。
第三方面,本申请实施例还提供一种电子设备,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行上述的方法的步骤。
第四方面,本申请实施例提供一种计算机可读存储介质,所述存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述的方法的步骤。
为使本申请的上述目的、特征和优点能更明显易懂,下文特举实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人 员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1为本申请实施例提供的第一种自定义组件控制系统的功能组件示意图;
图2为本申请实施例提供的第二种自定义组件控制系统的功能组件示意图;
图3为本申请实施例提供的第三种自定义组件控制系统的功能组件示意图;
图4为本申请实施例提供的一种自定义组件控制方法的流程图;以及
图5为本申请实施例提供装置的电子设备的方框示意图。
图标:10-自定义组件控制系统;12-功能组件;121-代理服务器;122-功能接口服务器;123-组件管理器;14-执行器;141-主进程组件;142-共享内存空间组件;143-子进程组件;300-电子设备;311-存储器;312-存储控制器;313-处理器;314-外设接口;315-输入输出单元;316-显示单元。
具体实施方式
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行描述。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
本申请发明人注意到,以机器人为例,工业机器人通常包括三个部分:机器人本体、控制器和示教器。示教器是人机交互设备,通过开发的示教器程序控制,监测系统状态,以及收发控制指令。控制器现有常用方式是设置基于Lua脚本和插件的控制系统,在进行脚本配置系统状态和指令时, 在脚本文件中定义好控制系统的状态结构,启动程序后,按照脚本中定义的结构发送系统状态给示教器,示教器在接收到状态后,读取脚本文件,得到状态的解析方法,依次解析出所有状态,但是这种方案的脚本仅支持某种固定语言,不能利用不同编程语言的语言生态,从而难以满足不同版本之间的普适应用,通用性差。
基于上述研究,本申请实施例提供了一种自定义组件控制系统10,该系统包括:功能组件12和执行器14,功能组件12,设置为将自定义组件的数据传递至所述执行器14;其中,自定义组件包括由多种编程语言所编译的可执行文件;以及执行器14,设置为通过嵌入式脚本创建自定义组件对应的进程,并在进程中运行可执行文件,能够充分利用不同编程语言的固有生态,支持多种编程语言,提高了开发的灵活性,增加了普适性、通用性。
请参阅图1,图1为本申请实施例提供的第一种自定义组件控制系统10的功能组件12示意图,下面对图1的系统进行详细阐述。
该自定义组件控制系统10包括:功能组件12和执行器14,功能组件12与执行器14通信连接;功能组件12,设置为将自定义组件的数据传递至执行器14;其中,自定义组件包括由多种编程语言所编译的可执行文件;以及执行器14,设置为通过嵌入式脚本创建自定义组件对应的进程,并在进程中运行可执行文件。
示例性地,自定义组件,可以是用户为了操控机器人等智能设备,实现夹爪控制、视觉引导、传感器控制、通信协议、自定义指令等相应功能定义的函数集合体;功能组件12,可以是通过一个函数封装一个功能,将相同的功能封装到一个文件中,形成的存储某种功能的函数集合体,由于功能组件12用于将自定义组件的数据传递至执行器14,因此其组件中封装的函数是为实现数据传递过程所用到的功能。
嵌入式脚本可以是shell脚本,shell是解释执行的脚本语言,可直接调 用Linux命令进行编程。其中,shell是命令解释器(command interpreter),是Unix操作系统的用户接口,程序从用户接口得到输入信息,shell将用户程序及其输入翻译成操作系统内核(kernel)能够识别的指令,并且操作系统内核执行完将返回的输出通过shell再呈现给用户。由于shell脚本能处理各种编程语言,因此在执行器14中利用shell脚本创建进程,运行自定义组件中由各种编程语言所编译的可执行文件,从而可以实现对不同编程语言编译的自定义组件的处理、运行。
采用功能组件12和执行器14的软件架构开发自定义组件控制系统10,利用功能组件12的统一接口可以实现带多种功能应用的自定义组件交互通信;通过在执行器14中配置脚本命令,创建对应的进程,可以实现对多种编程语言编译的自定义组件文件运行状态的监控与显示;同时,多个进程之间使用的资源(CPU、内存等)相互独立、互不干扰,提高了开发效率,解决了普适性、通用性差的技术问题。
请参阅图2,图2为本申请实施例提供的第二种自定义组件控制系统10的功能组件12示意图,下面对图2的系统进行详细阐述。
该自定义组件控制系统10中的执行器14可以具体包括:主进程组件141、子进程组件143和共享内存空间组件142。
其中,主进程组件141,设置为在执行器14中通过嵌入式脚本创建自定义组件对应的子进程、共享内存空间,并从共享内存空间获取子进程的运行状态数据;子进程组件143,设置为在主进程组件141创建的子进程中运行可执行文件,并向共享内存空间输出运行状态数据;以及共享内存空间组件142,设置为接收可执行文件在子进程组件143中运行时产生的运行状态数据。
示例性地,主进程、子进程均可以是通过Linux shell脚本在执行器14端创建的程序;主进程可以是执行器14工作时所必要的主程序;子进程可以是在主程序中通过Fork(派生)函数产生的多个几乎完全一样的进程, 每个进程都启动一个从代码的同一位置开始执行的线程,实现新开一个进程,但是不从磁盘加载代码,而是从内存现有进程复制一份;主进程和子进程之间通过同一块共享内存空间进行数据交互,子进程可以通过调用pipe()函数创建的管道向共享内存空间输出数据或者获取数据,而管道可以是一种把两个进程之间的标准输入和标准输出连接起来的机制,从而提供一种让多个进程间通信的方法,当进程创建管道时,需要提供两个文件描述符来操作管道,其中一个对管道进行写操作,另一个对管道进行读操作。
可选地,用户操作某一个自定义组件产生了相关的数据,例如:保存、删除、设置相关参数信息等操作,功能组件12接收这些数据,并将这些数据可以通过调用相关接口函数传参以json数据形式传递至执行器14,执行器14接收到这些数据,首先在主进程组件141中使用shell脚本Linux编程创建运行的主程序,并在主程序中通过fork()函数建立该自定义组件对应的子进程,同时通过在fork()函数中调用pipe()函数创建子进程向共享内存空间输出数据或者获取数据的管道,对管道的读写可以使用write()函数写入数据,使用read()函数读出数据;然后子进程组件143以可执行文件形式在子进程中运行这些数据,产生相关运行状态数据,通过管道将运行状态数据输出到共享内存空间;最后共享内存空间组件142接收子进程组件143通过管道输出的运行状态数据,并进行对应存储,以方便主进程组件141可以随时从共享内存空间获取子进程的运行状态数据。
执行器14创建一块独立的共享内存空间用于数据交互,子进程通过管道向共享内存空间输出数据或者获取数据,同时执行器14的主进程可以从共享内存空间获取子进程的运行状态等数据;通过Linux底层的Fork技术创建独立的进程,在单独的进程内运行用户通过不同编程语言实现的自定义组件;简化了软件架构系统的开发,减小了资源内存空间的浪费,具有良好的兼容性,方便用户使用。
在一个实施例中,该自定义组件控制系统10中的执行器14可以具体 包括:主进程组件141、子进程组件143和共享内存空间组件142。
其中,若自定义组件为多个,则执行器14配置为对自定义组件在主进程组件141中创建对应自定义组件数目的多个子进程。
示例性地,用户通过保存、删除、设置相关参数信息等操作对某一个自定义组件进行了操作,执行器14中的主进程组件141会在主程序中创建该自定义组件对应的第一子进程,在第一子进程中运行该自定义组件包含的一个或多个可执行文件;若同时对另一个或者N个自定义组件进行了操作,执行器14中的主进程组件141会在主程序中创建该自定义组件对应的第二子进程或者第N子进程,在第二子进程或者第N子进程中运行该自定义组件包含的一个或多个可执行文件。
通过在执行器14的主进程中使用fork()函数创建多个自定义组件各自对应的独立子进程,可以实现对多种不同编程语言编译的自定义组件文件同时运行,同时,可执行文件运行时,多个进程之间使用的资源(CPU、内存等)相互独立、互不干扰,提高了开发效率,普适性、通用性。
请参阅图3,图3为本申请实施例提供的第三种自定义组件控制系统10的功能组件12示意图,下面对图3的系统进行详细阐述。
该自定义组件控制系统10中的功能组件12可以具体包括:代理服务器121、功能接口服务器122以及组件管理器123。
其中,代理服务器121,设置为接收在自定义组件的操作界面产生的数据,并通过预设通信协议将数据传输至功能接口服务器122;功能接口服务器122,设置为提供功能接口以接收所述代理服务器121传递的数据,并触发组件管理器123;以及组件管理器123,通过功能接口访问所述执行器14,并将数据传输至执行器14。
示例性地,预设通信协议可以是Protobuf通信协议,即一种结构化数据存储格式,可以用于结构化数据串行化或者序列化,用于通讯协议、数据存储等领域的语言无关、平台无关、可扩展的序列化结构数据格式;自 定义组件的操作界面可以是位于与该自定义组件运行后台对应的前端,例如:APP上用户自定义组件的操作界面,在该操作界面可以对自定义组件进行保存、删除、设置相关参数信息等操作;代理服务器121(Addon proxy server),可以是为自定义组件提供REST(Representational State Transfer,表述性状态传递,一种软件架构风格)API接口协议以进行通讯交互;功能接口服务器122(Grpc server)可以是为自定义组件提供包括REST API接口在内的多种功能接口协议以进行通讯交互;组件管理器123(Addon manager)可以是主要负责不同类型的Addon组件的安装部署,运行管理。
可选地,用户在APP端通过REST API安装自定义组件,安装成功后,代理服务器121通过将用户在APP端的自定义组件操作界面操作的信息转化为json数据,创建扩展名为“.proto”的文件,并编写程序,编译.proto文件,生成Go语言文件,在程序中使用Protobuf并执行程序,将数据通过REST API接口转发给功能接口服务器122,功能接口服务器122根据对应的接口协议进行数据传输并触发组件管理器123,组件管理器123访问执行器14,执行器14在主进程组件141中创建对应子进程运行该自定义组件包含的一个或多个可执行文件,同时可以通过Linux signal信号来获取自定义组件的运行状态。
通过代理服务器121、功能接口服务器122以及组件管理器123的配合,将自定义组件的操作数据传输至执行器14,执行器14创建对应子进程运行该自定义组件包含的一个或多个可执行文件,简化了软件架构系统的开发,减少了资源内存空间的浪费,提高了开发效率。
在一个实施例中,该自定义组件控制系统10中的自定义组件包括自定义指令组件、自定义功能组件、自定义服务组件中的一种或多种。
示例性地,用户可以开发、定义的自定义组件有自定义指令组件、自定义功能组件、自定义服务组件等三种类型,例如:夹爪控制、视觉引导、传感器控制等应用功能可以由自定义功能组件所实现,编程接口、通信协 议等通信服务可以由自定义服务组件所实现,命令、自定义指令等操作指令可以由自定义指令组件所实现。
其中,自定义指令组件可以是:用户根据机器人等智能设备的脚本规范开发出的标准作业程序指令之外的其它指令;自定义功能组件可以是:用户通过代理服务器121功能组件提供的RESTAPI开发的功能;自定义服务组件可以是:通过机器人等智能设备提供的多种不同编程语言的二次开发接口。
夹爪控制组件、视觉引导组件、传感器控制组件、通信协议、自定义指令等复杂的操作均可以通过开发不同类型的自定义组件实现,实现了机器人等智能设备的控制由软件定义,软件由用户定义,自定义组件即插即用,增强了开发的灵活性。
在一个实施例中,可执行文件的个数由自定义组件的指令个数、功能个数、服务个数中的一个或多个决定。
示例性地,若用户开发、定义的自定义组件类型为自定义指令组件,则自定义组件所包含的可执行文件数目由指令数目决定,即一个自定义指令是一个可执行文件;若用户开发、定义的自定义组件类型为自定义功能组件,则自定义组件所包含的可执行文件数目由功能数目决定,即一个自定义功能是一个可执行文件;若用户开发、定义的自定义组件类型为自定义服务组件,则自定义组件所包含的可执行文件数目由服务数目决定,即一个自定义服务是一个可执行文件。
由于一个自定义指令是一个可执行文件,一个自定义功能是一个可执行文件,一个自定义服务是一个可执行文件,因此可以实现在运行时指令之间、功能之间、服务之间相互独立、互不影响,减小开发难度,提高程序出错时的错误排查效率。
在一个实施例中,多种编程语言包括Python语言、C++语言、Java语言以及JavaScript语言。
示例性地,该自定义组件控制系统10中的执行器14可以处理的多种编程语言包括多种常见的编程语言。常见的编程语言可以分为两类:一个是编译型语言,例如:c/c++/java等语言,它们远行前全部需要经过编译器的编译;另一个是解释型语言,例如:awk/perl/python/shell等语言,它们执行时,需要使用解释器一行一行地转换为代码。由于shell经过了POSIX的标准化,因此它可以在不同的Linux系统上进行移植,从而可以处理、支持各种编程语言,使得本申请开发方式会更加灵活,能够支持开发者利用不同的编程语言生态,从而提高系统架构的兼容性、通用性。
请参阅图4,图4为本申请实施例提供的一种自定义组件控制方法的流程图,下面对图4的流程进行详细阐述。
该方法可以包括:步骤100和步骤120。
其中,步骤100:由功能组件12,将自定义组件的数据传递至执行器14;其中,所述自定义组件包括由多种编程语言所编译的可执行文件;以及步骤120:由执行器14,通过嵌入式脚本创建所述自定义组件对应的进程,并在进程中运行所述可执行文件。
示例性地,通过代理服务器121、功能接口服务器122以及组件管理器123等功能组件12的配合,将自定义组件的操作数据传输至执行器14,执行器14通过shell脚本Linux编程创建对应的子进程运行该自定义组件包含的由多种编程语言所编译的一个或多个可执行文件,简化了软件架构系统的开发,减少了资源内存空间的浪费;多个进程之间相互独立、互不干扰,提高了开发效率,解决了普适性、通用性差的技术问题。
请参阅图5,图5是电子设备的方框示意图。电子设备300可以包括存储器311、存储控制器312、处理器313、外设接口314、输入输出单元315、显示单元316。本领域普通技术人员可以理解,图5所示的结构仅为示意,其并不对电子设备300的结构造成限定。例如,电子设备300还可包括比图5中所示更多或者更少的组件,或者具有与图5所示不同的配置。
上述的存储器311、存储控制器312、处理器313、外设接口314、输入输出单元315、显示单元316各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。上述的处理器313用于执行存储器中存储的可执行组件。
其中,存储器311可以是,但不限于,随机存取存储器(RandomAccess Memory,简称RAM),只读存储器(Read Only Memory,简称ROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,简称EEPROM)等。其中,存储器311用于存储程序,所述处理器313在接收到执行指令后,执行所述程序,本申请实施例任一实施例揭示的过程定义的电子设备300所执行的方法可以应用于处理器313中,或者由处理器313实现。
上述的处理器313可能是一种集成电路芯片,具有信号的处理能力。上述的处理器313可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(digital signal processor,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
上述的外设接口314将各种输入/输出装置耦合至处理器313以及存储器311。在一些实施例中,外设接口314,处理器313以及存储控制器312可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片 实现。
上述的输入输出单元315用于提供给用户输入数据。所述输入输出单元315可以是,但不限于,鼠标和键盘等。
上述的显示单元316在电子设备300与用户之间提供一个交互界面(例如用户操作界面)给用户参考。在本实施例中,所述显示单元316可以是液晶显示器或触控显示器。液晶显示器或触控显示器可以对处理器执行所述程序的过程进行显示。
本实施例中的电子设备300可以用于执行本申请实施例提供的各个方法中的各个步骤。
此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中的步骤。
本申请实施例所提供的上述方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中的步骤,具体可参见上述方法实施例,在此不再赘述。
在本申请所提供的实施例中,应该理解到,所揭露装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述组件的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。在本申请实施例中的各功能组件可以集成在一起形成一个独立的部分,也可以是各个组件单独存在,也可以两个或两个以上组件集成形成一个独立的部分。
需要说明的是,功能如果以软件功能组件的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的 理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。
以上所述仅为本申请的实施例而已,并不用于限制本申请的保护范围,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
工业实用性
本申请实施例提供的方案可以应用于软件框架技术领域,在本申请实施例中,采用设置了功能组件与执行器的自定义组件控制系统,利用嵌入式脚本创建对应进程运行由多种编程语言编译形成的可执行文件,取得了简化软件架构系统的开发过程、减少资源内存空间的浪费、提高开发效率的技术效果。

Claims (10)

  1. 一种自定义组件控制系统,所述系统包括:功能组件和执行器,所述功能组件与所述执行器通信连接;
    所述功能组件,设置为将自定义组件的数据传递至所述执行器;其中,所述自定义组件包括由多种编程语言所编译的可执行文件;以及
    所述执行器,设置为通过嵌入式脚本创建所述自定义组件对应的进程,并在进程中运行所述可执行文件。
  2. 根据权利要求1所述的系统,其中,所述执行器包括:
    主进程组件,设置为在所述执行器中通过嵌入式脚本创建所述自定义组件对应的子进程、共享内存空间,并从所述共享内存空间获取所述子进程的运行状态数据;
    子进程组件,设置为在所述主进程组件创建的子进程中运行所述可执行文件,并向共享内存空间输出运行状态数据;以及
    共享内存空间组件,设置为接收所述可执行文件在所述子进程组件中运行时产生的运行状态数据。
  3. 根据权利要求2所述的系统,其中,若所述自定义组件为多个,则所述执行器配置为对所述自定义组件在所述主进程组件中创建对应所述自定义组件数目的多个子进程。
  4. 根据权利要求1所述的系统,其中,所述功能组件包括:
    代理服务器,设置为接收在所述自定义组件的操作界面产生的数据,并通过预设通信协议将所述数据传输至功能接口服务器;
    功能接口服务器,设置为提供功能接口以接收所述代理服务器传递的数据,并触发组件管理器;以及
    组件管理器,通过所述功能接口访问所述执行器,并将所述数据传输至所述执行器。
  5. 根据权利要求1至4任一所述的系统,其中,所述自定义组件包括自定义指令组件、自定义功能组件、自定义服务组件中的一种或多种。
  6. 根据权利要求5所述的系统,其中,所述可执行文件的个数由所述自定义组件的指令个数、功能个数、服务个数中的一个或多个决定。
  7. 根据权利要求1至4任一所述的系统,其中,所述多种编程语言包括Python语言、C++语言、Java语言以及JavaScript语言。
  8. 一种自定义组件控制方法,所述方法包括:
    由功能组件,将自定义组件的数据传递至执行器;其中,所述自定义组件包括由多种编程语言所编译的可执行文件;以及
    由执行器,通过嵌入式脚本创建所述自定义组件对应的进程,并在进程中运行所述可执行文件。
  9. 一种电子设备,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行如权利要求8所述的方法的步骤。
  10. 一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求8所述的方法的步骤。
PCT/CN2023/092259 2022-05-05 2023-05-05 自定义组件控制系统、方法、设备及存储介质 WO2023213295A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210479430.0A CN114756243A (zh) 2022-05-05 2022-05-05 自定义模块控制系统、方法、设备及存储介质
CN202210479430.0 2022-05-05

Publications (1)

Publication Number Publication Date
WO2023213295A1 true WO2023213295A1 (zh) 2023-11-09

Family

ID=82333777

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/092259 WO2023213295A1 (zh) 2022-05-05 2023-05-05 自定义组件控制系统、方法、设备及存储介质

Country Status (2)

Country Link
CN (1) CN114756243A (zh)
WO (1) WO2023213295A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756243A (zh) * 2022-05-05 2022-07-15 上海节卡机器人科技有限公司 自定义模块控制系统、方法、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391366A (zh) * 2017-07-07 2017-11-24 华为技术有限公司 一种测试用例的生成方法及执行方法和装置
CN109983411A (zh) * 2016-11-10 2019-07-05 菲尼克斯电气公司 程序模块的流程控制
CN110851240A (zh) * 2019-11-18 2020-02-28 北京小米移动软件有限公司 功能调用方法、装置及存储介质
CN114756243A (zh) * 2022-05-05 2022-07-15 上海节卡机器人科技有限公司 自定义模块控制系统、方法、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109983411A (zh) * 2016-11-10 2019-07-05 菲尼克斯电气公司 程序模块的流程控制
CN107391366A (zh) * 2017-07-07 2017-11-24 华为技术有限公司 一种测试用例的生成方法及执行方法和装置
CN110851240A (zh) * 2019-11-18 2020-02-28 北京小米移动软件有限公司 功能调用方法、装置及存储介质
CN114756243A (zh) * 2022-05-05 2022-07-15 上海节卡机器人科技有限公司 自定义模块控制系统、方法、设备及存储介质

Also Published As

Publication number Publication date
CN114756243A (zh) 2022-07-15

Similar Documents

Publication Publication Date Title
US5887172A (en) Remote procedure call system and method for RPC mechanism independent client and server interfaces interoperable with any of a plurality of remote procedure call backends
JP4690437B2 (ja) ネットワークアプリケーションにおける通信方法、通信装置及びそのためのプログラム
US20030056205A1 (en) System of reusable software parts for event flow synchronization and desynchronization, and methods of use
CN107493266B (zh) 嵌入式自助终端的通信系统、方法及装置
US8776024B2 (en) Software application fine-tuning method, system, and corresponding computer program product
WO2023213295A1 (zh) 自定义组件控制系统、方法、设备及存储介质
US20080244539A1 (en) Enabling analysis of software source code
EP1752873A2 (en) Method and apparatus for providing support for introspection for local and anonymous classes
CN102968333A (zh) 使本机程序被主程序调用时继承事务上下文的方法和系统
CN111176626A (zh) 跨编程语言的代码调用方法及装置、介质、设备
US5991538A (en) System for generating and using programs in an object-oriented environment with a message dispatch architecture
CN109074336B (zh) 用于对微控制器内的数据传输进行编程的系统和方法
US20210034418A1 (en) Peer-to-peer distributed computing system for heterogeneous device types
WO2014061516A1 (ja) 異なるタイプのロボットミドルウェア間を連携する変換モジュールの生成方法及び装置
EP2941694A1 (en) Capability based device driver framework
EP1935576A1 (en) An industrial robot system
CN114938397A (zh) 一种基于kaitai的高效率协议解包组包方法、系统和可读存储介质
US20060010421A1 (en) Methods and apparatus for portable object-oriented components
EP2941695A1 (en) High throughput low latency user mode drivers implemented in managed code
WO2022205173A1 (zh) 用于跨控制对象执行工作流任务的方法和装置
JPH064498A (ja) マルチプロセッサ処理装置
CN117240936A (zh) 网络通讯连接建立方法、应用、系统、存储介质及设备
Haller et al. A formal model for direct-style asynchronous observables
Cooperman TOp-C: Task Oriented parallel C/C++
Doubleday et al. DURRA: A Task Description Language User's Manual: Version 2

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: 23799281

Country of ref document: EP

Kind code of ref document: A1