CN105006017B - Three-dimensional scenic emulation mode is generated based on Unity dynamic techniques - Google Patents
Three-dimensional scenic emulation mode is generated based on Unity dynamic techniques Download PDFInfo
- Publication number
- CN105006017B CN105006017B CN201510376363.XA CN201510376363A CN105006017B CN 105006017 B CN105006017 B CN 105006017B CN 201510376363 A CN201510376363 A CN 201510376363A CN 105006017 B CN105006017 B CN 105006017B
- Authority
- CN
- China
- Prior art keywords
- scene
- model
- simulation
- communication equipment
- equipment
- 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
Links
Landscapes
- Telephonic Communication Services (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明公开了一种基于Unity动态技术生成三维场景仿真方法,其属于电力系统通信场景仿真领域,其包括如下步骤:步骤1、创建三维模型:具体创建包括:通信机房、通信设备的三维模型,所述通信设备包括设备子架、单板和光纤;步骤2、在Unity中新建C#程序读取自定义配置文件,自动生成三维场景仿真模块;步骤3、在三维场景仿真模块中新建监听线程,订阅实时数据库的消息频道,从外部的设备仿真程序获取生成三维场景仿真模块所需的外部实时数据;步骤4、在三维场景中操作设备或修复设备故障,并将操作信息发送给外部的设备仿真程序,进行仿真计算和判断。本发明能实时显示通信设备仿真模块中的设备运行状态,以及能灵活地进行故障检查和故障修复的操作。
The invention discloses a method for generating a three-dimensional scene simulation based on Unity dynamic technology, which belongs to the field of power system communication scene simulation, and includes the following steps: Step 1, creating a three-dimensional model: specifically creating a three-dimensional model including: a communication room and communication equipment, Described communication equipment comprises equipment subframe, veneer and optical fiber; Step 2, newly-built C# program reads custom configuration file in Unity, automatically generates three-dimensional scene simulation module; Step 3, newly builds monitoring thread in three-dimensional scene simulation module, Subscribe to the message channel of the real-time database, and obtain the external real-time data required to generate the 3D scene simulation module from the external device simulation program; step 4, operate the device or repair the device failure in the 3D scene, and send the operation information to the external device simulation program for simulation calculation and judgment. The invention can display the operating state of the equipment in the simulation module of the communication equipment in real time, and can flexibly perform fault checking and fault repairing operations.
Description
技术领域technical field
本发明属于电力系统通信场景仿真领域,具体涉及一种基于Unity动态技术生成三维场景仿真方法,主要用于针对电力通信仿真系统的各类通信机房及通信传输设备的三维场景仿真。The invention belongs to the field of power system communication scene simulation, and in particular relates to a method for generating a three-dimensional scene simulation based on Unity dynamic technology, which is mainly used for three-dimensional scene simulation of various communication rooms and communication transmission equipment of a power communication simulation system.
背景技术Background technique
随着电力系统自动化技术的发展,电力系统通信网络成为信息传输和自动化控制的关键因素。这就要求用于电力系统通信工作人员培训的仿真培训系统要更加现代化,更加切合实际,从而达到高效实训的培训目的。With the development of power system automation technology, the power system communication network has become a key factor in information transmission and automation control. This requires the simulation training system used for the training of power system communication staff to be more modern and more realistic, so as to achieve the training purpose of efficient training.
目前的通信仿真方法中,主要是基于通信原理进行虚拟网络仿真,其无法真实模拟出在网运行的电力通信机房和通信设备所处的实际环境和现场的实际情况,培训中不利于通信工作人员更好的了解现场的通信机房和通信设备。而在通信机房现场环境下进行培训不仅容易损坏昂贵设备造成很大经济损失,而且容易使在网运行的业务中断引发不可预估的严重后果。但目前基于真实的现场环境并且可动态生成电力通信三维场景的可视化仿真培训方法尚不存在。In the current communication simulation method, the virtual network simulation is mainly based on the communication principle, which cannot truly simulate the actual environment and the actual situation of the power communication room and communication equipment running on the network, and the training is not conducive to the communication staff. Better understand the on-site communication room and communication equipment. Training in the on-site environment of the communication room is not only easy to damage expensive equipment and cause great economic losses, but also easily interrupts the services running on the network, causing unpredictable and serious consequences. However, there is no visual simulation training method based on the real field environment and dynamically generating three-dimensional power communication scenes.
发明内容Contents of the invention
本发明所要解决的技术问题是提供了一种便利高效的用于对电力系统通信工作人员、通信设备运行维护和检修试验人员培训的基于Unity动态技术生成三维场景仿真方法。The technical problem to be solved by the present invention is to provide a convenient and efficient method for generating three-dimensional scene simulation methods based on Unity dynamic technology for training power system communication staff, communication equipment operation maintenance and repair test personnel.
本发明采用如下技术方案:The present invention adopts following technical scheme:
一种基于Unity动态技术生成三维场景仿真方法,其具体步骤如下:A method for generating a three-dimensional scene simulation based on Unity dynamic technology, the specific steps of which are as follows:
步骤1、创建三维模型:Step 1. Create a 3D model:
具体创建包括:通信机房、通信设备的三维模型,所述通信设备包括设备子架、单板和光纤;The specific creation includes: a three-dimensional model of the communication room and communication equipment, and the communication equipment includes equipment subracks, single boards and optical fibers;
1-1、依据通信机房和通信设备的三维尺寸数据及机房结构图,在3DMAX建模工具中按照1:1的尺寸创建通信机房和通信设备的三维模型;并依据通信机房内饰图、通信设备外观图和通信设备布局图,创建通信机房、通信设备的材质来渲染通信机房和通信设备的三维模型效果;1-1. According to the three-dimensional size data of the communication equipment room and communication equipment and the structure diagram of the equipment room, create a three-dimensional model of the communication equipment room and communication equipment in the 3DMAX modeling tool according to the size of 1:1; Equipment appearance diagram and communication equipment layout diagram, create materials for communication equipment room and communication equipment to render the 3D model effect of communication equipment room and communication equipment;
1-2、在Unity中创建资源文件夹,并分类为通信机房模型库和通信设备模型库;将在3DMAX中创建好的通信机房三维模型文件拖入到通信机房模型库中,将通信设备三维模型文件拖入到通信设备模型库中;1-2. Create a resource folder in Unity and classify it into the communication equipment room model library and communication equipment model library; drag the 3D model file of the communication equipment room created in 3DMAX into the communication equipment room model library, and convert the communication equipment 3D model library into the communication equipment room model library. The model file is dragged into the communication equipment model library;
在Unity中设置通信机房模型库中每种规格的机房的三维模型初始位置坐标,设置通信设备模型库中每种类型的设备的三维模型初始位置坐标,将上述设置好初始坐标的通信机房模型和通信设备模型保存成为预设模型文件,并分别存到Unity的通信机房模型库和通信设备模型库中;In Unity, set the initial position coordinates of the 3D model of each type of equipment room in the communication equipment model library, set the initial position coordinates of the 3D model of each type of equipment in the communication equipment model library, and combine the communication equipment room model with the above initial coordinates and The communication equipment model is saved as a preset model file, and stored in Unity's communication equipment room model library and communication equipment model library respectively;
步骤2、在Unity中新建C#程序读取自定义配置文件,自动生成三维场景仿真模块:Step 2. Create a new C# program in Unity to read the custom configuration file and automatically generate a 3D scene simulation module:
2-1、在所述自定义配置文件中分层次定义机房类型、网元个数、每个网元的设备型号、设备每个槽位的单板型号;2-1. Define the type of computer room, the number of network elements, the device model of each network element, and the single board model of each slot of the device in the custom configuration file;
2-2、读取自定义配置文件,解析出所述自定义配置文件中的如下:数据机房名称、设备名称、单板名称以及网元数量;2-2. Read the custom configuration file, and parse out the following in the custom configuration file: data room name, device name, single board name and number of network elements;
2-3、根据从自定义配置文件中读取到的机房名称、设备名称、单板名称以及网元数量,通过C#程序循环调用Unity中模型资源文件载入函数,从Unity中的通信机房模型库和通信设备模型库中载入之前预设好的模型文件;2-3. According to the computer room name, device name, single board name and the number of network elements read from the custom configuration file, call the model resource file loading function in Unity through the C# program to load the model from the communication room model in Unity Load the previously preset model files in the library and communication equipment model library;
步骤3、在三维场景仿真模块中新建监听线程,订阅实时数据库的消息频道,从外部的设备仿真程序获取生成三维场景仿真模块所需的外部实时数据:Step 3. Create a new monitoring thread in the 3D scene simulation module, subscribe to the message channel of the real-time database, and obtain the external real-time data required to generate the 3D scene simulation module from an external device simulation program:
3-1、三维场景仿真模块与外部的设备仿真程序,通过Redis数据库的“订阅/发布”机制进行消息和数据的传输,三维场景仿真模块根据所订阅的消息频道,监听接收外部的设备仿真程序发送来的消息,并根据消息中的内容,实时更新三维场景仿真模块中设备模型的指示灯的状态;3-1. The 3D scene simulation module and the external device simulation program transmit messages and data through the "subscribe/publish" mechanism of the Redis database. The 3D scene simulation module monitors and receives the external device simulation program according to the subscribed message channel Send the message, and according to the content in the message, update the status of the indicator light of the equipment model in the 3D scene simulation module in real time;
3-2、 三维场景仿真模块接收来自外部的设备仿真程序的消息并进行解析,此解析出所述消息的协议格式为:“状态标志_故障类型_网元设备ID_设备槽位ID”;3-2. The 3D scene simulation module receives and analyzes the message from the external device simulation program, and the protocol format of the message is analyzed: "status flag_fault type_network element device ID_device slot ID";
3-3、根据解析出的所述协议格式,判断外部仿真设备的运行状态是否正常,如异常则进一步确定故障类型和故障位置,最后通过三维场景中对应故障位置模型的指示灯显示其为告警状态,如正常则按正常状态的指示灯显示规则刷新三维设备模型的指示灯状态;3-3. According to the parsed protocol format, judge whether the operation status of the external simulation device is normal, if abnormal, further determine the fault type and fault location, and finally display it as an alarm through the indicator light corresponding to the fault location model in the 3D scene status, if it is normal, refresh the indicator status of the 3D equipment model according to the normal status indicator display rules;
步骤4、在三维场景中操作设备或修复设备故障,并将操作信息发送给外部的设备仿真程序,进行仿真计算和判断:Step 4. Operate the equipment or repair equipment faults in the 3D scene, and send the operation information to the external equipment simulation program for simulation calculation and judgment:
4-1、在三维场景中根据告警指示,在相应故障位置查找引发告警的故障设备,并根据故障类型进行相应的修复操作;4-1. In the 3D scene, according to the alarm indication, find the faulty equipment that caused the alarm at the corresponding fault location, and perform corresponding repair operations according to the fault type;
4-2、完成修复操作后,三维场景仿真模块向外部的设备仿真程序发送操作消息,其包括修复设备的ID和操作的类型;其消息格式为:“操作类型_网元设备ID_设备槽位ID”;4-2. After the repair operation is completed, the 3D scene simulation module sends an operation message to the external device simulation program, which includes the ID of the repair device and the type of operation; the message format is: "operation type_network element device ID_device slot bit_id';
4-3、三维场景仿真模块中的监听线程,接收外部的设备仿真程序发送来的仿真计算结果:4-3. The monitoring thread in the 3D scene simulation module receives the simulation calculation results sent by the external device simulation program:
若之前修复操作无误,则所述三维场景仿真模块中的监听线程会接收到正常状态的消息,从而更新三维场景中相应设备的指示灯恢复到正常状态;若之前的故障修复操作有误,则所述三维场景仿真模块中的监听线程仍将接收到异常状态的消息,三维场景中相应设备的指示灯仍然显示异常状态,此时,返回继续顺序执行步骤4-1,进行故障的检查和修复并发送操作消息,循环执行。If the previous repair operation is correct, the monitoring thread in the 3D scene simulation module will receive a message of normal state, thereby updating the indicator light of the corresponding device in the 3D scene to return to the normal state; if the previous fault repair operation is wrong, then The monitoring thread in the three-dimensional scene simulation module will still receive the message of abnormal state, and the indicator light of the corresponding equipment in the three-dimensional scene still shows abnormal state. At this time, return to continue to execute step 4-1 in order to check and repair the fault And send an operation message, and execute it cyclically.
进一步的,所述自定义配置文件中分层次定义指的是第一层定义机房类型的名称和网元的个数;其第二层定义不同网元的网元编号、设备类型名称;其第三层定义设备每个槽位编号及对应的单板类型名称。Further, the hierarchical definition in the self-defining configuration file refers to that the first layer defines the name of the type of computer room and the number of network elements; its second layer defines the network element numbers and device type names of different network elements; its second layer defines The third layer defines the number of each slot of the device and the name of the corresponding board type.
进一步的,所述步骤3中获取生成三维场景仿真模块所需的外部实时数据包括:设备单板指示灯状态、设备当前告警状态、设备光模块和光纤当前的光功率值。Further, the external real-time data required to generate the 3D scene simulation module obtained in step 3 includes: the status of the indicator light of the device single board, the current alarm status of the device, the current optical power value of the device optical module and optical fiber.
进一步的,所述三维场景仿真模块包括场景显示模块和场景操作模块;所述场景显示模块的数据输入端接外部的三维仿真模型库和场景配置文件库,所述场景操作模块的控制输出端接入场景显示模块的指令输入端,所述场景操作模块经数据通信模块与外部的设备仿真程序相通信。Further, the three-dimensional scene simulation module includes a scene display module and a scene operation module; the data input terminal of the scene display module is connected to an external three-dimensional simulation model library and a scene configuration file library, and the control output terminal of the scene operation module is connected to into the command input terminal of the scene display module, and the scene operation module communicates with the external equipment simulation program through the data communication module.
进一步的,所述场景显示模块根据实际通信仿真培训案例的需求,从所述场景配置文件库中动态读取并解析指定的自定义配置文件,根据解析后的数据,从所述三维仿真模型库中调取相关三维模型文件,从而显示出真实通信机房的虚拟化可视化仿真场景。Further, the scene display module dynamically reads and parses the specified custom configuration file from the scene configuration file library according to the requirements of the actual communication simulation training case, and according to the parsed data, from the 3D simulation model library Relevant 3D model files are retrieved from the computer to display the virtualized and visualized simulation scene of the real communication room.
进一步的,所述场景操作模块用于实现对三维场景仿真模块中的设备模型的操作功能。Further, the scene operation module is used to realize the operation function of the equipment model in the three-dimensional scene simulation module.
进一步的,所述通信机房的规格包括省级调度中心通信机房、地市级调度中心通信机房和110KV/220KV/500KV各级厂站通信机房;所述通信设备的型号包括华为OSN1500、华为OSN2500、华为OSN3500和华为OSN7500系列。Further, the specifications of the communication room include the communication room of the provincial dispatching center, the communication room of the prefecture-level dispatching center, and the communication room of 110KV/220KV/500KV plant stations at all levels; the models of the communication equipment include Huawei OSN1500, Huawei OSN2500, Huawei OSN3500 and Huawei OSN7500 series.
本发明的有益效果是:The beneficial effects of the present invention are:
(1)本发明在基于Unity动态生成技术生成三维场景,仿真电力通信系统在运行中,通过对真实的各类变电站、各级调度中心等通信机房及通信传输设备进行三维建模,并真实模拟现场机房的网络连接情况,创建出各个真实的电力通信机房的三维仿真场景;与此同时,该三维场景仿真模块可以和电力通信仿真系统中的通信设备仿真模块进行通信,实时接收和发送仿真设备的运行状态及数据。(1) The present invention generates three-dimensional scenes based on Unity dynamic generation technology, simulates the operation of the power communication system, and performs three-dimensional modeling on real communication rooms and communication transmission equipment such as various substations and dispatch centers at all levels, and simulates the real The network connection of the on-site computer room creates a 3D simulation scene of each real power communication computer room; at the same time, the 3D scene simulation module can communicate with the communication equipment simulation module in the power communication simulation system, and receive and send simulation equipment in real time operating status and data.
(2)利用本发明相关专业人员在三维场景仿真模块中进行培训操作具有很好的现实感,解决了在网运行通信设备不方便操作而导致的培训与实际相脱节的问题,提高了培训效率和培训质量,缩短了培训周期,能够极大地提高通信维护人员的技术水平。(2) Using the relevant professionals of the present invention to carry out training operations in the three-dimensional scene simulation module has a good sense of reality, which solves the problem that the training is out of touch with the actual situation caused by the inconvenient operation of the communication equipment running on the network, and improves the training efficiency And training quality, shorten the training cycle, can greatly improve the technical level of communication maintenance personnel.
(3)本发明应用在电力通信三维可视化仿真培训系统中,利用3D建模仿真技术实现电力通信机房和通信设备相关模型的创建。(3) The present invention is applied in a three-dimensional visualization simulation training system for electric power communication, and uses 3D modeling and simulation technology to realize the creation of related models of electric power communication room and communication equipment.
(4)本发明通过读取自定义配置文件,能自动生成相应的电力通信三维仿真场景,真实感强。(4) The present invention can automatically generate a corresponding three-dimensional simulation scene of electric power communication by reading a custom configuration file, which has a strong sense of reality.
(5)本发明中的三维场景仿真模块与外部的设备仿真程序之间的通信机制,通过实时数据库提供的消息总线来完成,能够保证三维仿真模块中各个设备模型的状态显示与外部仿真设备的运行状态同步,从而是使通信仿真培训更加接近现实。(5) The communication mechanism between the three-dimensional scene simulation module and the external equipment simulation program in the present invention is completed through the message bus provided by the real-time database, which can ensure that the status display of each equipment model in the three-dimensional simulation module is consistent with that of the external simulation equipment. The operation status is synchronized, thus making the communication simulation training closer to reality.
(6)本发明能实时显示通信设备仿真模块中的设备运行状态,以及能灵活地进行故障检查和故障修复的操作。(6) The present invention can display the operating state of the equipment in the simulation module of the communication equipment in real time, and can flexibly perform fault inspection and fault repair operations.
附图说明Description of drawings
图1为本仿真方法的工作流程图。Figure 1 is a flow chart of the simulation method.
图2为本发明中自定义配置文件的层次结构图。FIG. 2 is a hierarchical structure diagram of a custom configuration file in the present invention.
图3为本发明中监听线程的工作流程图。Fig. 3 is a working flow chart of the monitoring thread in the present invention.
图4为本发明中三维场景仿真模块的结构示意图。Fig. 4 is a schematic structural diagram of a three-dimensional scene simulation module in the present invention.
具体实施方式Detailed ways
下面结合附图1~4对本发明作进一步说明。Below in conjunction with accompanying drawing 1~4, the present invention will be further described.
参照图1~4,本实施例的实现步骤如下:With reference to Fig. 1~4, the implementation steps of the present embodiment are as follows:
步骤1、创建三维模型,其包括通信机房模型和通信设备模型,所述通信设备包括设备子架、单板和光纤。Step 1. Create a three-dimensional model, which includes a communication equipment room model and a communication equipment model, and the communication equipment includes equipment subracks, single boards and optical fibers.
1-1、电力系统通信机房规格有:省级调度中心通信机房、地市级调度中心通信机房、110KV/220KV/500KV等各级厂站通信机房;通信设备型号有:华为OSN1500、华为OSN2500、华为OSN3500、华为OSN7500等系列。1-1. The specifications of the power system communication room include: provincial dispatching center communication room, prefecture-level dispatching center communication room, 110KV/220KV/500KV plant station communication room at all levels; communication equipment models include: Huawei OSN1500, Huawei OSN2500, Huawei OSN3500, Huawei OSN7500 and other series.
通过对现场不同通信机房和通信设备的实际测量及通信机房建设资料和通信设备手册资料,获取每个通信机房和通信设备的三维尺寸、通信机房结构图、通信机房内饰图、通信机房设备布局图以及设备外观图。所述通信设备的三维尺寸即其长度、宽度和高度。Obtain the three-dimensional dimensions of each communication room and communication equipment, the structure diagram of the communication room, the interior drawing of the communication room, and the equipment layout of the communication room through the actual measurement of different communication rooms and communication equipment on site, as well as the construction materials of the communication room and communication equipment manuals. diagrams and appearance diagrams of the equipment. The three-dimensional dimensions of the communication device are its length, width and height.
依据真实的通信机房和通信设备尺寸数据及机房结构图,在3DMAX建模工具中按照1:1的尺寸创建通信机房和通信设备的三维模型;并依据通信机房内饰图、通信设备外观图和通信设备布局图,创建通信机房、通信设备的材质来渲染通信机房和通信设备的三维模型效果。Based on the real size data of the communication equipment room and communication equipment and the structure diagram of the equipment room, create a 3D model of the communication equipment room and communication equipment in the 3DMAX modeling tool according to the size of 1:1; Layout diagram of communication equipment, create materials for communication equipment room and communication equipment to render the 3D model effect of communication equipment room and communication equipment.
1-2、在Unity中创建资源文件夹,并分类为通信机房模型库和通信设备模型库。将在3DMAX中创建好的通信机房.FBX三维模型文件拖入到通信机房模型库中,将通信设备.FBX三维模型文件拖入到通信设备模型库中。1-2. Create a resource folder in Unity and classify it into a communication room model library and a communication equipment model library. Drag the communication equipment room.FBX three-dimensional model file created in 3DMAX into the communication equipment room model library, and drag the communication equipment.FBX three-dimensional model file into the communication equipment model library.
在Unity中将机房模型库中每种规格的机房三维模型初始位置坐标(x,y,z),设置为(0,0,0);将设备模型库中每种类型的设备三维模型初始位置坐标(x,y,z),设置为(33,1.7,3.8),此坐标为设备在机房模型中摆放时指定的起始坐标。将上述设置好初始坐标的机房模型和设备模型保存成为.prefab预设模型文件,并分别存到Unity的机房模型库和设备模型库中。In Unity, set the initial position coordinates (x,y,z) of the 3D model of each specification in the computer room model library to (0,0,0); set the initial position of the 3D model of each type of equipment in the equipment model library Coordinates (x, y, z), set to (33, 1.7, 3.8), this coordinate is the starting coordinate specified when the equipment is placed in the computer room model. Save the computer room model and equipment model with the initial coordinates set above as .prefab preset model files, and save them in Unity's computer room model library and equipment model library respectively.
步骤2.、在Unity中新建C#程序读取自定义配置文件,自动生成三维场景。Step 2. Create a new C# program in Unity to read the custom configuration file and automatically generate a 3D scene.
2-1、自定义配置文件中分层次定义了机房类型、网元个数、每个网元的设备型号、设备每个槽位的单板型号,如图2所示。2-1. The type of computer room, the number of network elements, the device model of each network element, and the single board model of each slot of the device are defined in the custom configuration file, as shown in Figure 2.
所述自定义配置文件的第一层定义了机房类型的名称和网元的个数;其第二层定义了不同网元的网元编号、设备类型名称;其第三层定义了设备每个槽位编号及对应的单板类型名称。The first layer of the custom configuration file defines the name of the computer room type and the number of network elements; its second layer defines the network element number and device type name of different network elements; its third layer defines the number of each Slot number and corresponding board type name.
所述自定义配置文件的层次结构如图2所示。The hierarchical structure of the custom configuration file is shown in FIG. 2 .
下列是一个应用实例中的配置文件定义格式:The following is the configuration file definition format in an application example:
[220kv_2][220kv_2]
<1_OSN7500> <1_OSN7500>
Slot_1_SL16A Slot_1_SL16A
Slot_2_NULL Slot_2_NULL
Slot_38_NULL Slot_38_NULL
<2_OSN7500> <2_OSN7500>
Slot_1_SL16A Slot_1_SL16A
Slot_2_NULL Slot_2_NULL
Slot_38_NULL Slot_38_NULL
在[220kv_2]中,“220kv”为机房规格名称,“2”为网元个数;In [220kv_2], "220kv" is the specification name of the computer room, and "2" is the number of network elements;
在<1_OSN7500>和<2_OSN7500>中,“1”和“2”为网元编号,“OSN7500”为网元编号对应的设备型号名称,In <1_OSN7500> and <2_OSN7500>, "1" and "2" are NE numbers, and "OSN7500" is the device model name corresponding to the NE number.
在Slot_1_SL16A和Slot_2_NULL中,“Slot”为设备槽位名称关键字,“1”和“2”为设备槽位号,“SL16A” 为该槽位所插单板的型号名称,“NULL”表示该槽位插入空单板。In Slot_1_SL16A and Slot_2_NULL, "Slot" is the keyword of the device slot name, "1" and "2" are the device slot numbers, "SL16A" is the model name of the board inserted in the slot, and "NULL" indicates the Insert an empty board into the slot.
2-2、读取所述自定义配置文件,解析该文件中的数据:2-2. Read the custom configuration file and parse the data in the file:
扫描文件中的“[]”,如果未找到“[]”结束处理;如果找到了,取出“[]”中的字符串,并分割“_”前后的的字符串和数据,并分别赋值给程序中的机房名变量和循环变量;Scan the "[]" in the file, if no "[]" is found, end processing; if found, take out the string in "[]", and split the string and data before and after "_", and assign them to Computer room name variables and loop variables in the program;
扫描文件中的“<>”,取出“<>”中的字符串,并分割“_”前后的的数据和字符串,并分别赋值给程序中的循环变量和设备名变量;Scan the "<>" in the file, take out the character string in "<>", and divide the data and character string before and after "_", and assign them to the loop variable and device name variable in the program respectively;
扫描“Slot”关键字,分割“_”前后的的数据和字符串,并分别赋值给程序中的循环变量和单板名变量;Scan the "Slot" keyword, split the data and character strings before and after "_", and assign them to the cycle variable and the board name variable in the program respectively;
2-3、根据从文件中读取到的机房名称、设备名称、单板名称以及网元数量,通过C#程序循环调用Unity中的Resources.Load(Name)方法,从Unity中的机房模型库和设备模型库中载入之前预设好的.prefab模型;机房模型和第一个载入的设备模型将会按照之前设定好的位置摆放到三维场景中,之后循环载入的设备模型将根据Unity中transform.position = new Vector3((float)(33.0-2.0*i),1.7f,3.8f)方法,重新自动设定相应的位置。2-3. According to the computer room name, device name, single board name and the number of network elements read from the file, call the Resources.Load(Name) method in Unity through the C# program, and use the computer room model library and The previously preset .prefab model is loaded in the equipment model library; the equipment room model and the first loaded equipment model will be placed in the 3D scene according to the previously set position, and the equipment model that is loaded cyclically will be According to the transform.position = new Vector3((float)(33.0-2.0*i),1.7f,3.8f) method in Unity, the corresponding position is reset automatically.
步骤3、如图3所示,在三维场景仿真模块中新建监听线程,订阅实时数据库的消息频道,获取通信设备仿真模块中仿真设备运行状态的实时消息。Step 3, as shown in Figure 3, create a new monitoring thread in the 3D scene simulation module, subscribe to the message channel of the real-time database, and obtain the real-time news of the operation status of the simulation equipment in the communication equipment simulation module.
3-1、三维场景仿真模块与通信设备仿真模块,通过Redis数据库的“订阅/发布”机制进行消息和数据的传输,三维场景仿真模块根据所订阅的消息频道,监听接收通信设备仿真模块发送来的消息,并根据消息中的内容,实时更新设备模型的指示灯的状态。3-1. The 3D scene simulation module and the communication device simulation module transmit messages and data through the "subscribe/publish" mechanism of the Redis database. The 3D scene simulation module monitors and receives messages sent by the communication device simulation module according to the subscribed message channel. , and update the status of the indicator light of the device model in real time according to the content in the message.
3-2、三维场景仿真模块接收来自通信设备仿真模块的消息并进行解析,此消息的协议格式为:“状态标志_故障类型_网元设备ID_设备槽位ID”。3-2. The 3D scene simulation module receives and analyzes the message from the communication device simulation module. The protocol format of the message is: "status flag_fault type_network element device ID_device slot ID".
当三维场景仿真模块接收到消息后,对消息进行解析:根据“_”将消息进行分割,首先判断状态标志位,如果为0,则属于正常状态,此时根据正常状态的指示灯显示规则刷新三维设备模型的指示灯状态;如果标志位为1,则属于异常状态,此时继续判断故障类型,包括:断纤、光纤劣化、单板离线、单板损坏等;确定故障类型后,判断故障点:网元设备ID和设备槽位ID,此后根据设备故障状态时指示灯的显示规则,更改对应故障点模型的指示灯为告警状态。When the 3D scene simulation module receives the message, it parses the message: divide the message according to "_", first judge the status flag bit, if it is 0, it belongs to the normal state, at this time, refresh according to the indicator light display rules of the normal state The status of the indicator light of the 3D equipment model; if the flag is 1, it is in an abnormal state. At this time, continue to judge the fault type, including: fiber break, fiber degradation, single board offline, single board damage, etc.; after determining the fault type, judge the fault Point: NE device ID and device slot ID. Afterwards, according to the display rules of the indicator light when the device is in a fault state, change the indicator light corresponding to the fault point model to the alarm state.
监听线程接收消息示例如下:An example of a listening thread receiving a message is as follows:
“1_断纤_2_8”;"1_broken fiber_2_8";
“1”表示此时为故障状态,故障类型为“断纤”,故障点为网元2对应设备的第8槽位单板所接的光纤。"1" indicates a fault state at this time, the fault type is "broken fiber", and the fault point is the optical fiber connected to the board in slot 8 of the equipment corresponding to NE 2.
步骤4、在三维场景中操作设备或修复设备故障,并将操作信息发送给通信设备仿真模块,进行仿真计算和判断。Step 4. Operate the equipment or repair equipment faults in the 3D scene, and send the operation information to the communication equipment simulation module for simulation calculation and judgment.
4-1、在三维场景中根据告警指示,在相应故障点查找引发告警的故障设备,并根据故障类型进行相应的修复操作,包括:更换光纤,更换单板等;4-1. In the 3D scene, according to the alarm indication, find the faulty device that caused the alarm at the corresponding fault point, and perform corresponding repair operations according to the fault type, including: replacing optical fibers, replacing single boards, etc.;
故障修复操作步骤为:键盘控制Unity场景中的主摄像机模型移动到故障点设备所处的位置,鼠标选中所要修复的设备模型,单击鼠标右键,在弹出的菜单中选择操作项,如“更换设备”,然后在弹出的设备选取界面中,选择相应型号的设备,点击更换按钮,完成更换设备的操作。The fault repair operation steps are: the keyboard controls the main camera model in the Unity scene to move to the location of the faulty device, select the device model to be repaired with the mouse, click the right mouse button, and select an operation item in the pop-up menu, such as "Replace Device", and then in the pop-up device selection interface, select the device of the corresponding model, and click the Replace button to complete the operation of replacing the device.
4-2、完成修复操作后,三维场景仿真模块向通信设备仿真模块发送操作消息,包括修复设备的ID和操作的类型。其消息格式为:“操作类型_网元设备ID_设备槽位ID”。4-2. After the repair operation is completed, the 3D scene simulation module sends an operation message to the communication device simulation module, including the ID of the repair device and the type of operation. The message format is: "operation type_NE device ID_device slot ID".
如下所示:As follows:
“更换光纤_2_8”;"Replace Fiber_2_8";
此消息表示,更换了网元2设备第8槽位单板所接的光纤。This message indicates that the optical fiber connected to the board in slot 8 of NE 2 has been replaced.
4-3、三维场景仿真模块中的监听线程,接收通信设备仿真模块发送来的仿真计算结果:4-3. The monitoring thread in the 3D scene simulation module receives the simulation calculation results sent by the communication device simulation module:
如果之前修复操作无误,则三维场景仿真模块中的监听线程会接收到正常状态的消息,从而更新三维场景中相应设备的指示灯恢复到正常状态;如果之前的故障修复操作有误,则三维场景仿真模块中的监听线程仍将接收到异常状态的消息,三维场景中相应设备的指示灯仍然显示异常状态,此时,可继续执行步骤4,进行故障的检查和修复并发送操作消息,如此训循环执行。If the previous repair operation is correct, the monitoring thread in the 3D scene simulation module will receive a message of normal status, thereby updating the indicator light of the corresponding device in the 3D scene to return to the normal state; if the previous fault repair operation is wrong, the 3D scene The monitoring thread in the simulation module will still receive the abnormal state message, and the indicator light of the corresponding device in the 3D scene will still display the abnormal state. At this time, you can continue to perform step 4 to check and repair the fault and send the operation message. Loop execution.
进一步的,所述自定义配置文件中分层次定义指的是第一层定义机房类型的名称和网元的个数;其第二层定义不同网元的网元编号、设备类型名称;其第三层定义设备每个槽位编号及对应的单板类型名称。Further, the hierarchical definition in the self-defining configuration file refers to that the first layer defines the name of the type of computer room and the number of network elements; its second layer defines the network element numbers and device type names of different network elements; its second layer defines The third layer defines the number of each slot of the device and the name of the corresponding board type.
进一步的,所述步骤3中获取生成三维场景仿真模块所需的外部实时数据包括:设备单板指示灯状态、设备当前告警状态、设备光模块和光纤当前的光功率值。Further, the external real-time data required to generate the 3D scene simulation module obtained in step 3 includes: the status of the indicator light of the device single board, the current alarm status of the device, the current optical power value of the device optical module and optical fiber.
进一步的,所述三维场景仿真模块包括场景显示模块和场景操作模块;所述场景显示模块的数据输入端接外部的三维仿真模型库和场景配置文件库,所述场景操作模块的控制输出端接入场景显示模块的指令输入端,所述场景操作模块经Further, the three-dimensional scene simulation module includes a scene display module and a scene operation module; the data input terminal of the scene display module is connected to an external three-dimensional simulation model library and a scene configuration file library, and the control output terminal of the scene operation module is connected to into the instruction input terminal of the scene display module, and the scene operation module is
数据通信模块与外部的设备仿真程序相通信。所述三维场景仿真模块是真实通信机房的虚拟化可视化仿真场景,培训人员可在该场景中完成巡视和操作设备等功能。The data communication module communicates with an external device emulation program. The three-dimensional scene simulation module is a virtualized and visualized simulation scene of a real communication room, in which trainers can complete functions such as patrolling and operating equipment.
外部的所述三维仿真模型库包括通信机房模型库和通信设备模型库;所述通信机房模型库包括省级调度中心通信机房三维模型、地市级调度中心通信机房三维模型、110KV/220KV/500KV等各级厂站通信机房三维模型;所述通信设备模型库包括通信传输设备机框及单板三维模型、路由交换设备三维模型、通信电源设备三维模型、通信终端设备模型、配线架三维模型、通信纤缆三维模型以及仪器仪表三维模型。这些模型库中的模型以模型文件的形式存放在仿真系统资源文件库中。The external 3D simulation model library includes a communication room model library and a communication equipment model library; the communication room model library includes a 3D model of a communication room in a provincial dispatching center, a 3D model of a communication room in a municipal dispatching center, 110KV/220KV/500KV The three-dimensional models of communication equipment rooms of factories and stations at all levels; the communication equipment model library includes three-dimensional models of communication transmission equipment frames and single boards, three-dimensional models of routing and switching equipment, three-dimensional models of communication power supply equipment, communication terminal equipment models, and three-dimensional models of distribution frames , 3D model of communication fiber and cable and 3D model of instrumentation. The models in these model libraries are stored in the simulation system resource file library in the form of model files.
所述场景配置文件库由自定义配置文件组成,该配置文件因通信仿真培训案例的不同而不同,这些自定义配置文件存放在仿真系统配置文件库中。The scene configuration file library is composed of custom configuration files, which are different for different communication simulation training cases, and these custom configuration files are stored in the simulation system configuration file library.
所述数据通信模块由实时数据库和消息接收发送程序组成,该模块为三维场景仿真模块和外部设备仿真程序之间的数据通信提供了接口,是三维场景仿真模块能够实时获取外部仿真设备的运行状态,并据此设置和修改三维场景仿真模块中各个三维模型的状态,与此同时,三维场景仿真模块中的场景操作模块所做的操作信息也通过所述数据通信模块发送给外部的设备仿真程序。The data communication module is composed of a real-time database and a message receiving and sending program. This module provides an interface for the data communication between the three-dimensional scene simulation module and the external device simulation program, so that the three-dimensional scene simulation module can obtain the operating status of the external simulation device in real time. , and accordingly set and modify the state of each 3D model in the 3D scene simulation module, at the same time, the operation information made by the scene operation module in the 3D scene simulation module is also sent to the external device simulation program through the data communication module .
进一步的,所述场景显示模块根据实际通信仿真培训案例的需求,从所述场景配置文件库中动态读取并解析指定的自定义配置文件,根据解析后的数据,从所述三维仿真模型库中调取相关三维模型文件,从而显示出真实通信机房的虚拟化可视化仿真场景。Further, the scene display module dynamically reads and parses the specified custom configuration file from the scene configuration file library according to the requirements of the actual communication simulation training case, and according to the parsed data, from the 3D simulation model library Relevant 3D model files are retrieved from the computer to display the virtualized and visualized simulation scene of the real communication room.
进一步的,所述场景操作模块用于实现对三维场景仿真模块中的设备模型的操作功能。Further, the scene operation module is used to realize the operation function of the equipment model in the three-dimensional scene simulation module.
进一步的,所述通信机房的规格包括省级调度中心通信机房、地市级调度中心通信机房和110KV/220KV/500KV各级厂站通信机房;所述通信设备的型号包括华为OSN1500、华为OSN2500、华为OSN3500和华为OSN7500系列。Further, the specifications of the communication room include the communication room of the provincial dispatching center, the communication room of the prefecture-level dispatching center, and the communication room of 110KV/220KV/500KV plant stations at all levels; the models of the communication equipment include Huawei OSN1500, Huawei OSN2500, Huawei OSN3500 and Huawei OSN7500 series.
以上所述实施方式仅为本发明的优选实施例,而并非本发明可行实施的穷举。对于本领域一般技术人员而言,在不背离本发明原理和精神的前提下对其所作出的任何显而易见的改动,都应当被认为包含在本发明的权利要求保护范围之内。The implementation manners described above are only preferred embodiments of the present invention, rather than an exhaustive list of feasible implementations of the present invention. For those skilled in the art, any obvious changes made without departing from the principle and spirit of the present invention should be considered to be included in the protection scope of the claims of the present invention.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510376363.XA CN105006017B (en) | 2015-07-01 | 2015-07-01 | Three-dimensional scenic emulation mode is generated based on Unity dynamic techniques |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510376363.XA CN105006017B (en) | 2015-07-01 | 2015-07-01 | Three-dimensional scenic emulation mode is generated based on Unity dynamic techniques |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105006017A CN105006017A (en) | 2015-10-28 |
CN105006017B true CN105006017B (en) | 2018-07-24 |
Family
ID=54378673
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510376363.XA Active CN105006017B (en) | 2015-07-01 | 2015-07-01 | Three-dimensional scenic emulation mode is generated based on Unity dynamic techniques |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105006017B (en) |
Families Citing this family (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777417A (en) * | 2015-11-20 | 2017-05-31 | 北京华大九天软件有限公司 | A kind of quick method that simulated environment is set |
CN105825024B (en) * | 2016-03-03 | 2019-03-01 | 武汉科技大学 | A method of realizing coke-oven plant's blasting condensation workshop section cooperating type three-dimensional artificial |
CN106095840A (en) * | 2016-06-04 | 2016-11-09 | 山东天元信息技术股份有限公司 | Pipe network and facility information three-dimensional display method in a kind of multi-purpose station three-dimensional station |
CN106844742A (en) * | 2017-02-14 | 2017-06-13 | 郑州云海信息技术有限公司 | A kind of geographical visualized management method of 3D virtual computer rooms and system |
CN107292955A (en) * | 2017-07-06 | 2017-10-24 | 李长云 | The methods of exhibiting and system of a kind of industrial equipment operation health status |
CN107610214A (en) * | 2017-08-09 | 2018-01-19 | 南通汇聚软件科技有限公司 | A kind of inn monitoring system based on virtual reality technology |
CN107544287B (en) * | 2017-08-31 | 2019-03-29 | 北京科东电力控制系统有限责任公司 | Intelligent substation GOOSE based on SCD file nets SV net visual simulating method |
CN107679281A (en) * | 2017-09-05 | 2018-02-09 | 国家电网公司 | Intelligent station three-dimensional scenic analogue system and implementation method based on Unity dynamic generations |
CN107744181A (en) * | 2017-10-17 | 2018-03-02 | 晋江市嘉利服装织造有限公司 | One kind gathers multi-functional underwear and its application method |
CN108734775A (en) * | 2018-05-22 | 2018-11-02 | 中国地质大学(武汉) | A kind of the road asset automation fast modeling method and system of low cost |
CN109165267A (en) * | 2018-09-13 | 2019-01-08 | 国网技术学院 | A kind of power communication transmission fault investigation operation experience system and method |
CN110120165A (en) * | 2019-04-11 | 2019-08-13 | 成都盛特石油装备模拟技术股份有限公司 | Drilling well emergency drilling simulation system |
CN110364047A (en) * | 2019-07-03 | 2019-10-22 | 死海旅游度假有限公司 | Virtual teaching system based on acousto-optic power technology |
CN110515812A (en) * | 2019-08-13 | 2019-11-29 | 昆山达骐亚网络科技有限公司 | Dummy emulation system construction method based on Unity+3D technology |
CN110855482A (en) * | 2019-11-05 | 2020-02-28 | 智趣通信(深圳)有限公司 | Three-dimensional dynamic communication network analog simulation method, system and storage medium |
CN111917852A (en) * | 2020-07-23 | 2020-11-10 | 上海珀立信息科技有限公司 | Multi-person network synchronization system based on Unity and development method |
CN112866417A (en) * | 2021-02-26 | 2021-05-28 | 广东电网有限责任公司 | Machine room patrol inspection information pushing system and pushing method |
CN113867773A (en) * | 2021-08-18 | 2021-12-31 | 华建数创(上海)科技有限公司 | Real-time updating mechanism of building model data for illusion engine |
CN116091653A (en) * | 2023-01-13 | 2023-05-09 | 广州慧云网络科技有限公司 | Configuration diagram generation method and device of operation and maintenance equipment, terminal equipment and storage medium |
CN116579142A (en) * | 2023-04-25 | 2023-08-11 | 南京高清艺术有限公司 | Simulation system for dynamically generating three-dimensional scene based on Unity and implementation method thereof |
CN119583358A (en) * | 2024-10-30 | 2025-03-07 | 北京龙鼎天诚科技有限公司 | A method and system for constructing a basic communication transmission network comprehensive management simulation model |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103246817A (en) * | 2013-05-15 | 2013-08-14 | 国家电网公司 | Electric energy meter automatic verification scheduling policy testing method based on Unity 3D |
CN103632581A (en) * | 2013-12-17 | 2014-03-12 | 国家电网公司 | Debugging, operation and maintenance simulation method of electric energy collection terminals |
US8972916B1 (en) * | 2013-12-05 | 2015-03-03 | Taiwan Semiconductor Manufacturing Co., Ltd. | Method and system for checking the inter-chip connectivity of a three-dimensional integrated circuit |
CN104599319A (en) * | 2014-12-26 | 2015-05-06 | 福建工程学院 | Real-time generation method of 3D scene |
CN105045970A (en) * | 2015-07-01 | 2015-11-11 | 国家电网公司 | Simulation system for dynamically generating three-dimensional scene on the basis of Unity, and implementation method thereof |
-
2015
- 2015-07-01 CN CN201510376363.XA patent/CN105006017B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103246817A (en) * | 2013-05-15 | 2013-08-14 | 国家电网公司 | Electric energy meter automatic verification scheduling policy testing method based on Unity 3D |
US8972916B1 (en) * | 2013-12-05 | 2015-03-03 | Taiwan Semiconductor Manufacturing Co., Ltd. | Method and system for checking the inter-chip connectivity of a three-dimensional integrated circuit |
CN103632581A (en) * | 2013-12-17 | 2014-03-12 | 国家电网公司 | Debugging, operation and maintenance simulation method of electric energy collection terminals |
CN104599319A (en) * | 2014-12-26 | 2015-05-06 | 福建工程学院 | Real-time generation method of 3D scene |
CN105045970A (en) * | 2015-07-01 | 2015-11-11 | 国家电网公司 | Simulation system for dynamically generating three-dimensional scene on the basis of Unity, and implementation method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN105006017A (en) | 2015-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105006017B (en) | Three-dimensional scenic emulation mode is generated based on Unity dynamic techniques | |
CN105045970B (en) | Simulation system for dynamically generating 3D scene based on Unity and its realization method | |
CN107679281A (en) | Intelligent station three-dimensional scenic analogue system and implementation method based on Unity dynamic generations | |
CN105005658B (en) | Transformer station's integrated system apparatus logic emulation mode | |
CN102437655B (en) | Analogue display method and system of virtual terminals of intelligent substation | |
CN103176084B (en) | Intelligent substation simulation system in panoramic replace mode and integration testing method for intelligent substation simulation system | |
CN104537908B (en) | Multi-stage scheduling integrated simulation system based on model sharing and method | |
CN107918340A (en) | A kind of power distribution automation adjustment method on the spot based on simulation main website | |
CN106775746A (en) | A kind of intelligent substation three-dimensional artificial training soft ware system and its platform building method | |
CN102760059B (en) | Automatic generating method for standardized test scripts of relay protection device of electrical system | |
CN108022039A (en) | A kind of Substation Training Simulator based on augmented reality | |
CN103150426A (en) | Unified modeling method for regulation and control integrated simulation of primary grid equipment and secondary grid equipment | |
CN106681313A (en) | Function testing method of dynamic stability control system and dynamic stability control system | |
CN104636490A (en) | Graphical comparing method for SCD (substation configuration description) files of intelligent substation | |
CN103353857B (en) | The communication test method of a kind of transformer station comprehensive monitoring unit | |
CN110535236A (en) | Intelligent substation bay level simulation self-acceptance system and method | |
CN105260817A (en) | Power grid topological structure based on power grid resource models, and analyzing method | |
CN106204326B (en) | A detection method for power distribution terminal IED equipment used in power distribution system | |
CN113658492A (en) | Cable line operation and inspection training method and system with relay protection equipment | |
CN107546738A (en) | Transformer station secondary system analogue system and method based on SCD file | |
CN205068102U (en) | Pumped storage unit operational process and error detection training system | |
CN116305714A (en) | Modeling method for typical scene of intelligent substation in power industrial control safety simulation environment | |
CN107861401A (en) | Electromechanical semi-matter simulating system | |
CN114692420A (en) | Design method, analysis method and system of transformer substation secondary circuit one-graph model | |
CN107039968B (en) | A hybrid simulation system of distributed distribution network automation based on RTDS |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |