CN109446648B - Simulation service establishment method and device - Google Patents

Simulation service establishment method and device Download PDF

Info

Publication number
CN109446648B
CN109446648B CN201811266949.0A CN201811266949A CN109446648B CN 109446648 B CN109446648 B CN 109446648B CN 201811266949 A CN201811266949 A CN 201811266949A CN 109446648 B CN109446648 B CN 109446648B
Authority
CN
China
Prior art keywords
simulation
service
information
simulation model
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811266949.0A
Other languages
Chinese (zh)
Other versions
CN109446648A (en
Inventor
张霖
赖李媛君
白天
王斐
罗啸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201811266949.0A priority Critical patent/CN109446648B/en
Publication of CN109446648A publication Critical patent/CN109446648A/en
Application granted granted Critical
Publication of CN109446648B publication Critical patent/CN109446648B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及仿真处理技术领域,具体涉及一种仿真服务建立方法及装置,通过接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至服务生成框架模板,接收用户输入的服务组件配置信息并基于需求解析工具生成服务组件配置文件并加入至服务生成框架模板中,将生成的服务生成框架模板发送至存储设备,以基于用户输入的模型调用逻辑生成仿真服务,获得存储设备中的仿真服务,接收用户输入的针对仿真服务的服务描述信息并封装至仿真服务,以实现对仿真模型文件进行Web服务化,便于用户调用。

Figure 201811266949

The invention relates to the technical field of simulation processing, in particular to a method and device for establishing a simulation service. By receiving and based on simulation model requirement information input by a user, a corresponding simulation model file is searched from a model database of a simulation model system, and a corresponding simulation model file is searched according to the simulation model file. and the simulation model demand information to generate a simulation model configuration file, and add it to the service generation framework template, receive the service component configuration information input by the user, and generate a service component configuration file based on the demand analysis tool and add it to the service generation framework template. The service generation framework template is sent to the storage device, and the simulation service is generated based on the model call logic input by the user, the simulation service in the storage device is obtained, and the service description information for the simulation service input by the user is received and packaged into the simulation service to realize the simulation service. The simulation model file is web serviced, which is convenient for users to call.

Figure 201811266949

Description

仿真服务建立方法及装置Simulation service establishment method and device

技术领域technical field

本发明涉及仿真处理技术领域,具体而言,涉及一种仿真服务建立方法及装置。The present invention relates to the technical field of simulation processing, and in particular, to a method and device for establishing a simulation service.

背景技术Background technique

随着计算机仿真技术领域的发展,仿真模型作为仿真系统的基本组成部分,仿真模型的建模手段越来越多。传统的仿真模型的设计方法与仿真系统的应用背景、以及仿真系统的支撑环境紧密相关,这导致仿真模型在不同的仿真系统中可重用性粒度差,无法满足仿真模型即插即用的要求。With the development of the field of computer simulation technology, the simulation model is the basic component of the simulation system, and there are more and more modeling methods for the simulation model. The traditional simulation model design method is closely related to the application background of the simulation system and the support environment of the simulation system, which leads to the poor reusability of the simulation model in different simulation systems and cannot meet the requirements of plug-and-play simulation model.

因此,提供一种实现对仿真模型文件服务化,以便于用户进行调用的仿真模型是亟待解决的技术问题。Therefore, it is an urgent technical problem to provide a simulation model that realizes the service of the simulation model file so that the user can call it.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种仿真服务建立方法及装置,以实现对仿真模型文件进行Web服务化,便于用户调用。In view of this, the purpose of the present invention is to provide a method and device for establishing a simulation service, so as to realize the Web service of the simulation model file, which is convenient for users to call.

为实现上述目的,本发明实施例采用如下技术方案:To achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:

一种仿真服务建立方法,用于建立至少一个仿真服务,针对每一个仿真服务,所述仿真服务建立方法包括:A simulation service establishment method is used to establish at least one simulation service, and for each simulation service, the simulation service establishment method includes:

接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至仿真模型系统中基于SpringBoot框架生成的服务生成框架模板;Receive and search for a simulation model file corresponding to the simulation model demand information from the model database of the simulation model system based on the simulation model demand information input by the user, generate a simulation model configuration file according to the simulation model file and the simulation model demand information, and Add to the service generation framework template generated based on the SpringBoot framework in the simulation model system;

接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中;Receive the service component configuration information input by the user and generate a service component configuration file based on the requirement analysis tool in the simulation model system and add it to the service generation framework template;

将包括所述仿真模型配置文件和所述服务组件配置文件的所述服务生成框架模板发送至与所述终端设备关联的存储设备,以基于用户输入的模型调用逻辑生成仿真服务;sending the service generation framework template including the simulation model configuration file and the service component configuration file to a storage device associated with the terminal device, to generate a simulation service based on model invocation logic input by a user;

获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务。Obtain the simulation service in the storage device, receive service description information for the simulation service input by the user, and encapsulate the simulation service into the simulation service.

可选的,在上述仿真服务建立方法中,当仿真服务生成方法建立的仿真服务为多个,且所述仿真服务的服务描述信息包括该仿真服务的领域信息及各领域信息中包括的实体类别信息时,在执行获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务的步骤之后,所述方法还包括:Optionally, in the above simulation service establishment method, when there are multiple simulation services established by the simulation service generation method, and the service description information of the simulation service includes the domain information of the simulation service and the entity categories included in each domain information. When the information is obtained, after performing the steps of obtaining the simulation service in the storage device, receiving service description information for the simulation service input by the user, and encapsulating it into the simulation service, the method further includes:

根据各所述仿真服务的服务描述信息中包括的领域信息和实体类别信息对各所述仿真服务进行分类,以得到不同领域下的各分类对应的仿真服务;Classify each of the simulation services according to the domain information and entity category information included in the service description information of each of the simulation services, so as to obtain simulation services corresponding to each classification in different fields;

接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对每个领域信息下各个分类信息对应的仿真服务建立逻辑关系。Receive the logical relationship description information for each category of simulation services in each field input by the user, and establish a logical relationship for the simulation services corresponding to each category information under each field information based on the logical relationship description information.

可选的,在上述仿真服务建立方法中,在执行接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对相同领域下各个分类的仿真服务建立逻辑关系的步骤之后,所述方法还包括:Optionally, in the above-mentioned method for establishing a simulation service, the logic relationship description information for each category of simulation services in each field input by the user is received, and based on the logic relationship description information, the simulation services of each category under the same field are analyzed. After the step of establishing the logical relationship, the method further includes:

按照预设仿真树建立规则、每个领域信息下的各实体分类信息对应的仿真服务以及每个领域下各个分类的仿真服务建立的逻辑关系向所述仿真模型系统中建立仿真模块层次本体树,其中,每个仿真服务分别对应于所述仿真模块层次本体树中的一个终端节点,所述预设仿真树建立规则中包括多层节点及各节点对应的分类名称。A simulation module hierarchical ontology tree is established in the simulation model system according to the preset simulation tree establishment rules, the simulation services corresponding to the entity classification information under each domain information, and the logical relationships established by the simulation services of each classification under each domain, Wherein, each simulation service corresponds to a terminal node in the hierarchical ontology tree of the simulation module, and the preset simulation tree establishment rule includes multi-layer nodes and classification names corresponding to each node.

可选的,在上述仿真服务建立方法中,在执行基于每个领域信息下的各分类信息对应的仿真服务向所述仿真模型系统中建立仿真模块层次本体树的步骤之后,所述方法还包括:Optionally, in the above simulation service establishment method, after executing the step of establishing a simulation module hierarchical ontology tree in the simulation model system based on the simulation service corresponding to each classification information under each domain information, the method further includes: :

针对每个领域下的仿真服务分别建立由搜索服务器维护的服务注册表,其中,所述服务注册表中包括每个仿真服务的描述信息。A service registry maintained by the search server is established for the simulation services in each domain, wherein the service registry includes description information of each simulation service.

可选的,在上述仿真服务建立方法中,所述需求解析工具包括XML文件生成工具和YML文件生成工具,接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中的步骤包括:Optionally, in the above simulation service establishment method, the demand analysis tool includes an XML file generation tool and a YML file generation tool, receives service component configuration information input by a user, and generates a service based on the demand analysis tool in the simulation model system. The steps of adding the component configuration file to the service generation framework template include:

接收用户以表单形式输入的所述服务生成框架模板所需的仿真模型组件需求信息,并采用所述仿真模型系统中的XML文件生成工具生成XML项目对象模型配置文件并加入至所述服务生成框架模板中;Receive the simulation model component requirement information required by the service generation framework template input by the user in the form of a form, and use the XML file generation tool in the simulation model system to generate an XML project object model configuration file and add it to the service generation framework in the template;

接收用户以表单形式输入的所述服务生成框架模板所需的服务组件配置信息,并采用所述仿真模型系统中的YML文件生成工具生成YML服务配置文件并加入至所述服务生成框架模板中。Receive the service component configuration information required by the service generation framework template input by the user in form, and use the YML file generation tool in the simulation model system to generate a YML service configuration file and add it to the service generation framework template.

可选的,在上述仿真服务建立方法中,将所述仿真模型服务配置文件和所述服务生成框架模板发送至与该仿真模型系统关联的存储设备,并基于用户输入的模型调用逻辑生成仿真服务后发送至所述仿真模型系统的步骤包括:Optionally, in the above simulation service establishment method, the simulation model service configuration file and the service generation framework template are sent to the storage device associated with the simulation model system, and the simulation service is generated based on the model call logic input by the user. The steps of sending to the simulation model system include:

将包括所述仿真模型服务配置文件和所述服务生成框架模板发送至与所述终端设备关联的存储设备;sending the service configuration file including the simulation model and the service generation framework template to a storage device associated with the terminal device;

接收并基于用户输入的模型调用逻辑生成定制的仿真业务,对所述存储设备中存储的服务生成框架模板进行配置生成仿真服务。Receive and generate a customized simulation service based on the model invocation logic input by the user, and configure the service generation framework template stored in the storage device to generate a simulation service.

本发明还提供一种仿真服务建立装置,用于建立至少一个仿真服务,所述装置包括:The present invention also provides a device for establishing an emulation service for establishing at least one emulation service, the device comprising:

第一接收模块,用于接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至仿真模型系统中基于SpringBoot框架生成的服务生成框架模板;The first receiving module is configured to receive and search for the simulation model file corresponding to the simulation model demand information from the model database of the simulation model system based on the simulation model demand information input by the user, and according to the simulation model file and the simulation model demand information Generate a simulation model configuration file and add it to the service generation framework template generated based on the SpringBoot framework in the simulation model system;

第二接收模块,用于接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中;a second receiving module, configured to receive the service component configuration information input by the user and generate a service component configuration file based on the requirement analysis tool in the simulation model system and add it to the service generation framework template;

服务生成模块,用于将包括所述仿真模型配置文件和所述服务组件配置文件的所述服务生成框架模板发送至与所述终端设备关联的存储设备,以基于用户输入的模型调用逻辑生成仿真服务;A service generation module, configured to send the service generation framework template including the simulation model configuration file and the service component configuration file to a storage device associated with the terminal device, so as to generate a simulation based on the model invocation logic input by the user Serve;

服务建立模块,用于获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务。The service establishment module is configured to obtain the simulation service in the storage device, receive service description information for the simulation service input by the user, and encapsulate the simulation service into the simulation service.

可选的,在上述仿真服务建立装置中,所述仿真服务为多个,且所述仿真服务的服务描述信息包括该仿真服务的领域信息及各领域信息中包括的实体类别信息,所述装置还包括:Optionally, in the above simulation service establishment device, there are multiple simulation services, and the service description information of the simulation service includes domain information of the simulation service and entity category information included in each domain information, and the device Also includes:

分类模块,用于根据各所述仿真服务的服务描述信息中包括的领域信息和实体类别信息对各所述仿真服务进行分类,以得到不同领域下的各分类对应的仿真服务;A classification module, configured to classify each of the simulation services according to the domain information and entity category information included in the service description information of each of the simulation services, so as to obtain simulation services corresponding to each classification in different fields;

第一关系建立模块,用于接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对每个领域信息下各个分类信息对应的仿真服务建立逻辑关系。The first relationship establishment module is used to receive the logical relationship description information for the simulation services of each category under each field input by the user, and based on the logical relationship description information, establish logic for the simulation services corresponding to each category information under each field information relation.

可选的,在上述仿真服务建立装置中,所述装置还包括:Optionally, in the above-mentioned device for establishing a simulation service, the device further includes:

第二关系建立模块,用于按照预设仿真树建立规则、每个领域信息下的各实体分类信息对应的仿真服务以及每个领域下各个分类的仿真服务建立的逻辑关系向所述仿真模型系统中建立仿真模块层次本体树,其中,每个仿真服务分别对应于所述仿真模块层次本体树中的一个终端节点,所述预设仿真树建立规则中包括多层节点及各节点对应的分类名称。The second relationship establishment module is configured to send the simulation model system to the simulation model system according to the preset simulation tree establishment rules, the simulation services corresponding to the entity classification information under each domain information, and the logical relationships established by the simulation services of each classification under each domain. A simulation module hierarchical ontology tree is established in the simulation module, wherein each simulation service corresponds to a terminal node in the simulation module hierarchical ontology tree, and the preset simulation tree establishment rules include multi-layer nodes and the corresponding classification names of each node. .

可选的,在上述仿真服务建立装置中,所述需求解析工具包括XML文件生成工具和YML文件生成工具,所述第二接收模块包括:Optionally, in the above-mentioned simulation service establishment device, the requirement analysis tool includes an XML file generation tool and a YML file generation tool, and the second receiving module includes:

第一接收子模块,用于接收用户以表单形式输入的所述服务生成框架模板所需的仿真模型组件需求信息,并采用所述仿真模型系统中的XML文件生成工具生成XML项目对象模型配置文件并加入至所述服务生成框架模板中;The first receiving sub-module is used to receive the simulation model component requirement information required by the service generation framework template input by the user in the form of a form, and use the XML file generation tool in the simulation model system to generate an XML project object model configuration file and added to the service generation framework template;

第二接收子模块,用于接收用户以表单形式输入的所述服务生成框架模板所需的服务组件配置信息,并采用所述仿真模型系统中的YML文件生成工具生成YML服务配置文件并加入至所述服务生成框架模板中。The second receiving sub-module is used to receive the service component configuration information required by the service generation framework template input by the user in the form of a form, and use the YML file generation tool in the simulation model system to generate the YML service configuration file and add it to the The service generation framework template.

本发明提供的一种仿真服务建立方法及装置,方法通过接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件,根据该仿真模型文件生成仿真模型配置文件,并加入至仿真模型系统中的服务生成框架模板,接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中,将所述仿真模型配置文件和所述服务组件配置文件发送至与该仿真模型系统关联的存储设备,并基于用户输入的模型调用逻辑生成仿真服务后上传至所述仿真模型系统,获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务,通过上述设置,以实现将仿真模型文件进行Web服务化,以便于检索和调用。The present invention provides a method and device for establishing a simulation service. The method searches for the simulation model file corresponding to the simulation model demand information from the model database of the simulation model system by receiving and based on the simulation model demand information input by the user, and according to the simulation model The file generates a simulation model configuration file, and is added to the service generation framework template in the simulation model system, receives the service component configuration information input by the user, and generates a service component configuration file based on the demand analysis tool in the simulation model system and adds it to the In the service generation framework template, the simulation model configuration file and the service component configuration file are sent to the storage device associated with the simulation model system, and the simulation service is generated based on the model invocation logic input by the user and uploaded to the simulation model The system obtains the simulation service in the storage device, receives the service description information for the simulation service input by the user and encapsulates it into the simulation service, and implements the simulation model file through the above settings. transfer.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below, and are described in detail as follows in conjunction with the accompanying drawings.

附图说明Description of drawings

图1为本发明实施例提供的终端设备的结构框图。FIG. 1 is a structural block diagram of a terminal device provided by an embodiment of the present invention.

图2为本发明实施例提供的模型生成方法的流程示意图。FIG. 2 is a schematic flowchart of a model generation method provided by an embodiment of the present invention.

图3为图2中步骤S120的流程示意图。FIG. 3 is a schematic flowchart of step S120 in FIG. 2 .

图4本发明实施例提供的模型生成方法的另一流程示意图。FIG. 4 is another schematic flowchart of a model generation method provided by an embodiment of the present invention.

图5为本发明实施例提供的仿真服务建立装置的连接框图。FIG. 5 is a connection block diagram of an apparatus for establishing a simulation service provided by an embodiment of the present invention.

图6为本发明实施例提供的第二接收模块的连接框图。FIG. 6 is a connection block diagram of a second receiving module according to an embodiment of the present invention.

图7为本发明实施例提供的仿真服务建立装置的另一连接框图。FIG. 7 is another connection block diagram of an apparatus for establishing a simulation service provided by an embodiment of the present invention.

图标:10-终端设备;12-存储器;14-处理器;100-仿真服务建立装置;110-第一接收模块;120-第二接收模块;122-第一接收子模块;124-第二接收子模块;130-服务生成模块;140-服务建立模块;150-分类模块;160-第一关系建立模块;170-第二关系建立模块。Icons: 10-terminal equipment; 12-memory; 14-processor; 100-emulation service establishment device; 110-first receiving module; 120-second receiving module; 122-first receiving sub-module; 124-second receiving Sub-module; 130-service generation module; 140-service establishment module; 150-classification module; 160-first relationship establishment module; 170-second relationship establishment module.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例只是本发明的一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments It is only a part of the embodiments of the present invention, but not all of the embodiments. The components of the embodiments of the invention generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations.

因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。Thus, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but is merely representative of selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.

如图1所示,本发明实施例提供了一种终端设备10,包括存储器12、处理器14和仿真服务建立装置100。其中,所述终端设备10是但不限于智能手机、个人电脑(personalcomputer,PC)、平板电脑等具有数据处理能力的电子设备,在此不作具体限定。As shown in FIG. 1 , an embodiment of the present invention provides a terminal device 10 , which includes a memory 12 , a processor 14 and an apparatus 100 for establishing an emulation service. Wherein, the terminal device 10 is, but is not limited to, an electronic device with data processing capability such as a smart phone, a personal computer (PC), a tablet computer, etc., which is not specifically limited herein.

在本实施实例中,所述存储器12和处理器14之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。所述模型生成装置100包括至少一个可以软件或固件(firmware)的形式存储于所述存储器12中的软件功能模块。所述处理器14用于执行所述存储器12中存储的可执行模块,例如所述仿真服务建立装置100所包括的软件功能模块及计算机程序等,以实现仿真服务建立方法。In this embodiment, the memory 12 and the processor 14 are directly or indirectly electrically connected to realize data transmission or interaction. For example, these elements may be electrically connected to each other through one or more communication buses or signal lines. The model generating apparatus 100 includes at least one software function module that can be stored in the memory 12 in the form of software or firmware. The processor 14 is configured to execute executable modules stored in the memory 12, such as software function modules and computer programs included in the simulation service establishment apparatus 100, so as to implement the simulation service establishment method.

其中,所述存储器12可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-OnlyMemory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,存储器12用于存储程序,所述处理器14在接收到执行指令后,执行所述程序。Wherein, the memory 12 may be, but not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), Erasable Programmable Read-Only Memory (EPROM), Electrical Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 12 is used for storing a program, and the processor 14 executes the program after receiving the execution instruction.

所述处理器14可能是一种集成电路芯片,具有信号的处理能力。上述的处理器14可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 14 may be an integrated circuit chip with signal processing capability. The above-mentioned processor 14 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC). ), field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps, and logical block diagrams disclosed in the embodiments of the present invention can be implemented or executed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

可以理解,图1所示的结构仅为示意,所述终端设备10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。图1中所示的各组件可以采用硬件、软件或其组合实现。It can be understood that the structure shown in FIG. 1 is only for illustration, and the terminal device 10 may further include more or less components than those shown in FIG. 1 , or have different configurations from those shown in FIG. 1 . Each component shown in FIG. 1 may be implemented in hardware, software, or a combination thereof.

结合图2,本发明实施例还提供一种可应用于上述的终端设备10的仿真服务建立方法,所述仿真服务建立方法用于建立至少一个仿真服务,针对每个仿真服务,所述方法包括步骤S110-步骤S140四个步骤,。2 , an embodiment of the present invention further provides a method for establishing an emulation service that can be applied to the above-mentioned terminal device 10. The method for establishing an emulation service is used to establish at least one emulation service. For each emulation service, the method includes: There are four steps from step S110 to step S140.

步骤S110:接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至仿真模型系统中基于SpringBoot框架生成的服务生成框架模板。Step S110: Receive and search for a simulation model file corresponding to the simulation model requirement information from the model database of the simulation model system based on the simulation model requirement information input by the user, and generate a simulation model configuration according to the simulation model file and the simulation model requirement information file, and add it to the service generation framework template generated based on the SpringBoot framework in the simulation model system.

其中,所述仿真模型需求信息可以仿真模型的个性化配置信息,以及用户所需的仿真模型信息,其中,用户所需的仿真模型信息可以包括但不限于仿真模型名称、仿真模型领域类别、仿真模型质量参数和/或仿真模型ID号。可以理解,当需求信息包括仿真模型领域类别和仿真模型名称时,从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件的方式可以是根据所述仿真模型领域类别从所述仿真模型系统的模型数据库对应的分类领域中查找与所述仿真模型名称对应的仿真模型文件。The simulation model requirement information may include personalized configuration information of the simulation model and simulation model information required by the user, wherein the simulation model information required by the user may include but not limited to the simulation model name, simulation model field category, simulation model Model quality parameters and/or simulation model ID number. It can be understood that when the requirement information includes the simulation model domain category and the simulation model name, the way to search for the simulation model file corresponding to the simulation model requirement information from the model database of the simulation model system may be according to the simulation model domain category from all the simulation models. The simulation model file corresponding to the simulation model name is searched in the classification field corresponding to the model database of the simulation model system.

根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件的方式可以是根据所述仿真模型文件及个性化配置信息利用XML文件生成工具生成SpringBoot工程中所需的配置文件,以满足用户的个性化需求。The way to generate a simulation model configuration file according to the simulation model file and the simulation model requirement information may be to use an XML file generation tool to generate the configuration file required in the SpringBoot project according to the simulation model file and the personalized configuration information, so as to meet the needs of users of individual needs.

基于SpringBoot框架生成的服务生成框架模板中,由于Springboot利用约定大于配置的原则,通过自动化配置等方式来简化Spring原有样板化的配置,使得用户可以快速的构建应用。例如可以实现通过内嵌tomcat容器的方式,无需单独安装容器,可用jar包直接运行,简化了maven对于服务依赖关系的配置,此外通过java注解技术自动化配置Spring框架服务,可以通过定义服务配置YML文件实现Spring CLoud组件模块化引入。In the service generation framework template generated based on the SpringBoot framework, because Springboot utilizes the principle of convention over configuration, it simplifies Spring's original templated configuration by means of automatic configuration, so that users can quickly build applications. For example, it can be implemented by embedding the tomcat container without installing the container separately. It can be run directly by the jar package, which simplifies the configuration of service dependencies in maven. In addition, the Spring framework service can be automatically configured through the java annotation technology, and the YML file can be configured by defining the service. Implement the modular introduction of Spring Cloud components.

步骤S120:接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中。Step S120: Receive the service component configuration information input by the user, generate a service component configuration file based on the requirement analysis tool in the simulation model system, and add it to the service generation framework template.

其中,接收用户输入的服务组件配置信息的方式可以是,接收用户以表单形式输入的服务组件配置信息。The manner of receiving the service component configuration information input by the user may be receiving the service component configuration information input by the user in the form of a form.

在本实施例中,当所述服务组件配置信息包括所述服务生成框架模板所需的仿真模型组件需求信息和所述服务生成框架模板所需的服务组件配置信息,当所述需求解析工具包括XML文件生成工具和YML文件生成工具时,步骤S120包括以下子步骤:In this embodiment, when the service component configuration information includes the simulation model component requirement information required by the service generation framework template and the service component configuration information required by the service generation framework template, when the requirement analysis tool includes When the XML file generation tool and the YML file generation tool are used, step S120 includes the following sub-steps:

步骤S122:接收用户以表单形式输入的所述服务生成框架模板所需的仿真模型组件需求信息,并采用所述仿真模型系统中的XML文件生成工具生成XML项目对象模型配置文件并加入至所述服务生成框架模板中。Step S122: Receive the simulation model component requirement information required by the service generation framework template input by the user in the form of a form, and use the XML file generation tool in the simulation model system to generate an XML project object model configuration file and add it to the The service is generated in the framework template.

步骤S124:接收用户以表单形式输入的所述服务生成框架模板所需的服务组件配置信息,并采用所述仿真模型系统中的YML文件生成工具生成YML服务配置文件并加入至所述服务生成框架模板中。Step S124: Receive the service component configuration information required by the service generation framework template input by the user in the form of a form, and use the YML file generation tool in the simulation model system to generate a YML service configuration file and add it to the service generation framework in the template.

通过XML文件生成工具生成XML项目对象模型配置文件以实现服务注册、负载均衡等功能。使用YML文件生成工具自动生成服务的YML配置文件,从而配置所生成仿真服务的名称、请求地址、服务均衡方式等服务信息,使得实现对仿真服务进行个性化服务定制。The XML project object model configuration file is generated by the XML file generation tool to realize service registration, load balancing and other functions. Use the YML file generation tool to automatically generate the YML configuration file of the service, so as to configure the service information such as the name, request address, and service balance mode of the generated simulation service, so that the personalized service customization of the simulation service can be realized.

步骤S130:将包括所述仿真模型配置文件和所述服务组件配置文件的所述服务生成框架模板发送至与所述终端设备10关联的存储设备,以基于用户输入的模型调用逻辑生成仿真服务。Step S130: Send the service generation framework template including the simulation model configuration file and the service component configuration file to a storage device associated with the terminal device 10 to generate a simulation service based on the model invocation logic input by the user.

具体的,通过终端设备10的下载接口,将包括所述仿真模型配置文件和所述服务组件配置文件的所述服务生成框架模板发送至与该仿真模型系统关联的存储设备,以基于用户输入的模型调用逻辑生成仿真服务后,在所述存储设备中利用IntelliJ、Eclipse等本地IDE中的MAVEN插件,将所述仿真服务打包为压缩包后上传至所述终端设备10。Specifically, through the download interface of the terminal device 10, the service generation framework template including the simulation model configuration file and the service component configuration file is sent to the storage device associated with the simulation model system, so as to be based on the user input After the model calling logic generates the simulation service, the MAVEN plug-in in the local IDE such as IntelliJ and Eclipse is used in the storage device to package the simulation service into a compressed package and upload it to the terminal device 10 .

请结合图3,具体的,在实施例中,所述步骤S130包括以下子步骤:Please refer to FIG. 3, specifically, in an embodiment, the step S130 includes the following sub-steps:

步骤S132:将包括所述仿真模型服务配置文件和所述服务生成框架模板发送至与所述终端设备10关联的存储设备。Step S132 : Send the service configuration file including the simulation model and the service generation framework template to a storage device associated with the terminal device 10 .

步骤S134:接收并基于用户输入的模型调用逻辑生成定制的仿真业务,对所述存储设备中存储的服务生成框架模板进行配置生成仿真服务。Step S134: Receive and generate a customized simulation service based on the model invocation logic input by the user, and configure the service generation framework template stored in the storage device to generate a simulation service.

步骤S140:获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务。Step S140: Obtain the emulation service in the storage device, receive service description information for the emulation service input by the user, and encapsulate it into the emulation service.

其中,所述描述信息可以是分类存储描述信息,还可以是针对所述仿真服务的个性化描述。当所述描述信息为分类存储描述信息时,在将所述服务描述信息封装至所述仿真服务后存储至与该分类存储描述信息对应的服务器中,以便于对该仿真服务进行快速检索。Wherein, the description information may be classified storage description information, and may also be a personalized description for the simulation service. When the description information is classified storage description information, the service description information is encapsulated into the simulation service and stored in a server corresponding to the classified storage description information, so as to facilitate quick retrieval of the simulation service.

通过上述设置,以实现将仿真模型文件进行Web服务化,以便于检索和调用,并满足用户对仿真服务的个性化需求。Through the above settings, the simulation model file is realized as a Web service, so as to facilitate retrieval and invocation, and to meet the user's personalized needs for simulation services.

具体的,本方案通过利用Springboot框架使用YML文件配置服务的特征,探索利用YML文件解析服务,根据用户个性化需求,自动生成满足用户服务需求功能的服务配置文件,Springboot框架将自动解析服务配置YML文件引入所需的Spring Cloud模块,并打包生成可执行的JAR包,从而通过部署JAR包实现仿真模型服务的部署。Specifically, this solution uses the Springboot framework to configure services using YML files, explores the use of YML files to parse services, and automatically generates service configuration files that meet user service requirements according to individual user needs. The Springboot framework will automatically parse the service configuration YML The file introduces the required Spring Cloud modules, and packages and generates an executable JAR package, so that the deployment of the simulation model service can be realized by deploying the JAR package.

请结合图4,当仿真服务生成方法建立的仿真服务为多个,且所述仿真服务的服务描述信息包括该仿真服务的领域信息及各领域信息中包括的实体类别信息时,为实现对多个所述仿真服务进行管理,在本实施例中,在执行步骤S140之后,所述方法还包括:Please refer to FIG. 4 , when there are multiple simulation services established by the simulation service generation method, and the service description information of the simulation service includes the domain information of the simulation service and the entity category information included in the information of each domain, in order to realize the one-to-many In this embodiment, after step S140 is performed, the method further includes:

步骤S150:根据各所述仿真服务的服务描述信息中包括的领域信息和实体类别信息对各所述仿真服务进行分类,以得到不同领域下的各分类对应的仿真服务。Step S150: Classify each of the simulation services according to the domain information and entity category information included in the service description information of each of the simulation services, so as to obtain simulation services corresponding to each classification in different fields.

步骤S160:接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对每个领域信息下各个分类信息对应的仿真服务建立逻辑关系。Step S160: Receive the logical relationship description information for each category of simulation services in each field input by the user, and establish a logical relationship for the simulation services corresponding to each category information under each field information based on the logical relationship description information.

为进一步便于各仿真服务进行管理,以及便于在后续使用过程中便于检索调用,可选的,在本实施例中,在执行步骤S160之后,所述方法还包括:In order to further facilitate the management of each simulation service and facilitate retrieval and invocation in the subsequent use process, optionally, in this embodiment, after step S160 is performed, the method further includes:

按照预设仿真树建立规则、每个领域信息下的各实体分类信息对应的仿真服务以及每个领域下各个分类的仿真服务建立的逻辑关系向所述仿真模型系统中建立仿真模块层次本体树,其中,每个仿真服务分别对应于所述仿真模块层次本体树中的一个终端节点,所述预设仿真树建立规则中包括多层节点及各节点对应的分类名称。A simulation module hierarchical ontology tree is established in the simulation model system according to the preset simulation tree establishment rules, the simulation services corresponding to the entity classification information under each domain information, and the logical relationships established by the simulation services of each classification under each domain, Wherein, each simulation service corresponds to a terminal node in the hierarchical ontology tree of the simulation module, and the preset simulation tree establishment rule includes multi-layer nodes and classification names corresponding to each node.

为进一步便于用户进行检索调用,在本实施例中,在执行基于每个领域信息下的各分类信息对应的仿真服务向所述仿真模型系统中建立仿真模块层次本体树的步骤之后,所述方法还包括:In order to further facilitate users to make retrieval calls, in this embodiment, after executing the step of establishing a simulation module hierarchical ontology tree in the simulation model system based on the simulation service corresponding to each classification information under each domain information, the method Also includes:

针对每个领域下的仿真服务分别建立由搜索服务器维护的服务注册表,其中,所述服务注册表中包括每个仿真服务的描述信息。A service registry maintained by the search server is established for the simulation services in each domain, wherein the service registry includes description information of each simulation service.

通过上述设置,以实现建立由ElasticSearch搜索服务器维护的分领域服务注册中心的各类服务注册表,从而有效响应用户仿真任务请求,以精确检索所需仿真服务信息。Through the above settings, various service registries of the domain-based service registry maintained by the ElasticSearch search server can be established, so as to effectively respond to user simulation task requests and accurately retrieve the required simulation service information.

需要说明的是,在完成建立由搜索服务器维护的服务注册表后,以实现将仿真服务的描述信息封装为Json形式,并通过Rest方的Http请求发送至搜索服务器中以完成服务描述信息的分类存储,进而便于后续进行检索。It should be noted that after the establishment of the service registry maintained by the search server is completed, the description information of the simulation service is encapsulated in the form of Json, and sent to the search server through the Http request of the Rest party to complete the classification of the service description information. storage for subsequent retrieval.

通过上述方法以完成建立多个仿真服务,以在用户检索和调用仿真服务时,所述终端设备10接收用户提交的仿真服务需求信息封装为Json形式的请求,并通过Rest式的Http请求发送至搜索服务器,以使搜索服务器响应该请求后同样利用Json形式返回所需仿真服务的服务描述信息并进行显示,以使用户依据系统呈现的所需服务的描述信息,得到仿真服务的名称、输入/输出等信息,并依据这些服务信息,通过HTTP请求的方式访问所需服务,从而完成仿真服务的调用。The above method is used to complete the establishment of multiple simulation services, so that when the user retrieves and invokes the simulation service, the terminal device 10 receives the request that the simulation service demand information submitted by the user is encapsulated in the form of Json, and sends it to the Search server, so that after the search server responds to the request, it also returns the service description information of the required simulation service in the form of Json and displays it, so that the user can obtain the name of the simulation service, input / Output and other information, and according to these service information, access the required service through HTTP request, so as to complete the invocation of the simulation service.

请结合图5,在上述基础上,本发明还提供一种仿真服务建立装置100,包括第一接收模块110、第一接收模块110、服务生成模块以及服务建立模块140。Referring to FIG. 5 , on the basis of the above, the present invention further provides an apparatus 100 for establishing a simulation service, including a first receiving module 110 , a first receiving module 110 , a service generating module and a service establishing module 140 .

所述第一接收模块110用于接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至仿真模型系统中基于SpringBoot框架生成的服务生成框架模板。在本实施例中,所述第一接收模块110可用于执行图2所示的步骤S110,关于所样第一接收模块110的具体描述可以参照前文对步骤S110的描述。The first receiving module 110 is configured to receive and search for the simulation model file corresponding to the simulation model demand information from the model database of the simulation model system based on the simulation model demand information input by the user, and based on the simulation model file and the simulation model The requirement information generates a simulation model configuration file, and is added to the service generation framework template generated based on the SpringBoot framework in the simulation model system. In this embodiment, the first receiving module 110 may be configured to execute the step S110 shown in FIG. 2 , and for the specific description of the first receiving module 110, reference may be made to the foregoing description of the step S110.

所述第二接收模块120用于接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中。在本实施例中,所述第二接收模块120可用于执行图2所示的步骤S120,关于所述第二接收模块120的具体描述可以参照前文对步骤S120的描述。The second receiving module 120 is configured to receive the service component configuration information input by the user, generate a service component configuration file based on the requirement analysis tool in the simulation model system, and add it to the service generation framework template. In this embodiment, the second receiving module 120 may be configured to perform step S120 shown in FIG. 2 , and for the specific description of the second receiving module 120 , reference may be made to the foregoing description of step S120 .

请结合图6,可选的,在本实施例中,所述需求解析工具包括XML文件生成工具和YML文件生成工具,所述第二接收模块120包括第一接收子模块和第二接收子模块124。Please refer to FIG. 6 , optionally, in this embodiment, the requirement analysis tool includes an XML file generation tool and a YML file generation tool, and the second receiving module 120 includes a first receiving submodule and a second receiving submodule 124.

所述第一接收子模块用于接收用户以表单形式输入的所述服务生成框架模板所需的仿真模型组件需求信息,并采用所述仿真模型系统中的XML文件生成工具生成XML项目对象模型配置文件并加入至所述服务生成框架模板中。在本实施例中,所述第一接收子模块可用于执行图3所示的步骤S122,关于所述第一接收子模块的具体描述可以参照前文对步骤S122的描述。The first receiving sub-module is used to receive the simulation model component requirement information required by the service generation framework template input by the user in the form of a form, and use the XML file generation tool in the simulation model system to generate an XML project object model configuration file and added to the service generation framework template. In this embodiment, the first receiving sub-module may be configured to execute step S122 shown in FIG. 3 , and for the specific description of the first receiving sub-module, reference may be made to the foregoing description of step S122.

所述第二接收子模块124用于接收用户以表单形式输入的所述服务生成框架模板所需的服务组件配置信息,并采用所述仿真模型系统中的YML文件生成工具生成YML服务配置文件并加入至所述服务生成框架模板中。在本实施例中,所述第二接收子模块124可用于执行图3所示的步骤S124,关于所述第二接收子模块124的具体描述可以参照前文对步骤S124的描述。The second receiving sub-module 124 is configured to receive the service component configuration information required by the service generation framework template entered by the user in the form of a form, and use the YML file generation tool in the simulation model system to generate a YML service configuration file and generate a YML service configuration file. Add to the service generation framework template. In this embodiment, the second receiving sub-module 124 may be configured to perform step S124 shown in FIG. 3 , and for the specific description of the second receiving sub-module 124 , reference may be made to the foregoing description of step S124 .

所述服务生成模块用于将包括所述仿真模型配置文件和所述服务组件配置文件的所述服务生成框架模板发送至与所述终端设备10关联的存储设备,以基于用户输入的模型调用逻辑生成仿真服务。在本实施例中,所述服务生成模块可用于执行图2所示的步骤S130于所述服务生成模块的具体描述可以参照前文对步骤S130。The service generation module is configured to send the service generation framework template including the simulation model configuration file and the service component configuration file to the storage device associated with the terminal device 10, so as to invoke logic based on the model input by the user Generate simulation services. In this embodiment, the service generation module may be configured to execute step S130 shown in FIG. 2 . For the specific description of the service generation module, reference may be made to the foregoing step S130.

所述服务建立模块140用于获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务。在本实施例中,所述服务建立模块140可用于执行图2所示的步骤S140,关于所述服务建立模块140的具体描述可以参照前文对步骤S140的描述。The service establishment module 140 is configured to obtain the simulation service in the storage device, receive service description information for the simulation service input by the user, and encapsulate the simulation service into the simulation service. In this embodiment, the service establishment module 140 may be configured to execute step S140 shown in FIG. 2 , and for the specific description of the service establishment module 140 , reference may be made to the foregoing description of step S140 .

请结合图7,可选的,在本实施例中,当所述仿真服务为多个,且所述仿真服务的服务描述信息包括该仿真服务的领域信息及各领域信息中包括的实体类别信息,所述装置还包括分类模块150、第一关系建立模块160以及第二关系建立模块170。Please refer to FIG. 7 , optionally, in this embodiment, when there are multiple simulation services, and the service description information of the simulation service includes the domain information of the simulation service and the entity category information included in the domain information , the apparatus further includes a classification module 150 , a first relationship establishment module 160 and a second relationship establishment module 170 .

所述分类模块150用于根据各所述仿真服务的服务描述信息中包括的领域信息和实体类别信息对各所述仿真服务进行分类,以得到不同领域下的各分类对应的仿真服务。在本实施例中,所述分类模块150可用于执行图4所示的步骤S150,关于所述分类模块150的具体描述可以参照前文对步骤S150的描述。The classification module 150 is configured to classify each of the simulation services according to the domain information and entity category information included in the service description information of each of the simulation services, so as to obtain simulation services corresponding to each classification in different fields. In this embodiment, the classification module 150 may be configured to perform step S150 shown in FIG. 4 , and for the specific description of the classification module 150 , reference may be made to the foregoing description of step S150 .

所述第一关系建立模块160用于接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对每个领域信息下各个分类信息对应的仿真服务建立逻辑关系。在本实施例中,所述第一关系建立模块160可用于执行图4所示的步骤S160,关于所述第一关系建立模块160的具体描述可以参照前文对步骤S160的描述。The first relationship establishment module 160 is configured to receive the logical relationship description information for each category of simulation services in each field entered by the user, and based on the logical relationship description information, create a simulation service corresponding to each category information under each field information. Create logical relationships. In this embodiment, the first relationship establishment module 160 may be configured to execute step S160 shown in FIG. 4 , and for the specific description of the first relationship establishment module 160 , reference may be made to the foregoing description of step S160 .

所述第二关系建立模块170用于按照预设仿真树建立规则、每个领域信息下的各实体分类信息对应的仿真服务以及每个领域下各个分类的仿真服务建立的逻辑关系向所述仿真模型系统中建立仿真模块层次本体树,其中,每个仿真服务分别对应于所述仿真模块层次本体树中的一个终端节点,所述预设仿真树建立规则中包括多层节点及各节点对应的分类名称。在本实施例中,关于所述第二关系建立模块170的具体描述可以参照前文对仿真服务建立方法的描述。The second relationship establishment module 170 is configured to send the simulation tree to the simulation according to the preset simulation tree establishment rules, the simulation services corresponding to the entity classification information under each domain information, and the logical relationships established by the simulation services of each classification under each domain. A simulation module hierarchical ontology tree is established in the model system, wherein each simulation service corresponds to a terminal node in the simulation module hierarchical ontology tree, and the preset simulation tree establishment rule includes multi-layer nodes and the corresponding nodes of each node. Category Name. In this embodiment, for the specific description of the second relationship establishing module 170, reference may be made to the foregoing description of the method for establishing a simulation service.

综上,本发明提供的一种仿真服务建立方法及装置,针对每一个仿真服务方法包括:接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至服务生成框架模板,接收用户输入的服务组件配置信息并基于仿真模型系统中的需求解析工具生成服务组件配置文件并加入至服务生成框架模板中,将生成的服务生成框架模板发送至存储设备,以基于用户输入的模型调用逻辑生成仿真服务,获得存储设备中的仿真服务,接收用户输入的针对仿真服务的服务描述信息并封装至仿真服务,以实现对仿真模型文件进行Web服务化,以便于用户调用,并满足用户对仿真服务的个性化需求。To sum up, the present invention provides a method and device for establishing a simulation service. For each simulation service method, the method includes: receiving and searching for the corresponding simulation model file from the model database of the simulation model system based on the simulation model requirement information input by the user, according to The simulation model file and the simulation model demand information generate a simulation model configuration file, and add it to the service generation framework template, receive the service component configuration information input by the user, and generate a service component configuration file based on the demand analysis tool in the simulation model system and add it to the In the service generation framework template, the generated service generation framework template is sent to the storage device, the simulation service is generated based on the model invocation logic input by the user, the simulation service in the storage device is obtained, and the service description information for the simulation service input by the user is received. And encapsulate it into the simulation service to realize the Web service of the simulation model file, which is convenient for users to call and meets the user's personalized needs for the simulation service.

在本发明实施例所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置和方法实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus and method embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention, function and operation. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.

另外,在本发明各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.

所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,电子设备,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。If the functions are implemented in the form of software function modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes . It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1.一种仿真服务建立方法,应用于终端设备,所述方法用于建立至少一个仿真服务,其特征在于,针对每一个仿真服务,所述仿真服务建立方法包括:1. a method for establishing an emulation service, applied to a terminal device, the method is used to establish at least one emulation service, it is characterized in that, for each emulation service, the method for establishing the emulation service comprises: 接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至仿真模型系统中基于SpringBoot框架生成的服务生成框架模板;Receive and search for a simulation model file corresponding to the simulation model demand information from the model database of the simulation model system based on the simulation model demand information input by the user, generate a simulation model configuration file according to the simulation model file and the simulation model demand information, and Add to the service generation framework template generated based on the SpringBoot framework in the simulation model system; 接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中;Receive the service component configuration information input by the user and generate a service component configuration file based on the requirement analysis tool in the simulation model system and add it to the service generation framework template; 将包括所述仿真模型配置文件和所述服务组件配置文件的所述服务生成框架模板发送至与所述终端设备关联的存储设备,以基于用户输入的模型调用逻辑生成仿真服务;sending the service generation framework template including the simulation model configuration file and the service component configuration file to a storage device associated with the terminal device, to generate a simulation service based on model invocation logic input by a user; 获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务。Obtain the simulation service in the storage device, receive service description information for the simulation service input by the user, and encapsulate the simulation service into the simulation service. 2.根据权利要求1所述的仿真服务建立方法,其特征在于,当仿真服务生成方法建立的仿真服务为多个,且所述仿真服务的服务描述信息包括该仿真服务的领域信息及各领域信息中包括的实体类别信息时,在执行获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务的步骤之后,所述方法还包括:2. The method for establishing a simulation service according to claim 1, wherein when the simulation service established by the simulation service generating method is multiple, and the service description information of the simulation service includes the field information and each field of the simulation service When the entity category information is included in the information, after performing the steps of obtaining the simulation service in the storage device, receiving service description information for the simulation service input by the user, and encapsulating it into the simulation service, the method further includes: 根据各所述仿真服务的服务描述信息中包括的领域信息和实体类别信息对各所述仿真服务进行分类,以得到不同领域下的各分类对应的仿真服务;Classify each of the simulation services according to the domain information and entity category information included in the service description information of each of the simulation services, so as to obtain simulation services corresponding to each classification in different fields; 接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对每个领域信息下各个分类信息对应的仿真服务建立逻辑关系。Receive the logical relationship description information for each category of simulation services in each field input by the user, and establish a logical relationship for the simulation services corresponding to each category information under each field information based on the logical relationship description information. 3.根据权利要求2所述的仿真服务建立方法,其特征在于,在执行接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对相同领域下各个分类的仿真服务建立逻辑关系的步骤之后,所述方法还包括:3. The method for establishing a simulation service according to claim 2 , wherein the logic relationship description information of the simulation service of each classification under each field that is input by the user is received, and based on the logic relationship description information, the same field is After the step of establishing a logical relationship between the simulation services of each classification, the method further includes: 按照预设仿真树建立规则、每个领域信息下的各实体分类信息对应的仿真服务以及每个领域下各个分类的仿真服务建立的逻辑关系向所述仿真模型系统中建立仿真模块层次本体树,其中,每个仿真服务分别对应于所述仿真模块层次本体树中的一个终端节点,所述预设仿真树建立规则中包括多层节点及各节点对应的分类名称。A simulation module hierarchical ontology tree is established in the simulation model system according to the preset simulation tree establishment rules, the simulation services corresponding to the entity classification information under each domain information, and the logical relationships established by the simulation services of each classification under each domain, Wherein, each simulation service corresponds to a terminal node in the hierarchical ontology tree of the simulation module, and the preset simulation tree establishment rule includes multi-layer nodes and classification names corresponding to each node. 4.根据权利要求3所述的仿真服务建立方法,其特征在于,在执行基于每个领域信息下的各分类信息对应的仿真服务向所述仿真模型系统中建立仿真模块层次本体树的步骤之后,所述方法还包括:4. The method for establishing a simulation service according to claim 3, wherein after executing the step of establishing a simulation module hierarchy ontology tree in the simulation model system based on the simulation service corresponding to each classification information under each domain information , the method also includes: 针对每个领域下的仿真服务分别建立由搜索服务器维护的服务注册表,其中,所述服务注册表中包括每个仿真服务的描述信息。A service registry maintained by the search server is established for the simulation services in each domain, wherein the service registry includes description information of each simulation service. 5.根据权利要求1所述的仿真服务建立方法,其特征在于,所述需求解析工具包括XML文件生成工具和YML文件生成工具,接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中的步骤包括:5. The method for establishing a simulation service according to claim 1, wherein the requirement analysis tool comprises an XML file generation tool and a YML file generation tool, receives the service component configuration information input by the user and is based on the simulation model system. The steps of generating a service component configuration file by the requirement analysis tool and adding it to the service generation framework template include: 接收用户以表单形式输入的所述服务生成框架模板所需的仿真模型组件需求信息,并采用所述仿真模型系统中的XML文件生成工具生成XML项目对象模型配置文件并加入至所述服务生成框架模板中;Receive the simulation model component requirement information required by the service generation framework template input by the user in the form of a form, and use the XML file generation tool in the simulation model system to generate an XML project object model configuration file and add it to the service generation framework in the template; 接收用户以表单形式输入的所述服务生成框架模板所需的服务组件配置信息,并采用所述仿真模型系统中的YML文件生成工具生成YML服务配置文件并加入至所述服务生成框架模板中。Receive the service component configuration information required by the service generation framework template input by the user in form, and use the YML file generation tool in the simulation model system to generate a YML service configuration file and add it to the service generation framework template. 6.根据权利要求1所述的仿真服务建立方法,其特征在于,将所述仿真模型服务配置文件和所述服务生成框架模板发送至与该仿真模型系统关联的存储设备,并基于用户输入的模型调用逻辑生成仿真服务后发送至所述仿真模型系统的步骤包括:6. The method for establishing a simulation service according to claim 1, wherein the simulation model service configuration file and the service generation framework template are sent to a storage device associated with the simulation model system, and based on the user input The steps of generating a simulation service by model invocation logic and sending it to the simulation model system include: 将包括所述仿真模型服务配置文件和所述服务生成框架模板发送至与所述终端设备关联的存储设备;sending the service configuration file including the simulation model and the service generation framework template to a storage device associated with the terminal device; 接收并基于用户输入的模型调用逻辑生成定制的仿真业务,对所述存储设备中存储的服务生成框架模板进行配置生成仿真服务。Receive and generate a customized simulation service based on the model invocation logic input by the user, and configure the service generation framework template stored in the storage device to generate a simulation service. 7.一种仿真服务建立装置,应用于终端设备,所述装置用于建立至少一个仿真服务,其特征在于,所述装置包括:7. An apparatus for establishing an emulation service, applied to a terminal device, the apparatus is used to establish at least one emulation service, wherein the apparatus comprises: 第一接收模块,用于接收并基于用户输入的仿真模型需求信息从仿真模型系统的模型数据库中查找与该仿真模型需求信息对应的仿真模型文件,根据该仿真模型文件及所述仿真模型需求信息生成仿真模型配置文件,并加入至仿真模型系统中基于SpringBoot框架生成的服务生成框架模板;The first receiving module is configured to receive and search for the simulation model file corresponding to the simulation model demand information from the model database of the simulation model system based on the simulation model demand information input by the user, and according to the simulation model file and the simulation model demand information Generate a simulation model configuration file and add it to the service generation framework template generated based on the SpringBoot framework in the simulation model system; 第二接收模块,用于接收用户输入的服务组件配置信息并基于所述仿真模型系统中的需求解析工具生成服务组件配置文件并加入至所述服务生成框架模板中;a second receiving module, configured to receive the service component configuration information input by the user and generate a service component configuration file based on the requirement analysis tool in the simulation model system and add it to the service generation framework template; 服务生成模块,用于将包括所述仿真模型配置文件和所述服务组件配置文件的所述服务生成框架模板发送至与所述终端设备关联的存储设备,以基于用户输入的模型调用逻辑生成仿真服务;A service generation module, configured to send the service generation framework template including the simulation model configuration file and the service component configuration file to a storage device associated with the terminal device, so as to generate a simulation based on the model invocation logic input by the user Serve; 服务建立模块,用于获得所述存储设备中的仿真服务,接收用户输入的针对该仿真服务的服务描述信息并封装至该仿真服务。The service establishment module is configured to obtain the simulation service in the storage device, receive service description information for the simulation service input by the user, and encapsulate the simulation service into the simulation service. 8.根据权利要求7所述的仿真服务建立装置,其特征在于,所述仿真服务为多个,且所述仿真服务的服务描述信息包括该仿真服务的领域信息及各领域信息中包括的实体类别信息,所述装置还包括:8 . The apparatus for establishing a simulation service according to claim 7 , wherein there are multiple simulation services, and the service description information of the simulation service includes domain information of the simulation service and entities included in each domain information. 9 . category information, the apparatus further includes: 分类模块,用于根据各所述仿真服务的服务描述信息中包括的领域信息和实体类别信息对各所述仿真服务进行分类,以得到不同领域下的各分类对应的仿真服务;A classification module, configured to classify each of the simulation services according to the domain information and entity category information included in the service description information of each of the simulation services, so as to obtain simulation services corresponding to each classification in different fields; 第一关系建立模块,用于接收用户输入的针对每个领域下各个分类的仿真服务的逻辑关系描述信息,并基于该逻辑关系描述信息对每个领域信息下各个分类信息对应的仿真服务建立逻辑关系。The first relationship establishment module is used to receive the logical relationship description information for the simulation services of each category under each field input by the user, and based on the logical relationship description information, establish logic for the simulation services corresponding to each category information under each field information relation. 9.根据权利要求8所述的仿真服务建立装置,其特征在于,所述装置还包括:9. The apparatus for establishing a simulation service according to claim 8, wherein the apparatus further comprises: 第二关系建立模块,用于按照预设仿真树建立规则、每个领域信息下的各实体分类信息对应的仿真服务以及每个领域下各个分类的仿真服务建立的逻辑关系向所述仿真模型系统中建立仿真模块层次本体树,其中,每个仿真服务分别对应于所述仿真模块层次本体树中的一个终端节点,所述预设仿真树建立规则中包括多层节点及各节点对应的分类名称。The second relationship establishment module is configured to send the simulation model system to the simulation model system according to the preset simulation tree establishment rules, the simulation services corresponding to the entity classification information under each domain information, and the logical relationships established by the simulation services of each classification under each domain. A simulation module hierarchical ontology tree is established in the simulation module, wherein each simulation service corresponds to a terminal node in the simulation module hierarchical ontology tree, and the preset simulation tree establishment rules include multi-layer nodes and the corresponding classification names of each node. . 10.根据权利要求7所述的仿真服务建立装置,其特征在于,所述需求解析工具包括XML文件生成工具和YML文件生成工具,所述第二接收模块包括:10. The simulation service establishment device according to claim 7, wherein the requirement analysis tool comprises an XML file generation tool and a YML file generation tool, and the second receiving module comprises: 第一接收子模块,用于接收用户以表单形式输入的所述服务生成框架模板所需的仿真模型组件需求信息,并采用所述仿真模型系统中的XML文件生成工具生成XML项目对象模型配置文件并加入至所述服务生成框架模板中;The first receiving sub-module is used to receive the simulation model component requirement information required by the service generation framework template input by the user in the form of a form, and use the XML file generation tool in the simulation model system to generate an XML project object model configuration file and added to the service generation framework template; 第二接收子模块,用于接收用户以表单形式输入的所述服务生成框架模板所需的服务组件配置信息,并采用所述仿真模型系统中的YML文件生成工具生成YML服务配置文件并加入至所述服务生成框架模板中。The second receiving sub-module is used to receive the service component configuration information required by the service generation framework template input by the user in the form of a form, and use the YML file generation tool in the simulation model system to generate the YML service configuration file and add it to the The service generation framework template.
CN201811266949.0A 2018-10-29 2018-10-29 Simulation service establishment method and device Active CN109446648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811266949.0A CN109446648B (en) 2018-10-29 2018-10-29 Simulation service establishment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811266949.0A CN109446648B (en) 2018-10-29 2018-10-29 Simulation service establishment method and device

Publications (2)

Publication Number Publication Date
CN109446648A CN109446648A (en) 2019-03-08
CN109446648B true CN109446648B (en) 2020-12-01

Family

ID=65549070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811266949.0A Active CN109446648B (en) 2018-10-29 2018-10-29 Simulation service establishment method and device

Country Status (1)

Country Link
CN (1) CN109446648B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458383B (en) * 2019-06-24 2020-08-18 平安国际智慧城市科技股份有限公司 Method and device for realizing demand processing servitization, computer equipment and storage medium
CN111597686A (en) * 2020-04-15 2020-08-28 北京仿真中心 Loosely-coupled visual simulation resource integration and encapsulation method and system
CN112084417B (en) * 2020-09-24 2025-02-21 北京明略昭辉科技有限公司 A method, device, electronic device and storage medium for generating service results
CN112199082B (en) * 2020-10-14 2023-04-14 杭州安恒信息技术股份有限公司 A HTTP response processing method, device, electronic equipment and storage medium
CN114647459B (en) * 2022-03-31 2024-04-26 国网河北省电力有限公司培训中心 Protection schematic diagram model multiplexing simulation method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420437A (en) * 2008-11-14 2009-04-29 北京航空航天大学 Interface device for prototype system and HLA simulation system
CN102609248A (en) * 2011-12-28 2012-07-25 方伟 Integrated avionics system modeling and simulation platform based on MDA (model driven architecture)
WO2016199383A1 (en) * 2015-06-12 2016-12-15 日本電気株式会社 Service design assistance device, method, and program recording medium
CN106295084A (en) * 2016-09-29 2017-01-04 北京华如科技股份有限公司 Service-oriented expansible combination type artificial engine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420437A (en) * 2008-11-14 2009-04-29 北京航空航天大学 Interface device for prototype system and HLA simulation system
CN102609248A (en) * 2011-12-28 2012-07-25 方伟 Integrated avionics system modeling and simulation platform based on MDA (model driven architecture)
WO2016199383A1 (en) * 2015-06-12 2016-12-15 日本電気株式会社 Service design assistance device, method, and program recording medium
CN106295084A (en) * 2016-09-29 2017-01-04 北京华如科技股份有限公司 Service-oriented expansible combination type artificial engine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于面向服务的通用任务规划仿真集成方法研究;吴江等;《系统仿真学报》;20090131;第21卷(第2期);第547-550,553页 *

Also Published As

Publication number Publication date
CN109446648A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109446648B (en) Simulation service establishment method and device
CN112162915B (en) Test data generation method, device, equipment and storage medium
US20190132264A1 (en) Generation of a chatbot interface for an application programming interface
CN114981775B (en) Cloud-based API metadata management method and system for integrated API management
CN105051687B (en) Using dispositions method and equipment
CN110888794B (en) Interface testing method and device
CN104503768B (en) A kind of application programming interface call method and equipment
CN107888673A (en) A unified management implementation method suitable for heterogeneous cloud platforms
CN111752820A (en) Pressure testing method of gPC interface, computer equipment and storage medium
CN111651140B (en) Service method and device based on workflow
WO2023142911A1 (en) Service processing method and device
CN101853152A (en) A method and system for generating a graphical user interface
US8972487B2 (en) Automated framework for testing enterprise services consumer technologies
CN110213163B (en) A routing and forwarding method and device based on nginx and zuul
CN110764769A (en) Method and device for processing user request
CN102629194B (en) Novel application store adaptor facing mobile terminals
CN115016784A (en) Low code application multiplexing method, application analysis system, equipment and storage medium
CN107368293B (en) Page structure generation method, page screenshot reporting method, device and system
CN113076153A (en) Interface calling method and device
CN105516250A (en) Internet-of-things service invoking platform and system
CN111158661A (en) System interface docking method, device, medium and electronic equipment
CN113626398B (en) A material sharing implementation method for online reporting of government service items
CN114116111B (en) Method, device, equipment and medium for configuring flow node and data processing
US8468159B2 (en) Data element categorization in a service-oriented architecture
CN113742103B (en) Cross-data source service implementation method and device, and electronic device

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