CN1409217A - Development method for based on object-oriented distributive interactive stimulation application program based on faced objective - Google Patents

Development method for based on object-oriented distributive interactive stimulation application program based on faced objective Download PDF

Info

Publication number
CN1409217A
CN1409217A CN 02130735 CN02130735A CN1409217A CN 1409217 A CN1409217 A CN 1409217A CN 02130735 CN02130735 CN 02130735 CN 02130735 A CN02130735 A CN 02130735A CN 1409217 A CN1409217 A CN 1409217A
Authority
CN
China
Prior art keywords
entity
protocol data
application program
data unit
interactive simulation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 02130735
Other languages
Chinese (zh)
Other versions
CN1212568C (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
Beijing University of Aeronautics and Astronautics
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 CN 02130735 priority Critical patent/CN1212568C/en
Publication of CN1409217A publication Critical patent/CN1409217A/en
Application granted granted Critical
Publication of CN1212568C publication Critical patent/CN1212568C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention relates to a developing method for interactive emulsion application program of distributed virtual reality based on the facing object, and includes packaging all the protocol digital units with the method of facing object to provide the processing method based on the object for distributed emulation application program for realizing the communication function of distributed interactive emulation with no relationship to computer system platform, and providing the interactive data communication service by taking the protocol data unit object for the application program with the back-adjustment function form, managing the state information for all the entities automatically, and designing and realizing the step of frame structure to be easily used by the application program developer.

Description

Development approach based on OO distributed interactive simulation application program
Technical field
The invention belongs to computer virtual reality and computer graphics techniques field, particularly relate to a kind of development approach based on the mutual side's emulation application of OO distributed virtual reality.
Background technology
The distributed interactive simulation application program is a kind of Distributed Virtual Reality System, and it can make many independently emulators interconnect by computer network and carry out mutual in the environment that a computing machine generates.This environment is a virtual environment of simulating the objective world, allows a plurality of users of different regions to join work compound in the same environment.Because the state of various artificial physicals such as tank or aircraft etc. constantly changes, so the emulation application of each node must other emulation application on network notify these to change, all participate in the state that emulator in the operation can correctly demonstrate each artificial physical like this.
Nineteen eighty-three, senior project Plan Bureau of U.S. Department of Defense and AUS have been formulated a Cooperative Research Program artificial network jointly, have formed first distributed virtual battlefield surroundings in the world, are used to carry out the training of complicated battlefield task.The U.S. has developed DIS (distributed interactive simulation agreement) on the basis of this artificial network, and becomes the standard " IEEE 1278 " of IEEE.The core of this agreement is PDU (protocol Data Unit) and DR (the static algorithm of calculating).Protocol Data Unit is the standard message format of its definition, is used for describing the state of certain artificial physical or the generation of certain types of events etc.Each main frame is undertaken alternately by receiving and send the variety of protocol data cell, and by the processing of take over party's decision to other entity and incident.The static algorithm of calculating is to estimate the position that entity is current and the method for direction according to certain kinematical equation according to the previous status information of entity.Using static predication method is in order to limit the transmission frequency of entity state protocol Data Unit, to reduce offered load.
The distributed interactive simulation application system relates to many-sided technology such as graphic presentation, network communication, simulation process, man-machine interaction, and is in large scale, complex structure, so the exploitation of this type systematic is quite difficult.In China, the research start-up time of distributed interactive simulation has only about short 5 years in addition, but application requirements is but relatively more urgent.Therefore, how to develop the distributed interactive simulation application system fast and become a urgent problem.
Summary of the invention
The objective of the invention is to overcome above-mentioned deficiency, provide a kind of, can construct the distributed interactive simulation system easily and quickly based on OO distributed interactive simulation procedure development method.
For finishing goal of the invention, the technical scheme that the present invention takes is: based on the distributed interactive simulation procedure development method of Object-oriented Technique, comprise with OO method and encapsulate all protocol Data Units, for the distributed simulation application program provides object-based disposal route, realize and the irrelevant distributed interactive simulation communication function of computer system platform, and to provide with the protocol Data Unit object to application program with the form of call back function be the Communications service of interaction data, realize entity management, for the status information that application program is managed all entities that comprise local entity and remote entity automatically, design and Implement the framed structure that an application developer is simple and easy to usefulness.
Protocol Data Unit also comprises the User Defined protocol Data Unit, the User Defined protocol Data Unit is the subclass of basic agreement data sheet metaclass, with the User Defined protocol Data Unit is base class, and the user can oneself define variety of protocol data cell form easily; Communication further comprises setting up unifies network interface, unifies the network data form, data is reasonably sent to the step of application program with the data transfer mechanism of call back function; Communication further comprises the protocol Data Unit object class is encapsulated in a step in the independent object to the mutual translation function of network data; Entity management partly comprises entity state warehouse, local entity management and remote entity management; Entity management adopts static reckoning algorithm to come the computational entity current state, the time period that is carved into current time when status data when upgrading with last state and last state Data Update is a prerequisite, calculate algorithm according to given static state, select for use corresponding formula to calculate current entity state; The remote entity management further comprises when receiving the entity state protocol Data Unit, check earlier whether corresponding entity exists, if just do not create a new remote entity, and add in the remote entity tabulation, if existed and just checked a termination protocol Data Unit that sends when whether entity withdraws from, if just delete this entity, otherwise upgrade the step of the entity state depot data of this entity.
On computer technology, the present invention has following advantage: 1, Object Oriented method.This Programming Methodology relatively is fit to the exploitation of distributed interactive simulation application program, and the program of C++ code compiling has very high operational efficiency.2, irrelevant with system platform.Both made things convenient for writing of application program, and made application program have good portability again.3, call back function mechanism easily.Not only make the structure of application program more clear, and the protocol Data Unit of same type allow the method for a plurality of call back functions that application program is with good expansibility.4, good framework structure.For the distributed simulation application program provides a rational framed structure, the user can carry out the exploitation of distributed simulation application program with comparalive ease.Use the present invention write application program can have structure succinct, write flexibly, characteristics such as favorable expandability, transplanting convenience, code efficiency height, so the present invention becomes a good tool of developing the distributed interactive simulation application program fast.
Description of drawings
Fig. 1 is the protocol Data Unit communication flow figure of the development approach manoeuvre embodiment of distributed interactive simulation application program;
Fig. 2 is the local entity management process flow diagram of the development approach manoeuvre embodiment of distributed interactive simulation application program;
Fig. 3 is the remote entity management flow chart of the development approach manoeuvre embodiment of distributed interactive simulation application program.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
Embodiments of the invention are development approaches of the distributed interactive simulation application program of military exercises, and first step is to adopt OO method to encapsulate all protocol Data Units.
At first, define a basic agreement data sheet metaclass, it only comprises protocol data unit head portion information in the distributed interactive simulation standard: protocol version, manoeuvre numbering, agreement family numbering, timestamp, length etc.This also is the common information of all protocol Data Units.
Be base class definition variety of protocol data cell object class with basic agreement data sheet metaclass then, these objects comprise the entity state protocol Data Unit, the collision protocol Data Unit, the protocol Data Unit of opening fire, the blast protocol Data Unit, the services request protocol Data Unit, the supply protocol Data Unit is provided, receive and supply with protocol Data Unit, protocol Data Unit completes repairs, protocol Data Unit is supplied with in cancellation, protocol Data Unit is repaired in response, the data protocol data cell, the data query protocol Data Unit, the data protocol data cell is set, create the entity protocol Data Unit, withdraw the entity protocol Data Unit, Electromagnetic Launching protocol Data Unit etc.These protocol Data Unit objects all have friendly succinct data access interface, can visit easily.
Above protocol Data Unit object is all within distributed interactive simulation protocol definition scope, but the distributed interactive simulation standard can not contain the mutual requirement of covering all distributed interactive simulations.During reality exploitation distributed interactive simulation application system, may wish that according to specific requirement data layout uses the data content that oneself defines in reciprocal process.In order to address this is that, the present invention has defined a kind of particular protocol book specially according to the unit---the User Defined protocol Data Unit.The User Defined protocol Data Unit also is the subclass of basic agreement data sheet metaclass.With the User Defined protocol Data Unit is base class, and the user can oneself define variety of protocol data cell form easily, can also keep other use-pattern constant simultaneously.
Second step of the present invention is to realize and the irrelevant distributed interactive simulation communication function of computer system platform, and to provide with the protocol Data Unit object to application program with the form of call back function be the Communications service of interaction data.
This step is divided into three sub-steps again: set up the unified network interface of manoeuvre, the data transfer mechanism of unified network data form and call back function.
It at first is the network interface of setting up manoeuvre.All data of IEEE 1278 standard codes are at the communication modes that network uses User Datagram Protoco (UDP) to broadcast, and the system that only possesses identical manoeuvre numbering simultaneously just can carry out alternately.So the present invention sets up a standard architecture according to the User Datagram Protoco (UDP) port of user's appointment, this framework is responsible for receiving and the identical data of local manoeuvre numbering, fills in local manoeuvre numbering when sending data simultaneously.The present invention also adopt OO method with this function package at an object---in the distributed interactive simulation manoeuvre interface object.
Next is unified network data form.Different inside computer systems is inconsistent to the storage format of data, and is opposite fully with mainframe computer such as the storage order of 32 integers on PC.Therefore, the distributed interactive simulation application program that operates on the different system platform need be correct mutual, the order " form " that just must have all systems to understand.Then all data that are transferred in the network are all converted to this form, problem just can be readily solved.Therefore the present invention has defined a kind of unified network data form to all protocol Data Units, and has finished by the mutual translation function of this network data to the protocol Data Unit object class.The present invention is encapsulated in an independent object with the protocol Data Unit object class to the mutual translation function of network data---in the protocol Data Unit factory.
Last step of Communications service is reasonably to send data to application program.Application programs, sending data is a kind of active behaviors, control easily, but receiving data but is a kind of passive behavior, is not easy control.So, how to pass to application program and handle when receiving data, be a key factor of decision distribution interactive simulation system operational efficiency and structure complexity.The present invention has adopted call back function mechanism to come to the application passes data.
This mechanism is such, earlier call back function manager of structure.Corresponding function can be added, delete, search to this call back function manager object according to the protocol Data Unit object type, and these functions can be the disposal routes of the protocol Data Unit object that defines of Application developer.Therefore, for the variety of protocol data cell that receives, as long as application program defines corresponding disposal route, and they are added in the call back function manager as the protocol Data Unit call back function, the present invention just can directly adjust back corresponding protocol data cell call back function according to the protocol Data Unit type and handle these data when distributed interactive simulation manoeuvre interface object receives data.Such result equals application program and has handled these data.Because the call back function manager can add the deletion call back function easily, a kind of type protocol data cell can corresponding a plurality of call back functions simultaneously, so application program becomes very convenient aspect function expansibility.Generally speaking, this mechanism not only makes application program very timely to the response that receives data, and increases the extendability of application program.
A protocol Data Unit communication flow figure of Fig. 1 embodiments of the invention.Application A will send a PDU P, converts earlier the protocol Data Unit of network format to by protocol Data Unit of the present invention factory, uses distributed interactive simulation manoeuvre interface to send in the physical network then.Other application program such as the B of same manoeuvre, its distributed interactive simulation manoeuvre interface can receive this protocol Data Unit, generate the protocol Data Unit object by protocol Data Unit factory then, call corresponding call back function then and handle this protocol Data Unit to reach purpose to the application passes data.
The 3rd step of the present invention is to realize entity management.Consult Fig. 2, Fig. 2 is local entity management process flow diagram.Entity is divided into two kinds in distributed interactive simulation: by the local entity of local application control and the remote entity of being controlled by other application program.In order to reach the consistance of distributional environment, other application program in the local entity state variation unified manoeuvre of notice in time will be come all remote entity states of real-time servicing according to the entity state protocol Data Unit of other application program transmission simultaneously.Entity management of the present invention partly comprises parts such as entity state warehouse, local entity management and remote entity management.
The entity state warehouse is the module indicated object of entity in computer system.Application system can use this entity state warehouse to come entity of emulation according to simulation scenarios.
Analogue system generally all is certain special entity object such as tank, aircraft etc. of simulation.These entities are controlled by local system, and the emulation mode in its computing machine needs oneself to safeguard and other application system issue in distributional environment in time.The present invention uses local entity management class to finish these functions, wherein uses an entity state warehouse to manage the model state of this entity.
In order to reduce offered load, distribution interactive simulation system will adopt static reckoning algorithm to come the computational entity current state in addition, and the present invention adopts an independently static device class of calculating to finish this function.Static calculate that the basic thought of device class is such: the time period that status data when upgrading with last state and last state data are carved into current time more the time is a prerequisite, according to given DR algorithm, select for use corresponding computing formula to calculate current entity state.
So local entity management is not only wanted the data in the own entity state of the real-time update warehouse, also to use a static device class of calculating to calculate the error of emulation mode and virtual condition, when error surpassed a threshold values, just the prerequisite application system was issued the current state of oneself in distributional environment.So just needn't send data too frequently, reduce communication load in the network, and can guarantee certain simulation accuracy.The management of remote entity is corresponding with the management of local entity.Each remote entity administrative class also all has an entity state warehouse and the static device of calculating, behind the entity state protocol Data Unit that the application program that receives this entity of control sends over, upgrades the data in the entity state warehouse.Just use the static device of calculating to calculate the current state of this entity when not having.
Consult Fig. 3, Fig. 3 is the remote entity management flow chart, owing to remote entity generally all can have a lot, so use a dynamic remote entity list to manage all remote entities.When receiving the entity state protocol Data Unit, check earlier whether corresponding entity has existed in the remote entity tabulation of the present invention, if do not have just to need to create a new remote entity, and add in the remote entity tabulation; Just check a termination protocol Data Unit that sends when whether entity withdraws from if existed,, otherwise upgrade the entity state depot data of this entity if just delete this entity.Application program can be calculated impression true to nature to the operator according to the data in entity state warehouse.
The 4th step of the present invention is to design and Implement a rational framed structure:
On the basis of using above three parts of the present invention, the main simulation cycles flow process of a distributed interactive simulation application system is: 1, receive the input of emulation controller such as keyboard, mouse, sensor etc., according to the current entity state of emulation behavior equation calculating of concrete artificial physical; 2, the entity state depot data in the local entity management of renewal; 3, use the static device error of calculation of calculating, when error surpasses certain value, sending entity status protocol data cell; 4, the PDU in the reception network upgrades the respective remote entity state according to them; 5, use the static device of calculating to calculate the status data of all remote entities; 6, by graphics system display environment and all entities; 7, get back to 1, circulation.
Use framework of the present invention, the Application developer only need concentrate one's energy to solve the problem of demonstrations true to nature such as emulation behavior and three-dimensional picture, just can realize a distributed interactive simulation application system.
As can be seen, the present invention provides a framed structure for the distributed emulation application program from above process, and has solved the key issue of distributed interactive.Distributed interactive simulation application system development people's groundwork is concrete emulation behaviors such as the Data Receiving of processes sensor and processing, collision detection, what comes into a driver's processing.The present invention is especially favourable for many existing emulators of having finished these emulation behaviors, participates in working in coordination with or maneuvers by network because they use the present invention just can become a distributed emulation application program by a spot of improvement.

Claims (7)

1, a kind of based on OO distributed interactive simulation procedure development method, it is characterized in that: this method may further comprise the steps:
(1) encapsulates all protocol Data Units with OO method, for the distributed simulation application program provides object-based disposal route;
(2) realize and the irrelevant distributed interactive simulation communication function of computer system platform, and to provide with the protocol Data Unit object to application program with the form of call back function be the Communications service of interaction data;
(3) realize entity management, manage the status information of all entities that comprise local entity and remote entity for application program automatically.
(4) design and Implement the framed structure that an application developer is simple and easy to usefulness.
2, said according to claim 1 based on OO distributed interactive simulation procedure development method, it is characterized in that: the said protocol Data Unit of step (1) also comprises the User Defined protocol Data Unit, the User Defined protocol Data Unit is the subclass of basic agreement data sheet metaclass, with the User Defined protocol Data Unit is base class, and the user can oneself define variety of protocol data cell form easily.
3, said based on OO distributed interactive simulation procedure development method according to claim 1, it is characterized in that: step (2) further comprises:
(1) sets up unified network interface;
(2) unify the network data form;
(3) the data transfer mechanism with call back function reasonably sends data to application program.
4, said based on OO distributed interactive simulation procedure development method according to claim 3, it is characterized in that: step (2) further comprises the mutual translation function of protocol Data Unit object class to network data is encapsulated in the independent object.
5, said based on OO distributed interactive simulation procedure development method according to claim 1, it is characterized in that: said entity management partly comprises entity state warehouse, local entity management and remote entity management.
6, said according to claim 1 based on OO distributed interactive simulation procedure development method, it is characterized in that: the said entity management of step (3) adopts static reckoning algorithm to come the computational entity current state, the time period that is carved into current time when status data when upgrading with last state and last state Data Update is a prerequisite, calculate algorithm according to given static state, select for use corresponding formula to calculate current entity state.
7, said based on OO distributed interactive simulation procedure development method according to claim 1, it is characterized in that: the said remote entity management of step (3) further comprises:
(1) when receiving the entity state protocol Data Unit, check earlier whether corresponding entity exists, if just do not create a new remote entity, and add in the remote entity tabulation;
(2),, otherwise upgrade the entity state depot data of this entity if just delete this entity if existed and just check a termination protocol Data Unit that sends when whether entity withdraws from.
CN 02130735 2002-09-18 2002-09-18 Development method for based on object-oriented distributive interactive stimulation application program based on faced objective Expired - Fee Related CN1212568C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02130735 CN1212568C (en) 2002-09-18 2002-09-18 Development method for based on object-oriented distributive interactive stimulation application program based on faced objective

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02130735 CN1212568C (en) 2002-09-18 2002-09-18 Development method for based on object-oriented distributive interactive stimulation application program based on faced objective

Publications (2)

Publication Number Publication Date
CN1409217A true CN1409217A (en) 2003-04-09
CN1212568C CN1212568C (en) 2005-07-27

Family

ID=4746449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02130735 Expired - Fee Related CN1212568C (en) 2002-09-18 2002-09-18 Development method for based on object-oriented distributive interactive stimulation application program based on faced objective

Country Status (1)

Country Link
CN (1) CN1212568C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100388205C (en) * 2005-11-23 2008-05-14 中国航天科技集团公司第一研究院 Distributed interactive simulation platform based on HLA and implementing method thereof
CN100428722C (en) * 2006-08-02 2008-10-22 华为技术有限公司 Distributed processing system and processing method for multi-generating tree protocol
CN109726026A (en) * 2018-12-29 2019-05-07 北京字节跳动网络技术有限公司 A kind of interaction data processing method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100388205C (en) * 2005-11-23 2008-05-14 中国航天科技集团公司第一研究院 Distributed interactive simulation platform based on HLA and implementing method thereof
CN100428722C (en) * 2006-08-02 2008-10-22 华为技术有限公司 Distributed processing system and processing method for multi-generating tree protocol
CN109726026A (en) * 2018-12-29 2019-05-07 北京字节跳动网络技术有限公司 A kind of interaction data processing method, device, equipment and storage medium
CN109726026B (en) * 2018-12-29 2021-03-19 北京字节跳动网络技术有限公司 Interactive data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN1212568C (en) 2005-07-27

Similar Documents

Publication Publication Date Title
Baldassari et al. PROTOB: An object oriented methodology for developing discrete event dynamic systems
Zhang et al. Design, construction, and application of a generic visual language generation environment
US20050065951A1 (en) Visualization of commonalities in data from different sources
Xu et al. A framework for model-based design of agent-oriented software
CN103593516A (en) Combat system modeling and simulation system
Han et al. Building design services in a distributed architecture
CN111460621B (en) Modularized simulation modeling method and system
CN110855482A (en) Three-dimensional dynamic communication network analog simulation method, system and storage medium
CN102609985A (en) Three-dimensional power station graphic platform
CN105138602A (en) Three-dimensional coordination platform architecture system and use method therefor
Marir et al. OSCONCAD: A model-based CAD system integrated with computer applications
van der Aalst et al. Ex Spect 6.4 An Executable Specification Tool for Hierarchical Colored Petri Nets
Gilman et al. Integration of design and manufacturing in a virtual enterprise using enterprise rules, intelligent agents, STEP, and work flow
Banerjee et al. A behavioral scene graph for rule enforcement in interactive virtual assembly sequence planning
CN1212568C (en) Development method for based on object-oriented distributive interactive stimulation application program based on faced objective
Uygun et al. Scenario based distributed manufacturing simulation using HLA technologies
CN111090430B (en) Application software development system under embedded system
US8752010B1 (en) Dynamic interface synthesizer
Design et al. MIT Architecture
Amor et al. Multi-disciplinary views for integrated and concurrent design
CN113221511A (en) Method, device and equipment for converting configuration file into XML file and storage medium
WO2001008007A9 (en) Method and system of automated generation of program code from an object oriented model
Han et al. An Internet-based distributed service architecture
Hamri et al. On using design patterns for DEVS modeling and simulation tools
Liang A web-based collaborative design architecture for developing immersive VR driving platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20050727

Termination date: 20110918