CN103699761A - Method and device for displaying general artificial social situation based on data flow mapping - Google Patents
Method and device for displaying general artificial social situation based on data flow mapping Download PDFInfo
- Publication number
- CN103699761A CN103699761A CN201410013947.6A CN201410013947A CN103699761A CN 103699761 A CN103699761 A CN 103699761A CN 201410013947 A CN201410013947 A CN 201410013947A CN 103699761 A CN103699761 A CN 103699761A
- Authority
- CN
- China
- Prior art keywords
- situation
- data
- symbol
- statistics
- bag
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a method and a device for displaying a general artificial social situation based on data flow mapping. The method comprises the steps of initializing a configuration file and configuring a situation display manner and a data display manner according to the configuration file; controlling a plurality of artificial social models to promote artificial social evolution under support of an artificial social parallel computing engine; obtaining situation data of the artificial social parallel computing engine and generating a situation data pocket, analyzing the situation data pocket to generate a situation symbol pocket and a situation statistic pocket, updating a display manner of a data map and updating statistic data on a situation display base map. The device comprises a file configuring module, a display setting module, an artificial social evolution module, a data receiving module, a data processing module, a data displaying module and a situation displaying module. The method and the device have the advantages of strong user customization capability, good universality and adaptability of situation display, high flexibility of overall situation expression and capability of better making aid decision and providing feedback support.
Description
Technical field
The present invention relates to artificial social product's emulation field, specifically a kind of general artificial social product situation display packing and device based on data stream mapping.
Background technology
Artificial social product means the virtual world that set up, corresponding with real system based on modeling and simulation, and the emulation of artificial social product need to be applied Complex System Theory and be set up the artificial social product's experiment with computing system running parallel with actual social system.On Philosophical, the marched toward understanding of " multiple society " of artificial social product, thinks that artificial social product is also a kind of reality, is that a kind of of society may alternative form.At present artificial social product or an experimental subject, the first, emphasize the viewpoint of globality, when modeling based on artificial component structure complex behavior pattern rather than mechanically natural system is split understanding system behavior.The second, utilize the method emerge in large numbers to observe, understand, analyze and understand behavior and the various influence factor thereof of complication system, thereby create conditions for " quantification " assessment and analysis of influence factor.It is more and more important, more and more effective that simulation means based on artificial social product has become solution complex social system problem, or even unique effective means.
It is the very important link in artificial social product's emulation field that situation shows.Situation shows for showing the emulation mode of simulation process, mass data represent mass data in directly perceived, vivid graphical diagrams mode in rationalization's model, in artificial social product's emulation field, play the effect of describing artificial social product's form and aid decision making, for forming FEEDBACK CONTROL, providing foundation, is the indispensable part of artificial social product's analogue system.Situation shows to have great theory and practice meaning, the first, be convenient for people to a large amount of abstract data analysis; The second, can greatly improve the processing power of people to data; The 3rd, realize guiding and control to calculating and programming process; The 4th, can assist testing model and actual matching degree.
Under prior art condition there is following feature in the emulation of artificial social field: the emulation in (1) artificial social product field and a distinguishing feature of other field emulation are because artificial physical quantity is huge, in reciprocal process, produce mass data, this has proposed a huge challenge to the transmission of data and processing, and very likely becomes the bottleneck that improves simulation performance; (2) the emulation more attention in artificial social product field is the general performance situation of artificial physical group in certain limit, as the concern to herd complex in burst security incident emulation, the overall condition of catching an illness in accident, the situation display device of this work social field of will asking for help need to be with flexibly, form represents the pressure that whole situation reduces data transmission and processing intuitively simultaneously.Current existing artificial social product situation shows that solution also has a significant deficiency: situation shows and concrete computing application binding, can not adapt to the variation of different computing application domain requirements, after changes in demand, must build new situation display device by recompile, can not reuse existing situation display device.This is mainly caused by following three reasons: the first, and situation display device is in source code level and computing application binding; The second, in situation display device, the mapping relations of Situation-symbol and situation display entity are difficult to change after determining, after situation shows changes in demand, can not initiatively adapt to; The 3rd, data receiver in situation display device part is too high with the situation display engine degree of coupling, changes always interface and carry out Adaptive change while making data variation that situation display engine is associated in computing application.In sum, current existing artificial social product situation shows that the problems referred to above of solution have produced great restriction to the application of artificial social product's emulation.
Summary of the invention
General artificial social product situation display packing and the device based on data stream mapping that the technical problem to be solved in the present invention is to provide the versatility that a kind of customization ability is strong, situation shows and adaptability degree of flexibility good, whole situation representation is high, can provide feedback to support for carrying out better aid decision making.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is:
A general artificial social product situation display packing based on data stream mapping, implementation step is as follows:
1) initial configuration file, described configuration file comprises Situation-symbol collection, customization entity class set, customization entity set, complex data type collection, data display set and packet config set, described Situation-symbol collection is comprised of multiple Situation-symbol, described Situation-symbol is that situation shows relevant symbol and picture, described customization entity class set is comprised of a plurality of customization entity class, the description that described customization entity class comprises entity class and attribute thereof, mapping relations between entity class and situation displaying symbol, described customization entity set is comprised of a plurality of customization entities, described customization entity comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol, described complex data type collection is comprised of Various Complex data type, described complex data type comprise for resolve from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form simple data type to the mapping relations the structure data of complex data type, described data display set comprises the definition of chart, whether the display type of intelligent body statistics of attributes information and situation show and need to show statistics, the definition of described chart comprises subtype and data type, described packet config set comprises the data exchange standard that obtains the opaque data stream existing with memory block form from artificial social product's parallel computation engine, assigned address from internal memory reads situation packet, assigned address from internal memory reads the data exchange standard of Situation-symbol bag and situation statistics bag,
2) according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set, complex data type collection configuration situation display mode, according to the data display set configuration data display mode of described configuration file;
3), under the support of artificial social product's parallel computation engine, drive a plurality of artificial social products model to interact and promote the evolution of artificial social product;
4) in the evolutionary process of artificial social product, from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form, according to the packet config set of described configuration file, described opaque data stream is resolved and obtained situation data, the data type of chart definition in the data display set of described configuration file is added up and obtained statistics, the situation data that parsing is obtained and statistics packing generate situation packet, finally situation packet are mapped to the assigned address in internal memory;
5) according to the packet config set of described configuration file and utilize the assigned address of memory-mapped mechanism from internal memory read situation packet and resolve, the data that parsing is obtained arrange the mapping ensemblen of preserving in module and are associated with Situation-symbol and form Situation-symbol bag according to demonstration, extract customization data and form situation statistics bag, described Situation-symbol bag, situation statistics bag are mapped to the assigned address in internal memory; Then perform step respectively 6) and step 7);
6) according to the packet config set of described configuration file and utilize the assigned address of memory-mapped mechanism from internal memory to read situation statistics bag, situation display mode based on described configuration file configuration, according to the graphical diagrams display data of the Data Update pattern using configuration of described situation statistics bag;
7) utilize the assigned address of memory-mapped mechanism from internal memory to read Situation-symbol bag, according to the situation display mode of configuration, utilize described Situation-symbol to wrap on situation demonstration base map and refresh Situation-symbol, according to described data, show that the display type of the intelligent body statistics of attributes information of centralized configuration utilizes the new data of described situation statistics bag to count at situation demonstration base map upper Pleistocene series simultaneously.
Further, detailed step described step 2) is as follows:
2.1) read in the data display set of described configuration file the definition of chart, the display type of intelligent body statistics of attributes information, according to the display type configuration data display mode of described definition, intelligent body statistics of attributes information, the definition of described chart comprises subtype and the data type of chart, described subtype comprises histogram, broken line graph and pie chart, and the display type of described intelligent body statistics of attributes information comprises dot-density plot and bubble diagram;
2.2) determine the overall unique number of concentrated each Situation-symbol of Situation-symbol of described configuration file;
2.3) the customization entity class of determining described configuration file concentrates each to customize the overall unique number of entity class;
2.4) determine the overall unique number of each customization entity in the customization entity set of described configuration file;
2.5) determine the overall unique number of concentrated each complex data type of complex data type of described configuration file;
2.6) whether complex data type is set needs flattening to process, if needing flattening processes, read respectively complex data type and concentrate the overall unique number of each complex data type, then use the mode of recurrence that each attribute information in the structure data of complex data type is decomposed into transparent simple data type, turn next step; If do not need flattening to process, directly turn next step;
2.7) according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set three's configuration information, set up the mapping relations between Situation-symbol, customization entity class, customization entity three, determine the attribute information that comprises color, position, size, direction of Situation-symbol;
2.8) mapping relations between described Situation-symbol, customization entity class, customization entity three are kept in buffer memory.
Further, a plurality of artificial social products model in described step 3) comprises agent model, environmental model, accident model and controls intervention model.
Further, the detailed step of described step 6) is as follows:
6.1) chart element that initialization shows for data;
6.2) according to the packet config set of described configuration file and utilize the assigned address of memory-mapped mechanism from internal memory to obtain situation statistics bag;
6.3) judge whether to exist situation statistics bag, if exist, go to step 6.4),, if do not exist, return and re-execute step 6.2);
6.4) according to situation statistics bag content refresh data plot, according to new Data Update data plot in situation statistics bag for described data display set;
6.5) judge whether to receive the order of end data demonstration, if received, end data shows, otherwise goes to step 6.2).
Further, the detailed step of described step 7) is as follows:
7.1) pre-loaded situation shows base map, and described situation shows that base map comprises the background information that situation shows needs;
7.2) utilize the assigned address of memory-mapped mechanism from internal memory to obtain Situation-symbol bag;
7.3) judge whether to exist Situation-symbol bag, if exist, go to step 7.4),, if do not exist, return and re-execute step 7.2);
7.4) read the Situation-symbol bag obtaining, according to the mapping relations between Situation-symbol and customization entity in the mapping relations between described Situation-symbol, customization entity class, customization entity three, and the mapping relations between Situation-symbol and customization entity class, by the attribute of described customization entity and the customization entity class situation demonstration class of initialization customization entity and customization Situation-symbol that entity class shines upon respectively, thereby determine new color, position, size, the direction of Situation-symbol attribute information, thereby complete in situation, show on base map and refresh Situation-symbol; Described situation shows that class refers to and the class of Situation-symbol binding, and wherein the attribute in situation demonstration class has determined the relevant manifestation mode of Situation-symbol;
7.5) data that check described configuration file show the situation of centralized configuration shows whether need to show statistics, if situation shows, need to show statistics, and goes to step 7.6), otherwise go to step 7.7);
7.6) utilize the new data of described situation statistics bag to show in situation the demonstration that base map upper Pleistocene series counts;
7.7) judge whether to receive the order that finishes situation demonstration, if received, finish situation and show, otherwise go to step 7.3);
7.8) finishing situation shows.
The present invention also provides a kind of general artificial social product situation display device based on data stream mapping, comprising:
Experiment with computing administration module, for initial configuration file, described configuration file comprises Situation-symbol collection, customization entity class set, customization entity set, complex data type collection, data display set and packet config set, described Situation-symbol collection is comprised of multiple Situation-symbol, described Situation-symbol is that situation shows relevant symbol and picture, described customization entity class set is comprised of a plurality of customization entity class, the description that described customization entity class comprises entity class and attribute thereof, mapping relations between entity class and situation displaying symbol, described customization entity set is comprised of a plurality of customization entities, described customization entity comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol, described complex data type collection is comprised of Various Complex data type, described complex data type comprise for resolve from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form simple data type to the mapping relations the structure data of complex data type, described data display set comprises the definition of chart, whether the display type of intelligent body statistics of attributes information and situation show and need to show statistics, the definition of described chart comprises subtype and data type, described packet config set comprises the data exchange standard that obtains the opaque data stream existing with memory block form from artificial social product's parallel computation engine, assigned address from internal memory reads situation packet, assigned address from internal memory reads the data exchange standard of Situation-symbol bag and situation statistics bag,
Show module is set, for configuring situation display mode according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set, complex data type collection, according to the data display set configuration data display mode of described configuration file;
Artificial social product's evolution module, under the support of artificial social product's parallel computation engine, drives described a plurality of artificial social products model to interact and promotes the evolution of artificial social product;
Data reception module, process for the evolution in artificial social product, from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form, according to the packet config set of described configuration file, described opaque data stream is resolved and obtained situation data, the data type of chart definition in the data display set of described configuration file is added up and obtained statistics, the situation data that parsing is obtained and statistics packing generate situation packet, finally situation packet are mapped to the assigned address in internal memory;
Data processing module, be used for according to the packet config set of described configuration file and utilize memory-mapped mechanism read situation packet and resolve from the assigned address of internal memory, the data that parsing is obtained arrange the mapping ensemblen of preserving in module and are associated with Situation-symbol and form Situation-symbol bag according to demonstration, extract customization data and form situation statistics bag, described Situation-symbol bag, situation statistics bag are mapped to the assigned address in internal memory; Difference calling data display module and situation display module;
Data disaply moudle, be used for according to the packet config set of described configuration file and utilize memory-mapped mechanism to read situation statistics bag from the assigned address of internal memory, situation display mode based on described configuration file configuration, according to the graphical diagrams display data of the Data Update pattern using configuration of described situation statistics bag;
Situation display module, for utilizing memory-mapped mechanism to read Situation-symbol bag from the assigned address of internal memory, according to the situation display mode of configuration, utilize described Situation-symbol to wrap on situation demonstration base map and refresh Situation-symbol, according to described data, show that the display type of the intelligent body statistics of attributes information of centralized configuration utilizes the new data of described situation statistics bag to count at situation demonstration base map upper Pleistocene series simultaneously.
Further, described demonstration arranges module and comprises:
Data plot arranges submodule, the definition of data display set chart that is used for reading described configuration file is, the display type of intelligent body statistics of attributes information, according to the display type configuration data display mode of described definition, intelligent body statistics of attributes information, the definition of described chart comprises subtype and the data type of chart, described subtype comprises histogram, broken line graph and pie chart, and the display type of described intelligent body statistics of attributes information comprises dot-density plot and bubble diagram;
Situation-symbol numbering submodule, for determining the overall unique number of concentrated each Situation-symbol of Situation-symbol of described configuration file;
Customization entity class numbering submodule, for determining the overall unique number of concentrated each the customization entity class of customization entity class of described configuration file;
Customization entity numbering submodule, for determining the overall unique number of each customization entity of customization entity set of described configuration file;
Complex data type numbering submodule, for determining the overall unique number of concentrated each complex data type of complex data type of described configuration file;
Submodule is processed in complex data type flattening, whether be used for arranging complex data type needs flattening to process, if needing flattening processes, read respectively complex data type and concentrate the overall unique number of each complex data type, then use the mode of recurrence that each attribute information in the structure data of complex data type is decomposed into transparent simple data type, and call situation and show submodule is set; If do not need flattening to process, directly call situation demonstration submodule is set;
Situation demonstration arranges submodule, for setting up the mapping relations between Situation-symbol, customization entity class, customization entity three according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set three's configuration information, determine the attribute information that comprises color, position, size, direction of Situation-symbol;
Mapping relations are preserved submodule, for the mapping relations between described Situation-symbol, customization entity class, customization entity three are kept to buffer memory.
Further, the artificial social product's model in described artificial social product evolution module comprises agent model, environmental model, accident model and controls intervention model.
Further, described data disaply moudle comprises:
Chart element initialization submodule, the chart element showing for data for initialization;
Situation statistics bag obtains submodule, for according to the packet config set of described configuration file and utilize memory-mapped mechanism to obtain situation statistics bag from the assigned address of internal memory;
, there is situation statistics bag for judging whether in situation statistics bag judgement submodule, if exist calling data figure to refresh submodule, if do not exist, returns to re invocation situation statistics bag and obtain submodule;
Data plot refreshes submodule, for according to situation statistics bag content refresh data plot, according to new Data Update data plot in situation statistics bag for described data display set;
Data show to finish judgement submodule, and for the order that judges whether to receive that end data shows, if received, end data shows, otherwise call situation statistics bag, obtains submodule.
Further, described situation display module comprises:
Situation shows that base map loads submodule, for pre-loaded situation, shows base map, and described situation shows that base map comprises the background information that situation shows needs;
Situation-symbol bag obtains submodule, for utilizing memory-mapped mechanism to obtain Situation-symbol bag from the assigned address of internal memory;
Situation-symbol bag judgement submodule, for judging whether to exist Situation-symbol bag, calls Situation-symbol if exist and refreshes submodule, if do not exist, returns to re invocation Situation-symbol bag and obtains submodule;
Situation-symbol refreshes submodule, for reading the Situation-symbol bag obtaining, according to described Situation-symbol, customization entity class, mapping relations in mapping relations between customization entity three between Situation-symbol and customization entity, and the mapping relations between Situation-symbol and customization entity class, by the attribute of described customization entity and the customization entity class situation demonstration class of initialization customization entity and customization Situation-symbol that entity class shines upon respectively, thereby determine the new color of Situation-symbol attribute information, position, size, direction, thereby complete in situation, show on base map and refresh Situation-symbol, described situation shows that class refers to and the class of Situation-symbol binding, and wherein the attribute in situation demonstration class has determined the relevant manifestation mode of Situation-symbol,
The situation judgement submodule that shows statistics, for checking that the data of described configuration file show the situation of centralized configuration shows whether need to show statistics, if showing, situation need to show statistics, call statistics and upgrade submodule, otherwise call situation, show end judgement submodule;
Statistics is upgraded submodule, for utilizing the new data of described situation statistics bag to show in situation the demonstration that base map upper Pleistocene series counts;
Situation shows end judgement submodule, for judging whether to receive, finishes the order that situation shows, if received, finishes situation and shows, otherwise call Situation-symbol bag, judges submodule.
The general artificial social product situation display packing that the present invention is based on data stream mapping has following technique effect:
1, decoupling zero of the present invention code and the binding relationship of Simulation Application in source code rank, after model changes in analogue system, do not need to rewrite correlative code and only need in configuration file, the situation of change of model be upgraded.
2, the mapping relations between situation customization entity class of the present invention comprises entity class and attribute thereof description, entity class and situation displaying symbol are configured by configuration file, can add as required if desired Situation-symbol and with the mapping relations of situation display entity, the dirigibility that improves device.
3, the packet config set of configuration file of the present invention comprises the data exchange standard that obtains the opaque data stream existing with memory block form from artificial social product's parallel computation engine, assigned address from internal memory reads situation packet, assigned address from internal memory reads the data exchange standard of Situation-symbol bag and situation statistics bag, and in the reception of follow-up data, process with demonstration and process according to packet config set, thereby by the reception of data, processed with Display Realization decoupling zero, receive, between processing and demonstration, by memory-mapped mechanism, realize data sharing, guaranteed the real-time of device.
In sum, the general artificial social product situation display packing that the present invention is based on data stream mapping has advantages of customization ability is strong, situation shows versatility with adaptability degree of flexibility good, whole situation representation is high, can provide feedback support for better carrying out aid decision making.
The general artificial social product situation display device that the present invention is based on data stream mapping is the completely corresponding device of general artificial social product situation display packing that the present invention is based on data stream mapping, therefore also there is the aforementioned identical technique effect of general artificial social product situation display packing of the data stream of the present invention is based on mapping, therefore do not repeat them here.
Accompanying drawing explanation
Fig. 1 is the basic procedure schematic diagram of embodiment of the present invention method.
Fig. 2 is the logical framework structural representation of embodiment of the present invention device.
Fig. 3 is embodiment of the present invention method step 2) detailed process schematic diagram.
Fig. 4 is embodiment of the present invention method step 4) detailed process schematic diagram.
Fig. 5 is embodiment of the present invention method step 5) detailed process schematic diagram.
Fig. 6 is embodiment of the present invention method step 6) detailed process schematic diagram.
Fig. 7 is embodiment of the present invention method step 7) detailed process schematic diagram.
Embodiment
Below take Emergent health event as example, general artificial social product situation display packing and the device based on data stream mapping of the present embodiment are elaborated.It should be noted that, the present embodiment is only to take Emergent health event to describe as example, and without doubt, the present embodiment can also be applied to the emulation of other various general artificial social products, does not repeat them here.The present embodiment for Emergent health event emulation in, choose Beijing SARS and propagate as background, the main intelligent body attribute kit of paying close attention to is containing age (integer), sex (enumeration type), occupation (enumeration type), longitude and latitude (floating type), social relationships net (structure type), health status (enumeration type), catch an illness the stage (enumeration type), the phases-time of catching an illness (integer), immunity (Boolean type), emergence environment measure (enumeration type) etc.The stage of catching an illness of intelligent body is divided into healthy stage, stage in latent period, the stage of catching an illness, recovery stage.The situation displaying symbol relating to comprises intelligent body symbol, disease gathering breaks out symbol, social relationships junction symbol etc., these intelligent body attributes and situation displaying symbol be unique number all, can be by the unique definite situation displaying symbol of numbering, for the generation of Situation-symbol bag is laid a good foundation.
As shown in Figure 1, the implementation step of the general artificial social product situation display packing of the present embodiment based on data stream mapping is as follows:
1) initial configuration file, configuration file comprises Situation-symbol collection, customization entity class set, customization entity set, complex data type collection, data display set and packet config set, Situation-symbol collection is comprised of multiple Situation-symbol, Situation-symbol is that situation shows relevant symbol and picture, customization entity class set is comprised of a plurality of customization entity class, the description that customization entity class comprises entity class and attribute thereof, mapping relations between entity class and situation displaying symbol, customization entity set is comprised of a plurality of customization entities, customization entity comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol, complex data type collection is comprised of Various Complex data type, complex data type comprise for resolve from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form simple data type to the mapping relations the structure data of complex data type, data display set comprises the definition of chart, whether the display type of intelligent body statistics of attributes information and situation show and need to show statistics, the definition of chart comprises subtype and data type, packet config set comprises the data exchange standard that obtains the opaque data stream existing with memory block form from artificial social product's parallel computation engine, assigned address from internal memory reads situation packet, assigned address from internal memory reads the data exchange standard of Situation-symbol bag and situation statistics bag,
2) according to the Situation-symbol collection of configuration file, customization entity class set, customization entity set, complex data type collection configuration situation display mode, according to the data display set configuration data display mode of configuration file;
3), under the support of artificial social product's parallel computation engine, drive a plurality of artificial social products model to interact and promote the evolution of artificial social product;
4) in the evolutionary process of artificial social product, from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form, according to the packet config set of configuration file, opaque data stream is resolved and obtained situation data, the data type of chart definition in the data display set of configuration file is added up and obtained statistics, the situation data that parsing is obtained and statistics packing generate situation packet, finally situation packet are mapped to the assigned address in internal memory;
5) according to the packet config set of configuration file and utilize the assigned address of memory-mapped mechanism from internal memory read situation packet and resolve, the data that parsing is obtained arrange the mapping ensemblen of preserving in module and are associated with Situation-symbol and form Situation-symbol bag according to demonstration, extract customization data and form situation statistics bag, Situation-symbol bag, situation statistics bag are mapped to the assigned address in internal memory; Then perform step respectively 6) and step 7);
6) according to the packet config set of configuration file and utilize the assigned address of memory-mapped mechanism from internal memory to read situation statistics bag, situation display mode based on configuration file configuration, according to the graphical diagrams display data of the Data Update pattern using configuration of situation statistics bag;
7) utilize the assigned address of memory-mapped mechanism from internal memory to read Situation-symbol bag, according to the situation display mode of configuration, utilize Situation-symbol to wrap on situation demonstration base map and refresh Situation-symbol, according to data, show that the display type of the intelligent body statistics of attributes information of centralized configuration utilizes the new data of situation statistics bag to count at situation demonstration base map upper Pleistocene series simultaneously.
In the present embodiment, configuration file comprises Situation-symbol collection, customization entity class set, customization entity set, complex data type collection, data display set and packet config set.Entity refers to the things that in real world, outwardness also can be distinguished mutually, is the main body that emulation behavior is carried out, and customization entity is in simulation process and shows relevant entity to situation, as intelligent body entity, environmental entity.The foregoing of configuration file is described as follows:
1.1) Situation-symbol collection is comprised of multiple Situation-symbol, and Situation-symbol is that situation shows relevant symbol and picture; In the present embodiment, situation shows that relevant symbol and picture are the picture file of png form, comprises population symbol, building symbol, vehicle symbol, accident label, intelligent body psychological condition symbol etc., and building symbol comprises hospital, school, station etc.
1.2) customization entity class set is comprised of a plurality of customization entity class, the mapping relations between description, entity class and situation displaying symbol that customization entity class comprises entity class and attribute thereof.Customization entity class set is for arranging map information by entity class, the description that comprises entity class and attribute thereof, and the mapping relations of entity class and situation displaying symbol.In the present embodiment, customizing entity class is intelligent body entity class and environmental entity class.
1.3) customization entity set is comprised of a plurality of customization entities, and customization entity comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol.Customization entity set is that the user-defined classification to some entities shows, wherein comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol.Customization entity and can comprise the hospital of some particular number, the intelligent body of particular number, particular place intelligent body or specific trip mode intelligent body.
1.4) complex data type collection is comprised of Various Complex data type, complex data type comprise for resolve from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form simple data type to the mapping relations the structure data of complex data type.Complex data type collection is for parsing to data stream, is about in structure each Attribute decomposition until be simple data type entirely.In the present embodiment, simple data type comprises the data types such as integer, floating type, digit group type, Boolean type, enumeration type, and for example intelligent body is numbered integer, and longitude and latitude is floating type, and sex is enumeration type; Structure data type comprises social relationships net attribute.
1.5) data display set comprises the definition of chart, whether the display type of intelligent body statistics of attributes information and situation demonstration need to show statistics, and the definition of chart comprises subtype and data type.In the present embodiment, subtype comprises curve map, cake chart, has stipulated therein demonstration legend, and the definition of coordinate axis, layout and chart are to showing the Standardization Requirement of data, and the standardization demand of data is data type, data length; The display type of intelligent body statistics of attributes information comprises dot-density plot etc., is used in the displaying to the distribution density visual pattern of different mental state on situation base map, and these rules comprise the standardization demand to data, i.e. data type, data length.
1.6) packet config set comprises that from artificial social product's parallel computation engine, obtaining the data exchange standard of the opaque data stream existing with memory block form, the assigned address from internal memory reads the data exchange standard that situation packet, the assigned address from internal memory read Situation-symbol bag and situation statistics bag; Packet config set specifically comprises the content of three aspects: first, simulation engine and data reception module data exchange standard, the organizational form of the opaque data that produce from simulation engine, simulation engine is packed data by this standard, and data reception module is resolved by this standard; The second, data reception module and data processing module data exchange standard, i.e. the Organization of Data form of situation packet; The 3rd, data processing module and situation show and data disaply moudle data exchange standard, the Organization of Data form that Situation-symbol bag and situation statistics are wrapped.Simulation engine and data reception module data exchange standard are: according to intelligent body index, deposit continuously from low to high intelligent body data in internal memory, each intelligent body data is arranged in order according to the order of intelligent body attribute again, sequence consensus to intelligent body attribute description in the ordering of attribute and configuration file, therefore in data reception module, Data Analysis unit can extract interested intelligent body attribute information to the description of intelligent body according to configuration file from internal memory, realize Data Analysis, other two kinds of data exchange standards repeat no more.
In the present embodiment, a plurality of artificial social products model in step 3) comprises agent model, environmental model, accident model and controls intervention model totally four class models.Being described as follows of this four class model:
3.1) agent model: pay close attention to age (integer), sex (enumeration type), occupation (enumeration type), longitude and latitude (floating type), social relationships net (structure type), health status (enumeration type), catch an illness the stage (enumeration type), the phases-time of catching an illness (integer), immunity (Boolean type), these intelligent body attributes of emergence environment measure (enumeration type) in agent model, the intelligent body stage of catching an illness is divided into healthy stage, stage in latent period, the stage of catching an illness, recovery stage.The statistics of propagating by analyzing SARS, has carried out modeling to intelligent body the changing the mechanism of stage of catching an illness.By analyzing the behavior pattern of crowd in real world, the behavior of intelligent body has been carried out to modeling.By analyzing interhuman social relationships in real world, the social relation network of intelligent body has been carried out to modeling.
3.2) environmental model: main concern aspect two in environmental model, the modeling to life, work, public place of entertainment on the one hand, life, work, public place of entertainment have comprised some subfields institute, as life area comprises family, hotel, station etc., workplace comprises office building, school, factory etc., and public place of entertainment comprises cinema, dining room, gymnasium etc.; Be the modeling to traffic network on the other hand, wherein mainly pay close attention to subway, public transport, self-driving, four kinds of trip modes of walking.
3.3) accident model: accident model comprises that the outside SARS intelligent body of catching an illness invades Beijing's model and statistical distribution data thereof, the course of disease model of SARS virus itself, medical resource model and distributed data thereof.
3.4) control intervention model: control intervention model and comprise the individual vaccine inoculation of intelligent body and inoculative proportion thereof, quarantine measures and area of isolation, close the modeling of the measure etc. of public place.
The theoretical foundation of the present embodiment is the meta-model of structure situation display device, by mapping configuration mechanism, make meta-model instantiation, thereby during by this application of installation, the artificial social product under different situations prefers, compare traditional situation display device, versatility and applicability strengthen greatly.
As shown in Figure 2, the present embodiment also provides a kind of and aforementioned general artificial social product situation display packing based on data stream mapping the completely corresponding general artificial social product situation display device based on data stream mapping, comprising:
Experiment with computing administration module, for initial configuration file, configuration file comprises Situation-symbol collection, customization entity class set, customization entity set, complex data type collection, data display set and packet config set, Situation-symbol collection is comprised of multiple Situation-symbol, Situation-symbol is that situation shows relevant symbol and picture, customization entity class set is comprised of a plurality of customization entity class, the description that customization entity class comprises entity class and attribute thereof, mapping relations between entity class and situation displaying symbol, customization entity set is comprised of a plurality of customization entities, customization entity comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol, complex data type collection is comprised of Various Complex data type, complex data type comprise for resolve from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form simple data type to the mapping relations the structure data of complex data type, data display set comprises the definition of chart, whether the display type of intelligent body statistics of attributes information and situation show and need to show statistics, the definition of chart comprises subtype and data type, packet config set comprises the data exchange standard that obtains the opaque data stream existing with memory block form from artificial social product's parallel computation engine, assigned address from internal memory reads situation packet, assigned address from internal memory reads the data exchange standard of Situation-symbol bag and situation statistics bag,
Show module is set, for configuring situation display mode according to the Situation-symbol collection of configuration file, customization entity class set, customization entity set, complex data type collection, according to the data display set configuration data display mode of configuration file;
Artificial social product's evolution module, under the support of artificial social product's parallel computation engine, drives a plurality of artificial social products model to interact and promotes the evolution of artificial social product;
Data reception module, process for the evolution in artificial social product, from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form, according to the packet config set of configuration file, opaque data stream is resolved and obtained situation data, the data type of chart definition in the data display set of configuration file is added up and obtained statistics, the situation data that parsing is obtained and statistics packing generate situation packet, finally situation packet are mapped to the assigned address in internal memory;
Data processing module, be used for according to the packet config set of configuration file and utilize memory-mapped mechanism read situation packet and resolve from the assigned address of internal memory, the data that parsing is obtained arrange the mapping ensemblen of preserving in module and are associated with Situation-symbol and form Situation-symbol bag according to demonstration, extract customization data and form situation statistics bag, Situation-symbol bag, situation statistics bag are mapped to the assigned address in internal memory; Difference calling data display module and situation display module;
Data disaply moudle, be used for according to the packet config set of configuration file and utilize memory-mapped mechanism to read situation statistics bag from the assigned address of internal memory, situation display mode based on configuration file configuration, according to the graphical diagrams display data of the Data Update pattern using configuration of situation statistics bag;
Situation display module, for utilizing memory-mapped mechanism to read Situation-symbol bag from the assigned address of internal memory, according to the situation display mode of configuration, utilize Situation-symbol to wrap on situation demonstration base map and refresh Situation-symbol, according to data, show that the display type of the intelligent body statistics of attributes information of centralized configuration utilizes the new data of situation statistics bag to count at situation demonstration base map upper Pleistocene series simultaneously.
In the present embodiment, artificial social product's evolution module is based on artificial social product's parallel computation engine, artificial social product's parallel computation engine specifically adopts Parallel Engine parallel computation engine, Parallel Engine parallel computation engine is a kind of based on MPI(Message Passing Interface) parallel computation engine, support the emulation of multi-process distributed parallel, the model that utilizes conservative discrete event synchronized algorithm to drive OneModel to generate, a kind of high-performance simulation engine that can support City-level scale artificial social product, for driving artificial social product's model.To data stream, the flow process between modules has played very important effect to configuration file: the demand showing according to situation by experiment with computing administration module (needing the data of customization, the data display mode of customization) Reconfigurations file, show module reading configuration file information is set, confirm display symbol set, show object set and preserve displaying symbol and the mapping relations that show object, determine the organizational form that shows the complex data type structure of attribute in object; Data reception module is resolved the opaque data that obtain from artificial social product's parallel computation engine to the description of complex data type according to display module, according to customization data type, complete the statistics to corresponding data, finally generates situation packet; Data processing module resolution data also generates Situation-symbol bag according to the mapping relations that show object and displaying symbol, extracts situation statistics bag from situation packet; Situation display module and data disaply moudle obtain Situation-symbol bag by memory-mapped mechanism and thereby situation demonstration realized by situation statistics bag and data show.
In the present embodiment, step 2) specifically based on demonstration, arrange that module realizes, show and module is set for determining all kinds of Situation-symbols (the population symbol in artificial social product's Situation-symbol storehouse, building symbol, accident label, intelligent body psychological condition symbols etc.) Situation-symbol has been encoded according to different classes of, by reading configuration file information, extract entity class, and according to configuration information, complete the mapping configuration of artificial social product's Situation-symbol and entity, and preserve mapping ensemblen and load for data processing module.In addition, show that module is set also supports user manually to add Situation-symbol, mapping ruler, these changes are directly presented as the renewal to configuration file, only need to again read configuration file, just can upgrade mapping ensemblen.This module also loads data display set and the standardization demand to data from configuration file, the variation of intelligent body psychological condition while occurring as paid close attention to accident in accident emulation, simulation engine will be announced each intelligent body psychological condition data completely to data reception module, according to data representation (as broken line graph), at data reception module, the intelligent body quantity of different mental state is added up, convenient packing forms situation packet and situation statistics bag.As shown in Figure 3, after showing that module is set to be started, first open and show the process that arranges, by demonstrations, process is set and performs step 2) detailed step as follows:
2.1) read in the data display set of configuration file the definition of chart, the display type of intelligent body statistics of attributes information, according to the display type configuration data display mode of definition, intelligent body statistics of attributes information, the definition of chart comprises subtype and the data type of chart, subtype comprises histogram, broken line graph and pie chart, and the display type of intelligent body statistics of attributes information comprises dot-density plot and bubble diagram;
2.2) confirm Situation-symbol collection: determine the overall unique number of concentrated each Situation-symbol of Situation-symbol of configuration file, will carry out overall unique number to intelligent body, environment Situation-symbol used in the present embodiment;
2.3) confirm customization entity class set: the customization entity class of determining configuration file concentrates each to customize the overall unique number of entity class, in the present embodiment intelligent body entity class and environmental entity class is determined to overall unique number;
2.4) confirm customization entity set: the overall unique number of determining each customization entity in the customization entity set of configuration file; The overall unique number of customization entity is to customize entity at intrasystem unique identification, and user can be according to the age in the present embodiment, sex, region, employment status, the data message of distributed areas customization intelligent body, simulation engine transmits data according to this customization entity set to data reception module;
2.5) confirm complex data type collection: the overall unique number of determining concentrated each complex data type of complex data type of configuration file;
2.6) whether complex data type is set needs flattening to process, if needing flattening processes, read respectively complex data type and concentrate the overall unique number of each complex data type, then use the mode of recurrence that each attribute information in the structure data of complex data type is decomposed into transparent simple data type, go to step 2.7); If do not need flattening to process, directly go to step 2.7);
With the social relationships attribute in intelligent body attribute (intelligent body SocialGroup), carry out the flat example that turns to, in the present embodiment, according to configuration file, learn that intelligent body social relationships (SocialGroup) are for structure type, be complex data type, this structure comprises two members, one is the social relationships quantity member (nSocialGroupCount) of integer, another is the social relationships array of indexes member (nSocialRelations) of structure type, wherein social relationships array of indexes member is social relationships structure type (SocialGroup), social relationships structure comprises again two members, be respectively the intelligent body index member (n intelligent body Index) of integer and the social relationships member (eSocialGroup) of enumeration type, the social relationships member amount of enumerating of enumeration type is respectively unknown (Group_None), house friend (Group_Dormitory), friend (Group_Friend), teachers and students (Group_Education), corporations (Group_Community), fellow villager (Group_NativePlace), classmate (Group_Classmate),
2.7) mapping Situation-symbol collection: set up the mapping relations between Situation-symbol, customization entity class, customization entity three according to the Situation-symbol collection of configuration file, customization entity class set, customization entity set three's configuration information, determine the attribute information that comprises color, position, size, direction of Situation-symbol;
In the present embodiment, situation shows that class is and the class of Situation-symbol binding, and wherein the attribute in situation demonstration class has determined the relevant manifestation mode of Situation-symbol.As for for showing the humanoid Situation-symbol of intelligent body, show the size in class with the situation of its binding, color, anglec of rotation attribute has determined respectively the size of humanoid Situation-symbol, color, direction.Situation shows that the initialization of class provides data by situation packet in the present invention, thereby the foundation of customization entity and Situation-symbol mapping relations depends on customization entity attribute and situation demonstration generic attribute is set up mapping relations;
2.8) preserve mapping ensemblen: the mapping relations between Situation-symbol, customization entity class, customization entity three are kept in buffer memory.
In execution of step 2.1)~2.8) after, finish to show the process that arranges.
In the present embodiment, in step 3), artificial social product's model comprises agent model, environmental model, accident model and controls intervention model.The modeling tool that the present embodiment is set up artificial social product's model adopts OneModel 2.0 modeling tools, OneModel 2.0 modeling tools are a kind of for developing analysis, test, assessment, train required component model, comprise intelligent body, the objects such as environment, adopt modularization, standardization, object-oriented, the thought of discrete events simulation, method and technology, the component model that meets XML and C++ standard by the Integrated Development Environment exploitation based on Tcl/Tk, by programming development interface and parallel artificial engine, supply a model and develop and compiling, prefer and resolve and load, CPU/GPU parallel artificial and calculating drive to be supported.In addition, certainly also can set up artificial social product's model with other modeling tool, the quantity of model and detailed model all can be adjusted according to actual needs or change, and do not repeat them here.
In the present embodiment, step 4) specifically realizes based on data reception module, data reception module is for continuing interception data request, receive that request of data Hou Cong artificial social product parallel computation engine place obtains the opaque data stream existing with memory block form, description according to configuration file to complex data type collection, data stream is resolved, according to customization data type and the data representation set in configuration module, related data is added up, the related data of resolving and statistics packing are generated to situation packet, finally situation packet is mapped to internal memory relevant position.
As shown in Figure 4, the detailed step of step 4) is as follows:
4.1) turn-on data receiving process;
4.2) judge whether to receive request of data, if receive that request of data goes to step 4.4), otherwise go to step 4.3);
4.3) interception data request, goes to step 4.2);
4.4) in the process of the evolution of artificial social product, from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form;
4.5) according to the packet config set of configuration file, opaque data stream is resolved and obtained situation data;
When Data Analysis is according to packing, the organized formats of data obtains concrete data from opaque data block.In the present embodiment, the data stream that simulation engine produces is stored in internal memory with the form of memory block, its organizational form for to deposit continuously from low to high intelligent body data according to intelligent body index in internal memory, each intelligent body data is arranged in order according to the order of intelligent body attribute again, sequence consensus to intelligent body attribute description in the ordering of attribute and configuration file, therefore in data reception module, Data Analysis unit can extract interested intelligent body attribute information to the description of intelligent body according to configuration file from internal memory, realizes Data Analysis.In this external data processing module and situation demonstration and data disaply moudle, also related to Data Analysis process.Data processing module is resolved situation packet according to situation packet data organizational form in configuration file, situation display module is resolved Situation-symbol bag and situation statistics bag according to Situation-symbol bag and situation statistics bag Organization of Data form, and data disaply moudle is resolved situation statistics bag by situation statistics bag Organization of Data form;
4.6) data type of chart definition in the data display set of configuration file is added up and obtained statistics.In the present embodiment in data display set the data type of chart definition for according to the healthy number of range statistics, the number of catching an illness, latent period number, convalescence number, vaccine inoculation ratio, and the ratio etc. of closing public place;
4.7), according to the packet config set of configuration file, the situation data that parsing is obtained and statistics packing generate situation packet;
Data packing mainly facilitates the transmission of data in network, and as in tcp/ip communication, the IP packet transmitting in network is according to the packet of certain format packing.In this present embodiment, the data layout of packing is stipulated by the packet config set of configuration file.In the present embodiment, in configuration file regulation situation packet, the sequencing of Organization of Data is that intelligent body data are front, environmental entity data are after intelligent body data, customization data statistical information is after environmental entity data, intelligent body data are according to intelligent body index, the stage of catching an illness, longitude and latitude sequence, customization data statistical information is according to healthy stage, the stage of catching an illness, stage in latent period, the sequence of stage convalescence, and rear packing is screened in the parsing of the data stream that the memory-mapped unit of data reception module obtains according to this order Ba Cong artificial social product parallel computation engine.In addition data processing module has also related to data packing process.At data processing module, mapping dispensing unit is according to the Organization of Data form packing Situation-symbol bag of Situation-symbol bag in configuration file and situation statistics bag and situation statistics bag;
4.8) situation packet is mapped to the assigned address in internal memory;
Situation packet is mapped to assigned address in internal memory and has used memory-mapped mechanism, memory-mapped mechanism is for quick swap data between different processes, specific implementation process is: first between process, arrange swap data and leave the address of internal memory and the organizational form of data in EMS memory in, then according to the agreement of data address between process and Organization of Data form, reach data shared object fast.In this device, memory-mapped mechanism has promoted the real-time that situation shows.
4.9) judge whether to receive emulation the finish command, if received, go to step 4.10), otherwise go to step 4.2);
4.10) end data receives.
As shown in Figure 5, the present embodiment step 5) specifically realizes by data processing module.Data processing module utilizes memory-mapped mechanism to receive situation packet from data reception module and resolves, and the data of parsing are arranged to the mapping ensemblen of preserving in module according to demonstration and be associated with Situation-symbol, form Situation-symbol bag, extract customization data and form situation statistics bag.Meanwhile, Situation-symbol bag and situation statistics bag are mapped to internal memory relevant position.
As shown in Figure 5, the detailed step of step 5) is as follows:
5.1) turn-on data treatment progress;
5.2) to data reception module, send request of data;
5.3) judge whether to grab situation packet, if obtain effective situation packet, place it in internal memory, go to step 5.5), otherwise go to step 5.4);
5.4) utilize the assigned address of memory-mapped mechanism from internal memory to read situation packet, go to step 5.3);
5.5) according to the data exchange standard of the packet config set of configuration file, resolve situation packet;
5.6) data that parsing obtained arrange the mapping ensemblen of preserving in module and are associated with Situation-symbol and form Situation-symbol bag according to demonstration; Because customization entity and attribute thereof and Situation-symbol are by unique number, so set up unique mapping relations between numbering, also just determined uniquely between customization entity and Situation-symbol to have determined mapping relations;
5.7) Situation-symbol bag is mapped to the assigned address in internal memory;
5.8) comprehensive customization data, extracts customization data and forms situation statistics bag and form situation statistics bag;
5.9) situation statistics bag is mapped to the assigned address in internal memory, turns 5.1).
In the present embodiment, step 6) specifically realizes based on data disaply moudle, data disaply moudle utilizes memory-mapped mechanism to obtain situation statistics bag from data processing module, and diagrammatic form in a variety of forms shows reduced data on request, diagrammatic form comprises histogram, broken line graph, pie chart etc.As use age composition in histogram or pie chart performance artificial social product region, and sex ratio relation, the inoculative proportion of vaccine, the ratio of closing public place, is used broken line graph performance intelligent body health status situation etc. over time.
In the present embodiment, between data reception module, data processing module, based on memory-mapped mechanism, carry out exchanges data, by data reception module, situation packet is mapped to the assigned address in internal memory, by data processing module, utilizes the assigned address of memory-mapped mechanism from internal memory to read situation packet.
In the present embodiment, step 6) specifically realizes by data disaply moudle, data disaply moudle work be start a number according to the show process carry out relevant flow process.As shown in Figure 6, detailed step after log-on data show process, data show process execution step 6) is as follows:
6.1) chart element that initialization shows for data;
6.2) according to the packet config set of configuration file and utilize the assigned address of memory-mapped mechanism from internal memory to obtain situation statistics bag;
6.3) judge whether to exist situation statistics bag, if exist, go to step 6.4),, if do not exist, return and re-execute step 6.2);
6.4), according to situation statistics bag content refresh data plot, according to new Data Update data plot in situation statistics bag for data display set, as mentioned before, data display set comprises the definition of chart, the display type of intelligent body statistics of attributes information;
In the present embodiment, according to data display set, comprise the definition of chart, the display type of intelligent body statistics of attributes information, in conjunction with the Organization of Data form of situation statistics bag, resolve gesture statistics bag, use the new Data Update data plot of resolving; The intelligent body health status broken line graph of take is example, the present embodiment is specifically determined new data point according to new intelligent body state of health data, the organize sequencing of status data in situation statistics bag of catching an illness is: healthy stage, the stage of catching an illness, stage in latent period, stage convalescence number, resolve in order situation statistics bag, obtain the intelligent body quantity of each health status, thereby new data point is connected and dynamically represents intelligent body health status variation tendency with old data point;
6.5) judge whether to receive the order of end data demonstration, if received, end data shows, otherwise goes to step 6.2).
In the present embodiment, step 7) specifically realizes based on situation display module, and situation display module obtains Situation-symbol bag by memory-mapped mechanism from data processing module, according to map information, utilizes situation displaying symbol to describe assembly and carries out situation drafting.According to the data representation of customization (if having customized statistical information performance form in configuration file), the statistical information by situation statistics bag, shows that in situation on base map, stack represents situation information as requested.As carried out classification according to the intelligent body health status situation in per unit region in Public Health Emergencies, use dot-density plot illness outbreak degree that shows directly perceived on map, every one-level adopts different colors to represent, thereby be decision maker's regional outbreak of disease information of assurance directly perceived macroscopic view, for taking counter-measure to provide support.
In the present embodiment, step 7) specifically realizes by situation display module, starts a situation show process and carry out relevant flow process during the work of situation display module.As shown in Figure 7, detailed step after starting situation show process, situation show process execution step 7) is as follows:
7.1) pre-loaded situation shows base map, and situation shows that base map comprises the background information that situation shows needs, and in the present embodiment, situation shows that base map is specially Beijing's 2 d plane picture;
7.2) utilize the assigned address of memory-mapped mechanism from internal memory to obtain Situation-symbol bag;
7.3) judge whether to exist Situation-symbol bag, if exist, go to step 7.4),, if do not exist, return and re-execute step 7.2);
7.4) read the Situation-symbol bag obtaining, according to Situation-symbol, customization entity class, mapping relations in mapping relations between customization entity three between Situation-symbol and customization entity, and the mapping relations between Situation-symbol and customization entity class, by the attribute of customization entity and the customization entity class situation demonstration class of initialization customization entity and customization Situation-symbol that entity class shines upon respectively, thereby determine the new color of Situation-symbol attribute information, position, size, direction, thereby complete in situation, show on base map and refresh Situation-symbol, thereby complete in situation, show on base map and refresh Situation-symbol, wherein, situation shows that class refers to the class of binding with Situation-symbol, wherein the attribute in situation demonstration class has determined the relevant manifestation mode of Situation-symbol, for example, for for showing the humanoid Situation-symbol of intelligent body, show that with the situation of its binding size, color, anglec of rotation attribute in class determined respectively size, color, the direction of humanoid Situation-symbol.In the present embodiment, refresh according to the health status of intelligent body the colouring information of Situation-symbol;
7.5) data of inspection configuration file show the situation of centralized configuration shows whether need to show statistics, if situation shows, need to show statistics, and goes to step 7.6), otherwise go to step 7.7);
7.6) utilize the new data of situation statistics bag to show in situation the demonstration that base map upper Pleistocene series counts; In the present embodiment, specifically refer on Beijing's 2 d plane picture with dot-density plot, bubble diagram is by region Overlapping display illness outbreak situation;
7.7) judge whether to receive the order that finishes situation demonstration, if received, finish situation and show, otherwise go to step 7.3).
To sum up, the key method of realizing the present embodiment is that the situation data based on data stream mapping configure with the mapping of Situation-symbol, the configuration mechanism that situation sight represents.Machine-processed accordingly, the mapping relations in the data based mapping ensemblen of emulation situation are being mated respective symbol in artificial Situation-symbol storehouse, and using Situation-symbol to mark and draw assembly just can be according to real-time situation data real-time update situation.By customization data, reduce the transmission quantity of simulation engine and data reception interblock data, reduced the communication load of LAN, improved the performance and reliability of device.By customization statistics performance form, expanded the ability that situation shows.In realizing the process that concrete Simulation Application and situation display device be separated, configuration file has played vital role, is the set of each intermodular data exchange agreement standard.
The above is only the preferred embodiment of the present invention, and protection scope of the present invention is also not only confined to above-described embodiment, and all technical schemes belonging under thinking of the present invention all belong to protection scope of the present invention.It should be pointed out that for those skilled in the art, some improvements and modifications without departing from the principles of the present invention, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (10)
1. a general artificial social product situation display packing of shining upon based on data stream, is characterized in that implementation step is as follows:
1) initial configuration file, described configuration file comprises Situation-symbol collection, customization entity class set, customization entity set, complex data type collection, data display set and packet config set, described Situation-symbol collection is comprised of multiple Situation-symbol, described Situation-symbol is that situation shows relevant symbol and picture, described customization entity class set is comprised of a plurality of customization entity class, the description that described customization entity class comprises entity class and attribute thereof, mapping relations between entity class and situation displaying symbol, described customization entity set is comprised of a plurality of customization entities, described customization entity comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol, described complex data type collection is comprised of Various Complex data type, described complex data type comprise for resolve from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form simple data type to the mapping relations the structure data of complex data type, described data display set comprises the definition of chart, whether the display type of intelligent body statistics of attributes information and situation show and need to show statistics, the definition of described chart comprises subtype and data type, described packet config set comprises the data exchange standard that obtains the opaque data stream existing with memory block form from artificial social product's parallel computation engine, assigned address from internal memory reads situation packet, assigned address from internal memory reads the data exchange standard of Situation-symbol bag and situation statistics bag,
2) according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set, complex data type collection configuration situation display mode, according to the data display set configuration data display mode of described configuration file;
3), under the support of artificial social product's parallel computation engine, drive a plurality of artificial social products model to interact and promote the evolution of artificial social product;
4) in the evolutionary process of artificial social product, from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form, according to the packet config set of described configuration file, described opaque data stream is resolved and obtained situation data, the data type of chart definition in the data display set of described configuration file is added up and obtained statistics, the situation data that parsing is obtained and statistics packing generate situation packet, finally situation packet are mapped to the assigned address in internal memory;
5) according to the packet config set of described configuration file and utilize the assigned address of memory-mapped mechanism from internal memory read situation packet and resolve, the data that parsing is obtained arrange the mapping ensemblen of preserving in module and are associated with Situation-symbol and form Situation-symbol bag according to demonstration, extract customization data and form situation statistics bag, described Situation-symbol bag, situation statistics bag are mapped to the assigned address in internal memory; Then perform step respectively 6) and step 7);
6) according to the packet config set of described configuration file and utilize the assigned address of memory-mapped mechanism from internal memory to read situation statistics bag, situation display mode based on described configuration file configuration, according to the graphical diagrams display data of the Data Update pattern using configuration of described situation statistics bag;
7) utilize the assigned address of memory-mapped mechanism from internal memory to read Situation-symbol bag, according to the situation display mode of configuration, utilize described Situation-symbol to wrap on situation demonstration base map and refresh Situation-symbol, according to described data, show that the display type of the intelligent body statistics of attributes information of centralized configuration utilizes the new data of described situation statistics bag to count at situation demonstration base map upper Pleistocene series simultaneously.
2. the general artificial social product situation display packing based on data stream mapping according to claim 1, is characterized in that described step 2) detailed step as follows:
2.1) read in the data display set of described configuration file the definition of chart, the display type of intelligent body statistics of attributes information, according to the display type configuration data display mode of described definition, intelligent body statistics of attributes information, the definition of described chart comprises subtype and the data type of chart, described subtype comprises histogram, broken line graph and pie chart, and the display type of described intelligent body statistics of attributes information comprises dot-density plot and bubble diagram;
2.2) determine the overall unique number of concentrated each Situation-symbol of Situation-symbol of described configuration file;
2.3) the customization entity class of determining described configuration file concentrates each to customize the overall unique number of entity class;
2.4) determine the overall unique number of each customization entity in the customization entity set of described configuration file;
2.5) determine the overall unique number of concentrated each complex data type of complex data type of described configuration file;
2.6) whether complex data type is set needs flattening to process, if needing flattening processes, read respectively complex data type and concentrate the overall unique number of each complex data type, then use the mode of recurrence that each attribute information in the structure data of complex data type is decomposed into transparent simple data type, turn next step; If do not need flattening to process, directly turn next step;
2.7) according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set three's configuration information, set up the mapping relations between Situation-symbol, customization entity class, customization entity three, determine the attribute information that comprises color, position, size, direction of Situation-symbol;
2.8) mapping relations between described Situation-symbol, customization entity class, customization entity three are kept in buffer memory.
3. the general artificial social product situation display packing based on data stream mapping according to claim 2, is characterized in that: a plurality of artificial social products model in described step 3) comprises agent model, environmental model, accident model and controls intervention model.
4. the general artificial social product situation display packing based on data stream mapping according to claim 3, is characterized in that, the detailed step of described step 6) is as follows:
6.1) chart element that initialization shows for data;
6.2) according to the packet config set of described configuration file and utilize the assigned address of memory-mapped mechanism from internal memory to obtain situation statistics bag;
6.3) judge whether to exist situation statistics bag, if exist, go to step 6.4),, if do not exist, return and re-execute step 6.2);
6.4) according to situation statistics bag content refresh data plot, according to new Data Update data plot in situation statistics bag for described data display set;
6.5) judge whether to receive the order of end data demonstration, if received, end data shows, otherwise goes to step 6.2).
5. the general artificial social product situation display packing based on data stream mapping according to claim 4, is characterized in that, the detailed step of described step 7) is as follows:
7.1) pre-loaded situation shows base map, and described situation shows that base map comprises the background information that situation shows needs;
7.2) utilize the assigned address of memory-mapped mechanism from internal memory to obtain Situation-symbol bag;
7.3) judge whether to exist Situation-symbol bag, if exist, go to step 7.4),, if do not exist, return and re-execute step 7.2);
7.4) read the Situation-symbol bag obtaining, according to the mapping relations between Situation-symbol and customization entity in the mapping relations between described Situation-symbol, customization entity class, customization entity three, and the mapping relations between Situation-symbol and customization entity class, by the attribute of described customization entity and the customization entity class situation demonstration class of initialization customization entity and customization Situation-symbol that entity class shines upon respectively, thereby determine new color, position, size, the direction of Situation-symbol attribute information, thereby complete in situation, show on base map and refresh Situation-symbol; Described situation shows that class refers to and the class of Situation-symbol binding, and wherein the attribute in situation demonstration class has determined the relevant manifestation mode of Situation-symbol;
7.5) data that check described configuration file show the situation of centralized configuration shows whether need to show statistics, if situation shows, need to show statistics, and goes to step 7.6), otherwise go to step 7.7);
7.6) utilize the new data of described situation statistics bag to show in situation the demonstration that base map upper Pleistocene series counts;
7.7) judge whether to receive the order that finishes situation demonstration, if received, finish situation and show, otherwise go to step 7.3);
7.8) finishing situation shows.
6. a general artificial social product situation display device of shining upon based on data stream, is characterized in that comprising:
Experiment with computing administration module, for initial configuration file, described configuration file comprises Situation-symbol collection, customization entity class set, customization entity set, complex data type collection, data display set and packet config set, described Situation-symbol collection is comprised of multiple Situation-symbol, described Situation-symbol is that situation shows relevant symbol and picture, described customization entity class set is comprised of a plurality of customization entity class, the description that described customization entity class comprises entity class and attribute thereof, mapping relations between entity class and situation displaying symbol, described customization entity set is comprised of a plurality of customization entities, described customization entity comprises the mapping relations to the description of entity and attribute thereof and entity attribute and corresponding situation displaying symbol, described complex data type collection is comprised of Various Complex data type, described complex data type comprise for resolve from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form simple data type to the mapping relations the structure data of complex data type, described data display set comprises the definition of chart, whether the display type of intelligent body statistics of attributes information and situation show and need to show statistics, the definition of described chart comprises subtype and data type, described packet config set comprises the data exchange standard that obtains the opaque data stream existing with memory block form from artificial social product's parallel computation engine, assigned address from internal memory reads situation packet, assigned address from internal memory reads the data exchange standard of Situation-symbol bag and situation statistics bag,
Show module is set, for configuring situation display mode according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set, complex data type collection, according to the data display set configuration data display mode of described configuration file;
Artificial social product's evolution module, under the support of artificial social product's parallel computation engine, drives described a plurality of artificial social products model to interact and promotes the evolution of artificial social product;
Data reception module, process for the evolution in artificial social product, from artificial social product's parallel computation engine, obtain the opaque data stream existing with memory block form, according to the packet config set of described configuration file, described opaque data stream is resolved and obtained situation data, the data type of chart definition in the data display set of described configuration file is added up and obtained statistics, the situation data that parsing is obtained and statistics packing generate situation packet, finally situation packet are mapped to the assigned address in internal memory;
Data processing module, be used for according to the packet config set of described configuration file and utilize memory-mapped mechanism read situation packet and resolve from the assigned address of internal memory, the data that parsing is obtained arrange the mapping ensemblen of preserving in module and are associated with Situation-symbol and form Situation-symbol bag according to demonstration, extract customization data and form situation statistics bag, described Situation-symbol bag, situation statistics bag are mapped to the assigned address in internal memory; Difference calling data display module and situation display module;
Data disaply moudle, be used for according to the packet config set of described configuration file and utilize memory-mapped mechanism to read situation statistics bag from the assigned address of internal memory, situation display mode based on described configuration file configuration, according to the graphical diagrams display data of the Data Update pattern using configuration of described situation statistics bag;
Situation display module, for utilizing memory-mapped mechanism to read Situation-symbol bag from the assigned address of internal memory, according to the situation display mode of configuration, utilize described Situation-symbol to wrap on situation demonstration base map and refresh Situation-symbol, according to described data, show that the display type of the intelligent body statistics of attributes information of centralized configuration utilizes the new data of described situation statistics bag to count at situation demonstration base map upper Pleistocene series simultaneously.
7. the general artificial social product situation display device based on data stream mapping according to claim 6, is characterized in that, described demonstration arranges module and comprises:
Data plot arranges submodule, the definition of data display set chart that is used for reading described configuration file is, the display type of intelligent body statistics of attributes information, according to the display type configuration data display mode of described definition, intelligent body statistics of attributes information, the definition of described chart comprises subtype and the data type of chart, described subtype comprises histogram, broken line graph and pie chart, and the display type of described intelligent body statistics of attributes information comprises dot-density plot and bubble diagram;
Situation-symbol numbering submodule, for determining the overall unique number of concentrated each Situation-symbol of Situation-symbol of described configuration file;
Customization entity class numbering submodule, for determining the overall unique number of concentrated each the customization entity class of customization entity class of described configuration file;
Customization entity numbering submodule, for determining the overall unique number of each customization entity of customization entity set of described configuration file;
Complex data type numbering submodule, for determining the overall unique number of concentrated each complex data type of complex data type of described configuration file;
Submodule is processed in complex data type flattening, whether be used for arranging complex data type needs flattening to process, if needing flattening processes, read respectively complex data type and concentrate the overall unique number of each complex data type, then use the mode of recurrence that each attribute information in the structure data of complex data type is decomposed into transparent simple data type, and call situation and show submodule is set; If do not need flattening to process, directly call situation demonstration submodule is set;
Situation demonstration arranges submodule, for setting up the mapping relations between Situation-symbol, customization entity class, customization entity three according to the Situation-symbol collection of described configuration file, customization entity class set, customization entity set three's configuration information, determine the attribute information that comprises color, position, size, direction of Situation-symbol;
Mapping relations are preserved submodule, for the mapping relations between described Situation-symbol, customization entity class, customization entity three are kept to buffer memory.
8. the general artificial social product situation display device based on data stream mapping according to claim 7, is characterized in that: the artificial social product's model in described artificial social product evolution module comprises agent model, environmental model, accident model and controls intervention model.
9. the general artificial social product situation display device based on data stream mapping according to claim 8, is characterized in that, described data disaply moudle comprises:
Chart element initialization submodule, the chart element showing for data for initialization;
Situation statistics bag obtains submodule, for according to the packet config set of described configuration file and utilize memory-mapped mechanism to obtain situation statistics bag from the assigned address of internal memory;
, there is situation statistics bag for judging whether in situation statistics bag judgement submodule, if exist calling data figure to refresh submodule, if do not exist, returns to re invocation situation statistics bag and obtain submodule;
Data plot refreshes submodule, for according to situation statistics bag content refresh data plot, according to new Data Update data plot in situation statistics bag for described data display set;
Data show to finish judgement submodule, and for the order that judges whether to receive that end data shows, if received, end data shows, otherwise call situation statistics bag, obtains submodule.
10. the general artificial social product situation display device based on data stream mapping according to claim 9, is characterized in that, described situation display module comprises:
Situation shows that base map loads submodule, for pre-loaded situation, shows base map, and described situation shows that base map comprises the background information that situation shows needs;
Situation-symbol bag obtains submodule, for utilizing memory-mapped mechanism to obtain Situation-symbol bag from the assigned address of internal memory;
Situation-symbol bag judgement submodule, for judging whether to exist Situation-symbol bag, calls Situation-symbol if exist and refreshes submodule, if do not exist, returns to re invocation Situation-symbol bag and obtains submodule;
Situation-symbol refreshes submodule, for reading the Situation-symbol bag obtaining, according to described Situation-symbol, customization entity class, mapping relations in mapping relations between customization entity three between Situation-symbol and customization entity, and the mapping relations between Situation-symbol and customization entity class, by the attribute of described customization entity and the customization entity class situation demonstration class of initialization customization entity and customization Situation-symbol that entity class shines upon respectively, thereby determine the new color of Situation-symbol attribute information, position, size, direction, thereby complete in situation, show on base map and refresh Situation-symbol, described situation shows that class refers to and the class of Situation-symbol binding, and wherein the attribute in situation demonstration class has determined the relevant manifestation mode of Situation-symbol,
The situation judgement submodule that shows statistics, for checking that the data of described configuration file show the situation of centralized configuration shows whether need to show statistics, if showing, situation need to show statistics, call statistics and upgrade submodule, otherwise call situation, show end judgement submodule;
Statistics is upgraded submodule, for utilizing the new data of described situation statistics bag to show in situation the demonstration that base map upper Pleistocene series counts;
Situation shows end judgement submodule, for judging whether to receive, finishes the order that situation shows, if received, finishes situation and shows, otherwise call Situation-symbol bag, judges submodule.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410013947.6A CN103699761B (en) | 2014-01-13 | 2014-01-13 | Based on general artificial social product battle state display method and the device of data stream |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410013947.6A CN103699761B (en) | 2014-01-13 | 2014-01-13 | Based on general artificial social product battle state display method and the device of data stream |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103699761A true CN103699761A (en) | 2014-04-02 |
CN103699761B CN103699761B (en) | 2015-08-05 |
Family
ID=50361288
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410013947.6A Expired - Fee Related CN103699761B (en) | 2014-01-13 | 2014-01-13 | Based on general artificial social product battle state display method and the device of data stream |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103699761B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109241507A (en) * | 2018-07-27 | 2019-01-18 | 阿里巴巴集团控股有限公司 | A kind of chart generation method and device, a kind of calculating equipment and storage medium |
CN109587153A (en) * | 2018-12-14 | 2019-04-05 | 中国人民解放军国防科技大学 | General ecological safety monitoring data acquisition method and device based on data flow customization |
CN112541605A (en) * | 2019-09-20 | 2021-03-23 | 中国船舶工业系统工程研究院 | Automatic design method of experimental factors for instant situation deduction |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090028214A (en) * | 2007-09-14 | 2009-03-18 | 채구석 | The supporting method of a dynamic advert creation and corporate communication linked service by multiuser which has a organic learning and resource sharing in oline strategy simulation game environment |
CN102819954A (en) * | 2012-08-28 | 2012-12-12 | 南京大学 | Traffic region dynamic map monitoring and predicating system |
CN103455705A (en) * | 2013-05-24 | 2013-12-18 | 中国科学院自动化研究所 | Analysis and prediction system for cooperative correlative tracking and global situation of network social events |
-
2014
- 2014-01-13 CN CN201410013947.6A patent/CN103699761B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090028214A (en) * | 2007-09-14 | 2009-03-18 | 채구석 | The supporting method of a dynamic advert creation and corporate communication linked service by multiuser which has a organic learning and resource sharing in oline strategy simulation game environment |
CN102819954A (en) * | 2012-08-28 | 2012-12-12 | 南京大学 | Traffic region dynamic map monitoring and predicating system |
CN103455705A (en) * | 2013-05-24 | 2013-12-18 | 中国科学院自动化研究所 | Analysis and prediction system for cooperative correlative tracking and global situation of network social events |
Non-Patent Citations (1)
Title |
---|
陈彬 等: "多范式人工社会建模与多智能体仿真平台框架", 《系统仿真学报》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109241507A (en) * | 2018-07-27 | 2019-01-18 | 阿里巴巴集团控股有限公司 | A kind of chart generation method and device, a kind of calculating equipment and storage medium |
CN109587153A (en) * | 2018-12-14 | 2019-04-05 | 中国人民解放军国防科技大学 | General ecological safety monitoring data acquisition method and device based on data flow customization |
CN109587153B (en) * | 2018-12-14 | 2021-01-15 | 中国人民解放军国防科技大学 | General ecological safety monitoring data acquisition method and device based on data flow customization |
CN112541605A (en) * | 2019-09-20 | 2021-03-23 | 中国船舶工业系统工程研究院 | Automatic design method of experimental factors for instant situation deduction |
Also Published As
Publication number | Publication date |
---|---|
CN103699761B (en) | 2015-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102800038B (en) | Wisdom education E cartoon system platform based on Internet of Things and cloud computing | |
CN105917384A (en) | Techniques to manage map information illustrating a transition between views | |
CN110503220A (en) | Cource arrangement method, device, electronic equipment and storage medium | |
CN103699761B (en) | Based on general artificial social product battle state display method and the device of data stream | |
CN107369342A (en) | Learning system benefits intelligence | |
CN103942092B (en) | A kind of HLA synergy emulation methods for supporting LabView graphic programmings | |
CN109599000A (en) | A kind of teaching and demo system based on MES | |
CN106898177A (en) | A kind of single chip computer experiment hardware online simulation and automatic evaluation method | |
Huang et al. | Research on Smart campus based on the internet of things and virtual reality | |
Taylor et al. | Stochasticity and the limits to confidence when estimating R0 of Ebola and other emerging infectious diseases | |
Zhang et al. | Modeling spatial contacts for epidemic prediction in a large-scale artificial city | |
CN105869086A (en) | Computer network simulation training teaching system | |
CN106933712A (en) | Networking remote test system and method based on B/S frameworks | |
CN107483284A (en) | The method of testing and device of the network equipment | |
CN106781827A (en) | Ship-handling training system and method | |
CN103812730B (en) | A kind of multiple cell TTCN Conformance Testing Environment systems | |
CN106897120A (en) | Double-deck dynamic Distributed Simulation Platform | |
Schroeder et al. | Towards reusable building blocks to develop COVID-19 simulation models | |
Getz et al. | Using nova to construct agent-based models for epidemiological teaching and research | |
CN106297452A (en) | Motion education plateform system | |
CN109271118A (en) | Multiple users use the computer installation and its operation method of an ontology | |
Xiao et al. | Electric locomotive electrical control training based on virtual reality technology | |
CN113706724A (en) | Referral supervision method, device, equipment and storage medium based on artificial intelligence | |
CN207624231U (en) | Mobile embedded teaching experiment system | |
CN205354427U (en) | Prevent that people is because of training set STAR machine |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20150805 Termination date: 20190113 |