CN111897599A - Service method, device, device and storage medium based on microkernel model plug-in mode - Google Patents
Service method, device, device and storage medium based on microkernel model plug-in mode Download PDFInfo
- Publication number
- CN111897599A CN111897599A CN202010755915.9A CN202010755915A CN111897599A CN 111897599 A CN111897599 A CN 111897599A CN 202010755915 A CN202010755915 A CN 202010755915A CN 111897599 A CN111897599 A CN 111897599A
- Authority
- CN
- China
- Prior art keywords
- plug
- algorithm
- service
- dynamic library
- main program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及人工智能,尤其是涉及一种基于微核模型插件模式的服务方法、装置、设备及存储介质。The present invention relates to artificial intelligence, in particular to a service method, device, device and storage medium based on a microkernel model plug-in mode.
背景技术Background technique
随着目前AI人工智能技术的不断发展、进步,这些技术将能够改变现代生活,甚至能够使得某些行业发生根本性的变革,人工智能的应用逐渐涉及到日常生活的方方面面。AI人工智能技术主要依靠的是数据、算力、算法,数据是模型训练的基础,算力是训练模型的工具,算法就是模型的训练方法,训练方法不一样,就导致了各种算法的诞生或者衍化。With the continuous development and progress of the current AI artificial intelligence technology, these technologies will be able to change modern life, and even make some fundamental changes in some industries. The application of artificial intelligence gradually involves all aspects of daily life. AI artificial intelligence technology mainly relies on data, computing power, and algorithms. Data is the basis of model training, computing power is the tool for training models, and algorithms are the training methods of models. Different training methods lead to the birth of various algorithms. or derivative.
现有技术一般情况下是将模型根据项目的实际需要(实际应用场景)进行深度结合,编码实现(训练出模型),以满足项目或客户的需求,为客户提供某种具体的功能。这种方式,虽然实现了算法的落地,但是功能上无法扩展,客户群体之间无法通用,升级换代需要重新部署,可借鉴参考价值几乎没有,导致研发和运维人员长时间的重复劳动,产出率低下。In the prior art, the models are generally combined in depth according to the actual needs of the project (actual application scenarios), and the coding is implemented (the model is trained) to meet the needs of the project or customers and provide customers with certain specific functions. In this way, although the implementation of the algorithm is realized, the function cannot be expanded, and the customer groups cannot be used in common use. The upgrade requires redeployment. There is almost no reference value for reference, resulting in long-term repetitive work for R&D and operation and maintenance personnel, and production Low yield.
发明内容SUMMARY OF THE INVENTION
本发明提供一种基于微核模型插件模式的服务方法、装置、设备及存储介质,其主要目的在于提高算法功能的扩展性、通用性、并发性和兼容性,以满足不同客户、不同场景下的应用。The present invention provides a service method, device, device and storage medium based on the plug-in mode of the microkernel model, the main purpose of which is to improve the scalability, versatility, concurrency and compatibility of algorithm functions, so as to meet the needs of different customers and different scenarios. Applications.
为实现上述目的,本发明提供一种基于微核模型插件模式的服务方法,该方法包括:In order to achieve the above object, the present invention provides a service method based on the microkernel model plug-in mode, the method comprising:
基于微核模型插件模式,将系统主程序作为核心部件,采用分层设计在所述系统主程序中部署算法插件管理层和辅助服务层;Based on the plug-in mode of the microkernel model, the system main program is used as the core component, and the algorithm plug-in management layer and the auxiliary service layer are deployed in the system main program by a layered design;
通过所述算法插件管理层定义系统的插件接口,按照所述插件接口,将算法封装成独立的算法动态库插件;The plug-in interface of the system is defined by the algorithm plug-in management layer, and the algorithm is encapsulated into an independent algorithm dynamic library plug-in according to the plug-in interface;
在所述辅助服务层的辅助下,采用所述算法插件管理层对所述算法动态库插件进行统一管理,以对外进行算法服务。With the assistance of the auxiliary service layer, the algorithm plug-in management layer is used to uniformly manage the algorithm dynamic library plug-ins, so as to provide algorithm services to the outside world.
可选地,采用所述算法插件管理层对所述算法动态库插件进行统一管理的步骤中,包括:Optionally, in the step of using the algorithm plug-in management layer to uniformly manage the algorithm dynamic library plug-in, including:
根据算法服务请求,将算法动态库插件加载到系统主程序中;Load the algorithm dynamic library plug-in into the system main program according to the algorithm service request;
根据算法卸载请求,卸载系统主程序中的算法动态库插件;Uninstall the algorithm dynamic library plug-in in the system main program according to the algorithm uninstall request;
根据算法间的依赖关系,对算法动态库插件进行依赖调用,以将多个算法动态库插件组合起来加载到系统主程序中。According to the dependencies between the algorithms, the algorithm dynamic library plug-in is called dependently, so as to combine multiple algorithm dynamic library plug-ins and load them into the system main program.
可选地,采用所述算法插件管理层对所述算法动态库插件进行统一管理的步骤中,还包括:构建系统服务配置文件,以将算法动态库插件加载到系统主程序中;所述构建系统服务配置文件,以将算法动态库插件加载到系统主程序中的步骤,包括:Optionally, in the step of using the algorithm plug-in management layer to uniformly manage the algorithm dynamic library plug-in, it also includes: constructing a system service configuration file to load the algorithm dynamic library plug-in into the system main program; The system service configuration file to load the algorithm dynamic library plug-in into the system main program, including:
识别所述算法动态库插件的名称,获取所述算法动态库插件的配置信息的所在路径;Identify the name of the algorithm dynamic library plug-in, and obtain the path where the configuration information of the algorithm dynamic library plug-in is located;
根据所在路径,将所述算法动态库插件的配置信息加入到系统主程序的配置文件中,构建得到系统服务配置文件;According to the path, the configuration information of the algorithm dynamic library plug-in is added to the configuration file of the system main program, and the system service configuration file is obtained by constructing;
读取所述系统服务配置文件,以将算法动态库插件加载到系统主程序中。Read the system service configuration file to load the algorithm dynamic library plug-in into the system main program.
可选地,读取所述系统服务配置文件以将算法动态库插件加载到系统主程序中的步骤之后,还包括:Optionally, after the step of reading the system service configuration file to load the algorithm dynamic library plug-in into the system main program, it also includes:
读取所述算法动态库插件的配置项;Read the configuration items of the algorithm dynamic library plug-in;
根据所述配置项的enalbed值,判断所述算法动态库插件是否生效;若enalbed值配置成1,则加载成功且所述算法动态库插件生效,否则,所述算法动态库插件未生效。According to the enalbed value of the configuration item, it is judged whether the algorithm dynamic library plug-in takes effect; if the enalbed value is configured as 1, the loading is successful and the algorithm dynamic library plug-in takes effect, otherwise, the algorithm dynamic library plug-in does not take effect.
可选地,所述辅助服务层的辅助,包括:Optionally, the assistance of the auxiliary service layer includes:
接收外部发出的算法服务请求;Receive algorithm service requests from outside;
维护系统内算法服务请求队列,进行任务调度管理,生成调用请求;Maintain the algorithm service request queue in the system, perform task scheduling management, and generate call requests;
将调用请求分发至算法动态库插件中进行处理;Distribute the call request to the algorithm dynamic library plug-in for processing;
记录或查询系统的算法服务的运行状态;Record or query the running status of the algorithm service of the system;
对运行时的各项数据进行维护、实时更新和及时生效。Maintain, update and take effect in time for various data during runtime.
可选地,所述方法还包括:在所述系统主程序中部署网络服务层,在所述网络服务层中设置对外服务接口;根据外部网络环境,通过所述网络服务层调用所述对外服务接口,并基于ZMQ的通信模式进行通信连接。Optionally, the method further includes: deploying a network service layer in the system main program, setting an external service interface in the network service layer; calling the external service through the network service layer according to an external network environment interface, and make communication connections based on ZMQ's communication mode.
可选地,所述方法还包括:根据定制化需求,编写指定功能的算法动态库插件,以加载到系统主程序中进行相应的算法服务。Optionally, the method further includes: writing an algorithm dynamic library plug-in with a specified function according to the customized requirements, so as to be loaded into the system main program for corresponding algorithm service.
为实现上述目的,本发明还提供一种基于微核模型插件模式的服务装置,所述装置包括:In order to achieve the above object, the present invention also provides a service device based on the plug-in mode of the microkernel model, and the device includes:
分层部署模块,用于基于微核模型插件模式,以系统主程序为核心部件,采用分层设计在所述系统主程序中部署算法插件管理层和辅助服务层;The layered deployment module is used to deploy the algorithm plug-in management layer and the auxiliary service layer in the system main program by adopting a layered design based on the plug-in mode of the microkernel model, with the system main program as the core component;
封装模块,用于根据所述算法插件管理层定义的系统的插件接口,将算法封装成独立的算法动态库插件;an encapsulation module for encapsulating the algorithm into an independent algorithm dynamic library plugin according to the plugin interface of the system defined by the algorithm plugin management layer;
管理服务模块,用于在所述辅助服务层的配合下,通过所述算法插件管理层对所述算法动态库插件进行统一管理,以对外进行算法服务。The management service module is used for unified management of the algorithm dynamic library plug-in through the algorithm plug-in management layer under the cooperation of the auxiliary service layer, so as to provide external algorithm services.
为实现上述目的,本发明还提供一种电子设备,所述电子设备包括:In order to achieve the above object, the present invention also provides an electronic device, the electronic device includes:
至少一个处理器;以及,at least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述所述的基于微核模型插件模式的服务方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the microkernel model based plug-in mode described above. service method.
为实现上述目的,本发明还提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现上述所述的基于微核模型插件模式的服务方法。To achieve the above object, the present invention also provides a computer-readable storage medium storing a computer program, the computer program implementing the above-mentioned service method based on the plug-in mode of the microkernel model when the computer program is executed by the processor.
本发明中的系统主程序与各算法之间形成了微核模型插件架构,系统主程序采用分层设计将算法插件管理层独立出来,利用该算法插件管理层对系统的插件接口进行定义,并在辅助服务层的辅助下对算法动态库插件进行统一性管理,实现了各算法间的独立,使得各算法间无耦合,无干扰,同时提高了算法功能的扩展性,通用性,并发性和兼容性。本发明涉及了分布式人工智能。本发明通过对逻辑程序设计,从而可以满足不同客户、不同场景下的应用;有效的降低客户的系统开发成本、后期运维成本。A microkernel model plug-in architecture is formed between the system main program and each algorithm in the present invention, the system main program adopts a layered design to separate the algorithm plug-in management layer, and uses the algorithm plug-in management layer to define the system plug-in interface, and With the assistance of the auxiliary service layer, the algorithm dynamic library plug-in is managed in a unified way, which realizes the independence of each algorithm, makes each algorithm without coupling and interference, and improves the scalability, versatility, concurrency and compatibility. The present invention relates to distributed artificial intelligence. The present invention can meet the application of different customers and different scenarios by designing the logic program, and effectively reduce the customer's system development cost and later operation and maintenance cost.
附图说明Description of drawings
图1是本发明一实施例提供的基于微核模型插件模式的服务方法的流程图;1 is a flowchart of a service method based on a microkernel model plug-in mode provided by an embodiment of the present invention;
图2为本发明一实施例提供的微核模型插件架构设计示意图;2 is a schematic diagram of a microkernel model plug-in architecture design provided by an embodiment of the present invention;
图3为本发明一实施例提供的基于微核模型插件模式的服务的整体架构设计图;3 is an overall architecture design diagram of a service based on the microkernel model plug-in mode provided by an embodiment of the present invention;
图4为本发明一实施例提供的算法间依赖解耦示意图;FIG. 4 is a schematic diagram of dependency decoupling between algorithms provided by an embodiment of the present invention;
图5为本发明一实施例提供的外部应用调用remake示意图;5 is a schematic diagram of an external application calling remake provided by an embodiment of the present invention;
图6是本发明一实施例提供的基于微核模型插件模式的服务装置的功能模块示意图;6 is a schematic diagram of functional modules of a service device based on a microkernel model plug-in mode provided by an embodiment of the present invention;
图7为本发明一实施例提供的实现基于微核模型插件模式的服务方法的电子设备的内部结构示意图。FIG. 7 is a schematic diagram of an internal structure of an electronic device for implementing a service method based on a microkernel model plug-in mode according to an embodiment of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
本发明提供一种基于微核模型插件模式的服务方法。参照图1所示,为本发明一实施例提供的基于微核模型插件模式的服务方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。The present invention provides a service method based on a microkernel model plug-in mode. Referring to FIG. 1 , it is a schematic flowchart of a service method based on the plug-in mode of the microkernel model provided by an embodiment of the present invention. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
在本实施例中,基于微核模型插件模式的服务方法包括:In this embodiment, the service method based on the microkernel model plug-in mode includes:
S1、基于微核模型插件模式,将系统主程序作为核心部件,采用分层设计在所述系统主程序中部署算法插件管理层和辅助服务层。S1. Based on the microkernel model plug-in mode, the system main program is used as the core component, and the algorithm plug-in management layer and the auxiliary service layer are deployed in the system main program by using a layered design.
其中,基于微核模型插件模式,以系统主程序为核心,将系统主程序与各算法之间设计成微核模型插件架构。参照图2所示,为本发明一实施例提供的微核模型插件架构设计示意图,可以将算法A到算法G等算法分布式部署加载到系统主程序上以形成一种微核模型插件架构。Among them, based on the microkernel model plug-in mode, with the system main program as the core, the microkernel model plug-in architecture is designed between the system main program and each algorithm. Referring to FIG. 2, which is a schematic diagram of a microkernel model plug-in architecture design provided by an embodiment of the present invention, algorithms such as algorithm A to algorithm G can be distributed and loaded into the system main program to form a microkernel model plug-in architecture.
本发明通过对系统主程序进行分层设计,将算法插件管理层独立出来,辅以辅助服务层,各功能之间相互组合,后续将算法动态库插件接入后,可形成高效的算法服务。其中,所述系统主程序在不接入算法动态库插件的情况下,仍然可以保持系统的正常运行,只是不提供具体的算法功能服务。The present invention separates the algorithm plug-in management layer by layering the system main program, supplemented by the auxiliary service layer, and combines the functions with each other. After the algorithm dynamic library plug-in is subsequently connected, efficient algorithm services can be formed. Wherein, the system main program can still maintain the normal operation of the system without accessing the algorithm dynamic library plug-in, but does not provide specific algorithm function services.
S2、通过所述算法插件管理层定义系统的插件接口,按照所述插件接口,将算法封装成独立的算法动态库插件。S2. Define the plug-in interface of the system through the algorithm plug-in management layer, and encapsulate the algorithm into an independent algorithm dynamic library plug-in according to the plug-in interface.
其中,所述定义系统的插件接口的步骤中,包括:定义插件接口形式的步骤。具体地,可以将插件接口形式定义为Init、UnInit、Config、Version和Process五大类接口。所述算法插件管理层根据插件的设计思想独立设计标准的系统的插件接口,后续算法动态库插件,只要按照标准提供符合这些定义的插件接口的对外接口,就可以无缝接入到系统主程序中,进行正常工作,提供相应的算法功能。本发明中算法动态库插件可以按照微服务的模式进行分布式或集群式部署,部署方式上比较灵活,可根据实际需要选择合适的算法功能。Wherein, the step of defining the plug-in interface of the system includes the step of defining the form of the plug-in interface. Specifically, the plug-in interface form can be defined as five types of interfaces: Init, UnInit, Config, Version and Process. The algorithm plug-in management layer independently designs the plug-in interface of the standard system according to the design idea of the plug-in, and the subsequent algorithm dynamic library plug-in can be seamlessly connected to the main program of the system as long as the external interface conforming to these defined plug-in interfaces is provided according to the standard. , perform normal work and provide corresponding algorithm functions. The algorithm dynamic library plug-in in the present invention can be deployed in a distributed or clustered manner according to the micro-service mode, and the deployment mode is relatively flexible, and an appropriate algorithm function can be selected according to actual needs.
S3、在所述辅助服务层的辅助下,采用所述算法插件管理层对所述算法动态库插件进行统一管理,以对外进行算法服务。本发明所述算法插件管理层在辅助服务层的配合下,对算法动态库插件进行统一管理,实现了各算法间的独立,使得各算法间无耦合,无干扰;同时提高了算法功能的扩展性,通用性,并发性和兼容性。S3. Under the assistance of the auxiliary service layer, the algorithm plug-in management layer is used to uniformly manage the algorithm dynamic library plug-ins, so as to provide algorithm services to the outside world. The algorithm plug-in management layer of the invention manages the algorithm dynamic library plug-ins in a unified manner under the cooperation of the auxiliary service layer, realizes the independence of each algorithm, makes each algorithm free of coupling and interference, and improves the expansion of algorithm functions at the same time. nature, generality, concurrency and compatibility.
进一步地,所述算法插件管理层对算法动态库插件进行统一管理的步骤中,包括:Further, in the step that the algorithm plug-in management layer performs unified management on the algorithm dynamic library plug-in, including:
S31,根据算法服务请求,将算法动态库插件加载到系统主程序中;S31, load the algorithm dynamic library plug-in into the system main program according to the algorithm service request;
S32,根据需要,卸载系统主程序中的算法动态库插件;S32, as needed, uninstall the algorithm dynamic library plug-in in the system main program;
S33,根据算法间的依赖关系,对算法动态库插件进行依赖调用,以将多个算法动态库插件组合起来加载到系统主程序中。S33, according to the dependencies between the algorithms, make a dependency call to the algorithm dynamic library plug-in, so as to combine multiple algorithm dynamic library plug-ins and load them into the system main program.
图4示出了本发明一实施例的算法间依赖解耦示意图。如图4所示,针对算法动态库插件之间的依赖关系,特别设计了依赖调用接口,将算法间的依赖关系调整为由上层即算法插件管理层选择被依赖算法的调用,也有效的解决了算法间的耦合关系,使得每个算法能够独立运行,在算法内部形成闭环。如图4所示,现有技术中算法B依赖算法A,正常情况下,部署算法B时必须再带一套算法A,相当于系统服务内部存在两套算法A,而本申请在所述算法插件管理层中部署插件依赖调用接口,该依赖调用接口的设置可以将算法A和算法B组合进行算法服务,避免了系统中存在多个相同算法A的问题。需要说明的是,该依赖调用接口为开放接口,其中可以包含有多种算法间的多种依赖关系。采用上述设计模式,能够将各算法有机、任意的组合,提高了算法功能的扩展性,可以提供多种形式的服务功能,满足不同客户、不同场景下的各种应用。FIG. 4 shows a schematic diagram of dependency decoupling between algorithms according to an embodiment of the present invention. As shown in Figure 4, for the dependency between the algorithm dynamic library plugins, a dependency calling interface is specially designed, and the dependency between algorithms is adjusted to be called by the upper layer, that is, the management layer of the algorithm plugin to select the dependent algorithm, which is also an effective solution. The coupling relationship between algorithms is established, so that each algorithm can run independently, forming a closed loop inside the algorithm. As shown in FIG. 4 , in the prior art, algorithm B depends on algorithm A. Under normal circumstances, when deploying algorithm B, another set of algorithm A must be carried, which is equivalent to the existence of two sets of algorithm A in the system service. The plug-in dependency call interface is deployed in the plug-in management layer. The setting of the dependency call interface can combine Algorithm A and Algorithm B for algorithm service, avoiding the problem of multiple identical Algorithms A in the system. It should be noted that the dependency calling interface is an open interface, which may contain multiple dependencies among multiple algorithms. Using the above design mode, each algorithm can be combined organically and arbitrarily, which improves the scalability of algorithm functions, and can provide various forms of service functions to meet various applications in different customers and different scenarios.
在一实施例中,所述方法还包括:根据某些特殊场景或者客户提出的一些定制化需求等,按照实际业务需求,编写指定功能的算法动态库插件,按照上述方法接入系统主程序,就能就能直接满足要求。这种方式大大减少了研发人员的重复性开发工作,同时也减轻了运维人员的维护工作,使得团队的重心更偏向于算法本身的研究,而无需关心工程化部署的工作。In one embodiment, the method further includes: according to some special scenarios or some customized requirements put forward by customers, etc., according to actual business requirements, writing an algorithm dynamic library plug-in with specified functions, and accessing the system main program according to the above method, can directly meet the requirements. This method greatly reduces the repetitive development work of R&D personnel, and also reduces the maintenance work of operation and maintenance personnel, so that the focus of the team is more inclined to the research of the algorithm itself, rather than the work of engineering deployment.
本发明是将算法变成服务的通用型工程化方法,其参照微核模型插件模式和微服务模型的独立功能模式设计思想,将系统主程序部署为核心部件,具体的算法模块封装成各自独立的算法动态库插件,充分考虑了各算法的功能独特性、算法间的依赖性以及多种算法相互融合配合使用的特点,高效的将各算法糅合在一起,并且相互间无耦合,无干扰,使得算法服务功能具备了通用性、扩展性、并发性、兼容性等。针对具体某算法功能而言,可根据实际部署运行环境,可部署能提供的全部的算法功能服务,也可按照微服务的模式进行分布式、集群式部署。微服务功能是指按照集群式或者分布式,单独部署某套算法或者某一些算法组成的服务。本系统在部署方式上比较灵活,可根据实际需要选择合适的算法功能;能够有效降低开发人员、维护人员的重复性劳动;并且本案对于网络高并发系统或者多系统融合等,都具有极高的参考价值,能够有效的降低客户的系统开发成本、后期运维成本,能够让客户将人力、资金等投入在擅长的领域,创造更大的价值。The present invention is a general engineering method for turning algorithms into services, referring to the design idea of the plug-in mode of the micro-kernel model and the independent function mode of the micro-service model, deploying the main program of the system as the core component, and encapsulating the specific algorithm modules into independent functions. The algorithm dynamic library plug-in fully considers the uniqueness of the functions of each algorithm, the dependencies between the algorithms, and the characteristics of the fusion and cooperation of multiple algorithms, and efficiently combines the algorithms without coupling and interference. The algorithm service function has the versatility, scalability, concurrency, compatibility and so on. For a specific algorithm function, according to the actual deployment operating environment, all algorithm function services that can be provided can be deployed, or distributed and clustered deployment can be carried out according to the microservice mode. The microservice function refers to a service composed of a set of algorithms or some algorithms that are deployed separately in a clustered or distributed manner. This system is more flexible in deployment mode, and suitable algorithm functions can be selected according to actual needs; it can effectively reduce the repetitive work of developers and maintenance personnel; and this case has extremely high network concurrency systems or multi-system integration, etc. The reference value can effectively reduce the customer's system development cost and post-operation and maintenance cost, and allow customers to invest manpower and capital in their areas of expertise to create greater value.
进一步地,所述算法插件管理层对所述算法动态库插件进行统一管理的步骤中,还可以包括:S34,构建系统服务配置文件,以将算法动态库插件加载到系统主程序中。Further, the step of uniformly managing the algorithm dynamic library plug-in by the algorithm plug-in management layer may further include: S34, constructing a system service configuration file to load the algorithm dynamic library plug-in into the system main program.
需要说明的是,上述步骤S31~S34的描述并不是限定其顺序的先后,仅为了体现统一管理所包含的多个功能作用。It should be noted that, the descriptions of the above steps S31 to S34 do not limit the order of the steps, but are only intended to reflect the multiple functions included in the unified management.
本发明中,所述算法插件管理层对算法动态库插件进行统一管理,是在辅助服务层的辅助下进行的。优选地,所述辅助服务层的辅助,包括:接收外部发出的算法服务请求;维护系统内算法服务请求队列,进行任务调度管理,生成调用请求;将调用请求分发至算法动态库插件中进行处理;记录或查询系统的算法服务的运行状态;对运行时的各项数据进行维护、实时更新和及时生效。In the present invention, the algorithm plug-in management layer performs unified management of the algorithm dynamic library plug-in under the assistance of the auxiliary service layer. Preferably, the assistance of the auxiliary service layer includes: receiving algorithm service requests sent from outside; maintaining the algorithm service request queue in the system, performing task scheduling management, and generating call requests; distributing the call requests to the algorithm dynamic library plug-in for processing ; Record or query the running status of the algorithm service of the system; maintain, update and take effect in time for various data at runtime.
图3中示出了本发明一实施例中基于微核模型插件模式的服务的整体架构设计图。本发明的核心思想是将算法插件管理层独立出来,辅以上述的辅助服务层即配置管理、日志管理、并发管理、路由管理、队列管理、数据管理等等,辅助服务层内各功能相互结合,形成高效的算法服务,对外提供算法服务功能。FIG. 3 shows an overall architectural design diagram of a service based on the plug-in mode of the microkernel model in an embodiment of the present invention. The core idea of the present invention is to separate the algorithm plug-in management layer, supplemented by the above-mentioned auxiliary service layer, namely configuration management, log management, concurrency management, routing management, queue management, data management, etc., the functions in the auxiliary service layer are combined with each other , form an efficient algorithm service, and provide algorithm service functions to the outside world.
参考图3所示,所述算法插件管理层中可以包括:插件加载,插件卸载,插件接口定义,插件配置,插件调用,依赖调用等等,以实现上述对所述算法动态库插件的统一管理。所述算法插件管理层按照插件的设计思想,独立设计符合该系统的插件接口,以将对应的算法动态库插件接入系统主程序中以对外提供算法服务。Referring to Fig. 3, the algorithm plugin management layer may include: plugin loading, plugin unloading, plugin interface definition, plugin configuration, plugin invocation, dependency invocation, etc., to achieve the above unified management of the algorithm dynamic library plugins . The algorithm plug-in management layer independently designs the plug-in interface conforming to the system according to the design idea of the plug-in, so as to connect the corresponding algorithm dynamic library plug-in to the main program of the system to provide algorithm services to the outside.
所述辅助服务层可以包括配置管理、日志管理、并发管理、路由管理、队列管理、数据管理等等,以实现上述的辅助服务层对算法插件管理层的辅助作用。具体地,所述辅助服务层通过配置管理提供系统服务的配置参数的读写,算法库配置项的读取;通过日志管理提供系统服务运行状态记录,日志查询等;通过并发管理和路由管理在高并发的调用请求时,有效的进行任务调度管理,将调用请求分发至对应的算法进行处理,提高系统服务的并发处理能力;通过队列管理对系统内消息队列进行维护,支撑并发管理任务调度等;通过数据管理提供系统运行时的各项数据的维护,实时更新,及时生效等。The auxiliary service layer may include configuration management, log management, concurrency management, routing management, queue management, data management, etc., so as to realize the auxiliary function of the above-mentioned auxiliary service layer to the algorithm plug-in management layer. Specifically, the auxiliary service layer provides reading and writing of configuration parameters of system services and reading of configuration items of algorithm libraries through configuration management; provides system service running status recording, log query, etc. through log management; When there are high concurrent call requests, it can effectively carry out task scheduling management, distribute the call requests to the corresponding algorithms for processing, and improve the concurrent processing capability of system services; maintain the message queue in the system through queue management, and support concurrent management task scheduling, etc. ;Provide maintenance, real-time update, and timely effect of various data when the system is running through data management.
可选地,如图3所示,还可以在系统主程序中部署网络服务层,所述网络服务层用于提供系统对外调用的对外服务接口,并通过ZMQ进行接口通信。具体地,在所述网络服务层中设置对外服务接口,根据外部网络环境,通过所述网络服务层调用所述对外服务接口,并基于ZMQ的通信模式进行通信连接。从而能适配各种编程语言及机器网络环境,也避免了由于硬件条件、开发人员技能水平、技术架构等因素导致的不兼容问题,有效降低了使用方的开发维护成本。Optionally, as shown in FIG. 3 , a network service layer may also be deployed in the main program of the system, and the network service layer is used to provide an external service interface for external calls of the system, and perform interface communication through ZMQ. Specifically, an external service interface is set in the network service layer, and according to the external network environment, the external service interface is called through the network service layer, and a communication connection is performed based on the communication mode of ZMQ. Therefore, it can adapt to various programming languages and machine network environments, and avoid incompatibility problems caused by factors such as hardware conditions, developer skills, technical architecture, etc., and effectively reduce the development and maintenance costs of users.
本发明中,步骤S34,所述构建系统服务配置文件以将算法动态库插件加载到系统主程序中,包括:S341,识别算法动态库插件的名称,获取算法动态库插件的配置信息的所在路径;S342,根据所在路径,将所述算法动态库插件的配置信息加入到系统主程序的配置文件中,构建得到系统服务配置文件;S343,读取所述系统服务配置文件,以将算法动态库插件加载到系统主程序中。In the present invention, step S34, the construction of a system service configuration file to load the algorithm dynamic library plug-in into the system main program includes: S341, identifying the name of the algorithm dynamic library plug-in, and obtaining the path where the configuration information of the algorithm dynamic library plug-in is located S342, according to the location path, add the configuration information of the algorithm dynamic library plug-in to the configuration file of the system main program, and construct and obtain the system service configuration file; S343, read the system service configuration file, with the algorithm dynamic library The plug-in is loaded into the system main program.
进一步地,读取所述系统服务配置文件以将算法动态库插件加载到系统主程序中的步骤之后,还包括:S345,读取所述算法动态库插件的配置项;根据所述配置项的enalbed值,判断所述算法动态库插件是否生效;若enalbed值配置成1,则加载成功且所述算法动态库插件生效,否则,所述算法动态库插件未生效。Further, after the step of reading the system service configuration file to load the algorithm dynamic library plug-in into the system main program, the method further includes: S345, reading the configuration item of the algorithm dynamic library plug-in; If the enalbed value is configured as 1, the loading is successful and the algorithm dynamic library plug-in is effective, otherwise, the algorithm dynamic library plug-in is not effective.
下面结合一个实施例对步骤S34进行详细描述:以接入remake动态库为例,工作过程如下所述:Step S34 is described in detail below in conjunction with an embodiment: taking the access to the remake dynamic library as an example, the working process is as follows:
1.在系统主程序的配置文件中,加入remake动态库的配置信息,以获得系统服务配置文件。其中,enabled决定该动态库是否生效,只有配置成1,才说明加载了该动态库并且会正常工作,否则即使加载了,该动态库也不能提供对应的功能;command是该动态库在系统服务中对应的唯一命令号;name是该动态库在系统服务中的标识名称,即为Remake;lib_path、config_file是该动态库文件所在路径,及该动态库依赖的配置信息文件的所在路径;init、uninit、config、version、proc是动态库按照系统服务中的算法插件管理层的要求,提供的功能接口。1. In the configuration file of the system main program, add the configuration information of the remake dynamic library to obtain the system service configuration file. Among them, enabled determines whether the dynamic library takes effect. Only if it is configured to 1, it means that the dynamic library is loaded and will work normally. Otherwise, even if it is loaded, the dynamic library cannot provide corresponding functions; command is the dynamic library in the system service. The unique command number corresponding to ; name is the identification name of the dynamic library in the system service, that is, Remake; lib_path, config_file are the path of the dynamic library file, and the path of the configuration information file that the dynamic library depends on; init, uninit, config, version, and proc are the functional interfaces provided by the dynamic library according to the requirements of the algorithm plug-in management layer in the system service.
2.设置好系统服务配置文件后,系统主程序会读取关于remake动态库的配置文件中的配置信息,并且根据要求将该动态库加载到系统服务的内存中,加载成功后,remake动态库就能提供对应的功能。2. After setting the system service configuration file, the system main program will read the configuration information in the configuration file about the remake dynamic library, and load the dynamic library into the memory of the system service according to the requirements. After the loading is successful, the remake dynamic library corresponding functions can be provided.
3.外部应用向系统的网络服务层发起命令号为1001的请求,经过辅助服务层将该请求转发至remake动态库中进行处理。图5示出了本发明该实施例提供的外部应用调用Remake plugin算法插件的示意图,具体如图5中虚线所示。3. The external application initiates a request with the command number 1001 to the network service layer of the system, and forwards the request to the remake dynamic library for processing through the auxiliary service layer. FIG. 5 shows a schematic diagram of an external application calling the Remake plugin algorithm plug-in provided by this embodiment of the present invention, as shown by the dotted line in FIG. 5 .
本申请封装后的算法动态库插件构成了算法动态库。本申请集成了算法动态库的热部署功能,采用算法功能的动态加载技术,在服务初始化启动时加载算法,或者需要使用指定算法时,单独加载该算法;在不需要时,或者更新某算法时,根据算法卸载请求,可以动态卸载指定算法。算法动态库插件在系统服务内部的状态有:未加载、已加载、已生效、待卸载,正常运行时默认状态为已生效,如检测到待卸载状态时,则系统服务选择该算法动态库插件空闲时进行动态库卸载操作;在算法动态库插件更新后,系统服务检测到算法动态库插件未加载,则进行算法动态库插件的加载操作,成功则切换至已加载状态;根据算法动态库插件的配置项的enabled值决定该算法动态库插件是否生效。采用该技术,可以达到不停服务程序进行算法更新,也能有效的降低服务停机的损失及客户的运营成本。The algorithm dynamic library plug-in packaged in the present application constitutes the algorithm dynamic library. This application integrates the hot deployment function of the algorithm dynamic library, and adopts the dynamic loading technology of the algorithm function. The algorithm is loaded when the service is initialized and started, or when the specified algorithm needs to be used, the algorithm is loaded separately; when it is not needed, or when an algorithm is updated , according to the algorithm uninstall request, the specified algorithm can be dynamically uninstalled. The status of the algorithm dynamic library plug-in in the system service is: unloaded, loaded, effective, to be unloaded. The default state is effective during normal operation. If the pending unload state is detected, the system service selects the algorithm dynamic library plug-in. The dynamic library unloading operation is performed when idle; after the algorithm dynamic library plug-in is updated, the system service detects that the algorithm dynamic library plug-in is not loaded, and then performs the loading operation of the algorithm dynamic library plug-in, and switches to the loaded state if it succeeds; according to the algorithm dynamic library plug-in The enabled value of the configuration item determines whether the algorithm dynamic library plugin takes effect. Using this technology, the algorithm can be updated without stopping the service program, and it can also effectively reduce the loss of service downtime and the operating cost of customers.
如图6所示,是本发明一实施例提供的基于微核模型插件模式的服务装置100的功能模块图。参考图6所示,本发明所述基于微核模型插件模式的服务装置100可以安装于电子设备中。根据实现的功能,所述基于微核模型插件模式的服务装置100可以包括分层部署模块101、封装模块102以及管理服务模块103。本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。As shown in FIG. 6 , it is a functional block diagram of the service apparatus 100 based on the plug-in mode of the microkernel model provided by an embodiment of the present invention. Referring to FIG. 6 , the service apparatus 100 based on the plug-in mode of the microkernel model according to the present invention can be installed in an electronic device. According to the implemented functions, the service apparatus 100 based on the plug-in mode of the microkernel model may include a hierarchical deployment module 101 , an encapsulation module 102 and a management service module 103 . The modules described in the present invention can also be called units, which refer to a series of computer program segments that can be executed by the electronic device processor and can perform fixed functions, and are stored in the memory of the electronic device.
本发明基于微核模型插件模式,以系统主程序为核心,将系统主程序与各算法之间设计成微核模型插件架构;通过对系统主程序进行分层设计,将算法插件管理层独立出来,辅以辅助服务层,各功能之间相互组合,后续将算法动态库插件接入后,可形成高效的算法服务。其中,所述系统主程序在不接入算法动态库插件的情况下,仍然可以保持系统的正常运行,只是不提供具体的算法功能服务。The invention is based on the micro-kernel model plug-in mode, takes the system main program as the core, and designs the micro-kernel model plug-in architecture between the system main program and each algorithm; through the hierarchical design of the system main program, the algorithm plug-in management layer is independent , supplemented by the auxiliary service layer, the functions are combined with each other, and after the plug-in of the algorithm dynamic library is connected, an efficient algorithm service can be formed. Wherein, the system main program can still maintain the normal operation of the system without accessing the algorithm dynamic library plug-in, but does not provide specific algorithm function services.
在本实施例中,关于各模块/单元的功能如下:In this embodiment, the functions of each module/unit are as follows:
所述分层部署模块101用于基于微核模型插件模式,以系统主程序为核心部件,采用分层设计在所述系统主程序中部署算法插件管理层和辅助服务层。The layered deployment module 101 is configured to deploy the algorithm plug-in management layer and the auxiliary service layer in the system main program by adopting a layered design based on the plug-in mode of the microkernel model, with the system main program as the core component.
优选地,所述算法插件管理层可以包括:插件加载,插件卸载,插件接口定义,插件配置,插件调用,依赖调用等等,以实现对所述算法动态库插件的统一管理。Preferably, the algorithm plug-in management layer may include: plug-in loading, plug-in unloading, plug-in interface definition, plug-in configuration, plug-in invocation, dependency invocation, etc., so as to realize unified management of the algorithm dynamic library plug-ins.
优选地,所述辅助服务层可以包括:配置管理、日志管理、并发管理、路由管理、队列管理、数据管理等等,以实现辅助服务层对算法插件管理层的辅助作用。具体地,所述辅助作用可以包括:接收外部发出的算法服务请求;维护系统内算法服务请求队列,进行任务调度管理,生成调用请求;将调用请求分发至算法动态库插件中进行处理;记录或查询系统的算法服务的运行状态;对运行时的各项数据进行维护、实时更新和及时生效。Preferably, the auxiliary service layer may include: configuration management, log management, concurrency management, routing management, queue management, data management, etc., so as to realize the auxiliary function of the auxiliary service layer to the algorithm plug-in management layer. Specifically, the auxiliary functions may include: receiving algorithm service requests sent from outside; maintaining the algorithm service request queue in the system, performing task scheduling management, and generating call requests; distributing the call requests to the algorithm dynamic library plug-in for processing; recording or Query the running status of the algorithm service of the system; maintain, update and take effect in time for various data at runtime.
进一步地,所述分层部署模块101还用于在所述系统主程序中部署网络服务层,并在所述网络服务层中设置对外服务接口;根据外部网络环境,通过所述网络服务层调用所述对外服务接口,并基于ZMQ的通信模式进行通信连接。Further, the layered deployment module 101 is further configured to deploy a network service layer in the system main program, and set an external service interface in the network service layer; according to the external network environment, call through the network service layer The external service interface is connected based on the communication mode of ZMQ.
所述封装模块102用于根据所述算法插件管理层定义的系统的插件接口,将算法封装成独立的算法动态库插件。所述算法插件管理层根据插件的设计思想独立设计标准的系统的插件接口,后续算法动态库插件,只要按照标准提供符合这些定义的插件接口的对外接口,就可以无缝接入到系统主程序中,进行正常工作,提供相应的算法功能。本发明中算法动态库插件可以按照微服务的模式进行分布式或集群式部署,部署方式上比较灵活,可根据实际需要选择合适的算法功能。The encapsulation module 102 is configured to encapsulate the algorithm into an independent algorithm dynamic library plug-in according to the plug-in interface of the system defined by the algorithm plug-in management layer. The algorithm plug-in management layer independently designs the plug-in interface of the standard system according to the design idea of the plug-in, and the subsequent algorithm dynamic library plug-in can be seamlessly connected to the main program of the system as long as the external interface conforming to these defined plug-in interfaces is provided according to the standard. , perform normal work and provide corresponding algorithm functions. The algorithm dynamic library plug-in in the present invention can be deployed in a distributed or clustered manner according to the micro-service mode, and the deployment mode is relatively flexible, and an appropriate algorithm function can be selected according to actual needs.
所述管理服务模块103用于在所述辅助服务层的配合下,通过所述算法插件管理层对所述算法动态库插件进行统一管理,以对外进行算法服务。所述算法插件管理层在辅助服务层的配合下,对算法动态库插件进行统一管理,实现了各算法间的独立,使得各算法间无耦合,无干扰;同时提高了算法功能的扩展性,通用性,并发性和兼容性。The management service module 103 is configured to perform unified management of the algorithm dynamic library plug-in through the algorithm plug-in management layer under the cooperation of the auxiliary service layer, so as to provide algorithm services to the outside world. The algorithm plug-in management layer, with the cooperation of the auxiliary service layer, uniformly manages the algorithm dynamic library plug-ins, realizes the independence of each algorithm, and makes each algorithm without coupling and interference; at the same time, the scalability of algorithm functions is improved, Generality, Concurrency and Compatibility.
其中,通过所述算法插件管理层对所述算法动态库插件进行统一管理,包括:根据算法服务请求,将算法动态库插件加载到系统主程序中;根据需要,卸载系统主程序中的算法动态库插件;根据算法间的依赖关系,对算法动态库插件进行依赖调用,以将多个算法动态库插件组合起来加载到系统主程序中。The unified management of the algorithm dynamic library plug-in through the algorithm plug-in management layer includes: loading the algorithm dynamic library plug-in into the system main program according to the algorithm service request; unloading the algorithm dynamic library plug-in in the system main program as needed Library plug-in; according to the dependencies between algorithms, make a dependency call to the algorithm dynamic library plug-in, so as to combine multiple algorithm dynamic library plug-ins and load them into the main program of the system.
进一步地,通过所述算法插件管理层对所述算法动态库插件进行统一管理,还可以包括:构建系统服务配置文件,以将算法动态库插件加载到系统主程序中。具体地,所述构建系统服务配置文件,以将算法动态库插件加载到系统主程序中,包括:识别所述算法动态库插件的名称,获取所述算法动态库插件的配置信息的所在路径;根据所在路径,将所述算法动态库插件的配置信息加入到系统主程序的配置文件中,构建得到系统服务配置文件;读取所述系统服务配置文件,以将算法动态库插件加载到系统主程序中。Further, the unified management of the algorithm dynamic library plug-in through the algorithm plug-in management layer may further include: constructing a system service configuration file to load the algorithm dynamic library plug-in into the system main program. Specifically, the construction of the system service configuration file to load the algorithm dynamic library plug-in into the system main program includes: identifying the name of the algorithm dynamic library plug-in, and obtaining the path where the configuration information of the algorithm dynamic library plug-in is located; According to the path, the configuration information of the algorithm dynamic library plug-in is added to the configuration file of the system main program to construct a system service configuration file; read the system service configuration file to load the algorithm dynamic library plug-in into the system main program. program.
进一步地,所述构建系统服务配置文件,以将算法动态库插件加载到系统主程序中,还可以包括:读取所述算法动态库插件的配置项;根据所述配置项的enalbed值,判断所述算法动态库插件是否生效;若enalbed值配置成1,则加载成功且所述算法动态库插件生效,否则,所述算法动态库插件未生效。Further, the construction of the system service configuration file to load the algorithm dynamic library plug-in into the system main program may further include: reading the configuration item of the algorithm dynamic library plug-in; according to the enabled value of the configuration item, judging Whether the algorithm dynamic library plug-in is valid; if the enabled value is configured to 1, the loading is successful and the algorithm dynamic library plug-in is effective; otherwise, the algorithm dynamic library plug-in is not effective.
优选地,所述基于微核模型插件模式的服务装置100还包括:添加插件模块,用于根据定制化需求,编写指定功能的算法动态库插件,以加载到系统主程序中进行相应的算法服务。Preferably, the service device 100 based on the plug-in mode of the microkernel model further includes: adding a plug-in module, which is used to write an algorithm dynamic library plug-in with a specified function according to customized requirements, so as to be loaded into the system main program for corresponding algorithm service .
如图7所示,是本发明实现服务程序的电子设备的结构示意图。As shown in FIG. 7 , it is a schematic structural diagram of an electronic device implementing a service program according to the present invention.
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如服务程序12。The electronic device 1 may include a processor 10 , a memory 11 and a bus, and may also include a computer program, such as a service program 12 , stored in the memory 11 and executable on the processor 10 .
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(SecureDigital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如服务程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1 . In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a pluggable mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software installed in the electronic device 1 and various types of data, such as codes of service programs, etc., but also can be used to temporarily store data that has been output or will be output.
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如服务程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。In some embodiments, the processor 10 may be composed of integrated circuits, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits packaged with the same function or different functions, including one or more integrated circuits. Central processing unit (Central Processing Unit, CPU), microprocessor, digital processing chip, graphics processor and combination of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and by running or executing programs or modules (such as services) stored in the memory 11. programs, etc.), and call data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。The bus may be a peripheral component interconnect (PCI for short) bus or an extended industry standard architecture (extended industry standard architecture, EISA for short) bus or the like. The bus can be divided into address bus, data bus, control bus and so on. The bus is configured to implement connection communication between the memory 11 and at least one processor 10 and the like.
图7仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图6示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 7 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 6 does not constitute a limitation on the electronic device 1, and may include fewer or more components than those shown in the figure. components, or a combination of certain components, or a different arrangement of components.
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) for powering the various components, preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that the power management The device implements functions such as charge management, discharge management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components. The electronic device 1 may further include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。Further, the electronic device 1 may also include a network interface, optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may further include a user interface, and the user interface may be a display (Display), an input unit (eg, a keyboard (Keyboard)), optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, and the like. The display may also be appropriately called a display screen or a display unit, which is used for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are only used for illustration, and are not limited by this structure in the scope of the patent application.
所述电子设备1中的所述存储器11存储的服务程序12是多个指令的组合,在所述处理器10中运行时,可以实现:基于微核模型插件模式,将系统主程序作为核心部件,采用分层设计在所述系统主程序中部署算法插件管理层和辅助服务层;通过所述算法插件管理层定义系统的插件接口,按照所述插件接口,将算法封装成独立的算法动态库插件;在所述辅助服务层的辅助下,采用所述算法插件管理层对所述算法动态库插件进行统一管理,以对外进行算法服务。The service program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can be implemented: based on the microkernel model plug-in mode, the system main program is used as the core component. , deploy the algorithm plug-in management layer and the auxiliary service layer in the main program of the system by using hierarchical design; define the plug-in interface of the system through the algorithm plug-in management layer, and encapsulate the algorithm into an independent algorithm dynamic library according to the plug-in interface Plug-ins; with the assistance of the auxiliary service layer, the algorithm plug-in management layer is used to uniformly manage the algorithm dynamic library plug-ins, so as to provide algorithm services to the outside world.
具体地,所述处理器10对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above-mentioned instruction by the processor 10, reference may be made to the description of the relevant steps in the corresponding embodiment of FIG. 1, and details are not described herein.
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the modules/units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) .
在本发明所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division manners in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and components shown as modules may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
对于本领域技术人员而言,显然本发明不限于上述示范性实施例的细节,而且在不背离本发明的精神或基本特征的情况下,能够以其他的具体形式实现本发明。It will be apparent to those skilled in the art that the present invention is not limited to the details of the above-described exemplary embodiments, but that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics of the invention.
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本发明的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本发明内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。Therefore, the embodiments are to be regarded in all respects as illustrative and not restrictive, and the scope of the invention is to be defined by the appended claims rather than the foregoing description, which are therefore intended to fall within the scope of the claims. All changes within the meaning and range of the equivalents of , are included in the present invention. Any reference signs in the claims shall not be construed as limiting the involved claim.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。Furthermore, it is clear that the word "comprising" does not exclude other units or steps and the singular does not exclude the plural. Several units or means recited in the system claims can also be realized by one unit or means by means of software or hardware. Second-class terms are used to denote names and do not denote any particular order.
最后应说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或等同替换,而不脱离本发明技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent substitutions can be made without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010755915.9A CN111897599B (en) | 2020-07-30 | 2020-07-30 | Service method, device, equipment and storage medium based on micro-kernel model plug-in mode |
| PCT/CN2020/125075 WO2021139358A1 (en) | 2020-07-30 | 2020-10-30 | Service method and apparatus based on micro-kernel model plug-in mode, device, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010755915.9A CN111897599B (en) | 2020-07-30 | 2020-07-30 | Service method, device, equipment and storage medium based on micro-kernel model plug-in mode |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111897599A true CN111897599A (en) | 2020-11-06 |
| CN111897599B CN111897599B (en) | 2024-11-22 |
Family
ID=73183835
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010755915.9A Active CN111897599B (en) | 2020-07-30 | 2020-07-30 | Service method, device, equipment and storage medium based on micro-kernel model plug-in mode |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN111897599B (en) |
| WO (1) | WO2021139358A1 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113918232A (en) * | 2021-09-07 | 2022-01-11 | 深圳云天励飞技术股份有限公司 | Method, device, server and storage medium for calling algorithm service |
| CN114296716A (en) * | 2021-11-18 | 2022-04-08 | 深圳海星智驾科技有限公司 | Function configuration method and device for intelligent operation of engineering machinery and electronic equipment |
| CN114466070A (en) * | 2022-01-20 | 2022-05-10 | 精伦电子股份有限公司 | Middleware system, service request processing method, electronic device and storage medium |
| CN115016828A (en) * | 2021-03-03 | 2022-09-06 | 京东科技信息技术有限公司 | Software service method, device, electronic equipment and storage medium |
| CN118778539A (en) * | 2024-06-26 | 2024-10-15 | 嘉兴海视嘉安智城科技有限公司 | AI model hot-swap method, system, electronic device and storage medium based on building intelligent controller |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030069953A1 (en) * | 2001-09-28 | 2003-04-10 | Bottom David A. | Modular server architecture with high-availability management capability |
| US20110078293A1 (en) * | 2009-09-30 | 2011-03-31 | Phung Hai T | Systems and methods for extension of server management functions |
| CN102929606A (en) * | 2012-10-09 | 2013-02-13 | 曙光信息产业(北京)有限公司 | Cloud-computing-based plug-in model of data mining system |
| CN103297381A (en) * | 2012-02-22 | 2013-09-11 | 阿里巴巴集团控股有限公司 | Service access method based on plugin and system thereof |
| CN109165055A (en) * | 2018-08-30 | 2019-01-08 | 百度在线网络技术(北京)有限公司 | A kind of component loading method, device, computer equipment and storage medium |
| CN109388512A (en) * | 2018-10-30 | 2019-02-26 | 江苏物联网研究发展中心 | For the assessment and analysis system of large-scale computer cluster intensity of anomaly |
| CN110245031A (en) * | 2019-06-03 | 2019-09-17 | 北京百度网讯科技有限公司 | A platform and method for opening AI services |
| CN110286956A (en) * | 2019-05-22 | 2019-09-27 | 百度在线网络技术(北京)有限公司 | Operation method, device and the electronic equipment of plug-in unit |
| CN110489093A (en) * | 2019-10-16 | 2019-11-22 | 鹏城实验室 | A kind of lasting building method, device, terminal and storage medium towards AI application |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11775850B2 (en) * | 2016-01-27 | 2023-10-03 | Microsoft Technology Licensing, Llc | Artificial intelligence engine having various algorithms to build different concepts contained within a same AI model |
-
2020
- 2020-07-30 CN CN202010755915.9A patent/CN111897599B/en active Active
- 2020-10-30 WO PCT/CN2020/125075 patent/WO2021139358A1/en not_active Ceased
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030069953A1 (en) * | 2001-09-28 | 2003-04-10 | Bottom David A. | Modular server architecture with high-availability management capability |
| US20110078293A1 (en) * | 2009-09-30 | 2011-03-31 | Phung Hai T | Systems and methods for extension of server management functions |
| CN103297381A (en) * | 2012-02-22 | 2013-09-11 | 阿里巴巴集团控股有限公司 | Service access method based on plugin and system thereof |
| CN102929606A (en) * | 2012-10-09 | 2013-02-13 | 曙光信息产业(北京)有限公司 | Cloud-computing-based plug-in model of data mining system |
| CN109165055A (en) * | 2018-08-30 | 2019-01-08 | 百度在线网络技术(北京)有限公司 | A kind of component loading method, device, computer equipment and storage medium |
| CN109388512A (en) * | 2018-10-30 | 2019-02-26 | 江苏物联网研究发展中心 | For the assessment and analysis system of large-scale computer cluster intensity of anomaly |
| CN110286956A (en) * | 2019-05-22 | 2019-09-27 | 百度在线网络技术(北京)有限公司 | Operation method, device and the electronic equipment of plug-in unit |
| CN110245031A (en) * | 2019-06-03 | 2019-09-17 | 北京百度网讯科技有限公司 | A platform and method for opening AI services |
| CN110489093A (en) * | 2019-10-16 | 2019-11-22 | 鹏城实验室 | A kind of lasting building method, device, terminal and storage medium towards AI application |
Non-Patent Citations (1)
| Title |
|---|
| 张剑;罗鹏飞;张文明;: "基于微内核的雷达数据处理平台设计", 计算机工程, no. 17, 5 September 2009 (2009-09-05), pages 277 * |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115016828A (en) * | 2021-03-03 | 2022-09-06 | 京东科技信息技术有限公司 | Software service method, device, electronic equipment and storage medium |
| CN113918232A (en) * | 2021-09-07 | 2022-01-11 | 深圳云天励飞技术股份有限公司 | Method, device, server and storage medium for calling algorithm service |
| CN113918232B (en) * | 2021-09-07 | 2024-05-03 | 深圳云天励飞技术股份有限公司 | Algorithm service calling method, device, server and storage medium |
| CN114296716A (en) * | 2021-11-18 | 2022-04-08 | 深圳海星智驾科技有限公司 | Function configuration method and device for intelligent operation of engineering machinery and electronic equipment |
| CN114466070A (en) * | 2022-01-20 | 2022-05-10 | 精伦电子股份有限公司 | Middleware system, service request processing method, electronic device and storage medium |
| CN118778539A (en) * | 2024-06-26 | 2024-10-15 | 嘉兴海视嘉安智城科技有限公司 | AI model hot-swap method, system, electronic device and storage medium based on building intelligent controller |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2021139358A1 (en) | 2021-07-15 |
| CN111897599B (en) | 2024-11-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111897599A (en) | Service method, device, device and storage medium based on microkernel model plug-in mode | |
| CN111984270B (en) | Application deployment method and system | |
| CN115357369B (en) | CRD application integration calling method and device in k8s container cloud platform | |
| CN105183458A (en) | Software platform development method and apparatus | |
| CN111552508A (en) | Application version construction method, apparatus, and electronic device | |
| CN117075930B (en) | Computing framework management system | |
| CN114327484A (en) | K8S integration and deployment method, system and storage medium supporting multi-architecture | |
| CN114756374A (en) | Method, device, equipment and medium for scheduling heterogeneous CPU | |
| KR20170035797A (en) | Dynamic reallocating resources for optimized job performance in distributed heterogeneous computer system | |
| US8719778B2 (en) | Interconnection interface for flexible online/offline deployment of an n-layered software application | |
| CN100465893C (en) | A method for dynamic upgrading of embedded operating system driver | |
| CN118276832A (en) | Multi-model workflow construction method, device, electronic device and storage medium | |
| CN120315681B (en) | Multi-version dynamic expandable data source method, device, terminal and storage medium | |
| CN110908644B (en) | Configuration method and device of state node, computer equipment and storage medium | |
| CN109558121A (en) | Development approach, device, equipment and the storage medium of interface drive program | |
| CN118550659A (en) | Task running method and device and related equipment | |
| CN102567034B (en) | Driver management system | |
| CN114385502A (en) | Offline prediction method, system, storage medium and terminal based on K8s cluster | |
| CN112148364A (en) | Partition linking method and system for embedded microkernel operating system | |
| CN120762769B (en) | Sensor drive loading method, device, chip, product and medium | |
| US20250224983A1 (en) | Task Scheduling Method and Electronic Apparatus | |
| CN118656100B (en) | Method for adjusting application program operation and electronic device | |
| CN117827277B (en) | Multi-kernel adapting device and method of operating system and industrial Internet of things operating system | |
| CN110083469A (en) | A kind of isomerization hardware tissue runs unified core method and system | |
| CN113296892B (en) | Dormancy method and device of development environment, electronic equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |