CN105528350B - Complex scene and background data mapping synchronization method and device based on unity3D platform - Google Patents

Complex scene and background data mapping synchronization method and device based on unity3D platform Download PDF

Info

Publication number
CN105528350B
CN105528350B CN201410513498.1A CN201410513498A CN105528350B CN 105528350 B CN105528350 B CN 105528350B CN 201410513498 A CN201410513498 A CN 201410513498A CN 105528350 B CN105528350 B CN 105528350B
Authority
CN
China
Prior art keywords
data
scene
background data
background
real
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410513498.1A
Other languages
Chinese (zh)
Other versions
CN105528350A (en
Inventor
王俊
黄河
黄耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Liwei Zhilian Technology Co Ltd
Original Assignee
Shenzhen Liwei Zhilian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Liwei Zhilian Technology Co Ltd filed Critical Shenzhen Liwei Zhilian Technology Co Ltd
Priority to CN201410513498.1A priority Critical patent/CN105528350B/en
Publication of CN105528350A publication Critical patent/CN105528350A/en
Application granted granted Critical
Publication of CN105528350B publication Critical patent/CN105528350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a complex scene and background data mapping synchronization method and device based on a unity3D platform, wherein the method comprises the following steps: determining a unique identity ID for the background data object, and establishing a corresponding memory data object for storing the game object attribute, the background data entity mapping association information and the real-time update data of the game object in the unity3d scene for each game object in the unity3d scene; traversing memory data objects corresponding to at least part of game objects in the unity3d scene, acquiring background data object identification IDs corresponding to the attributes of the game objects needing to be updated, and requesting real-time data from a background according to the background data object identification IDs; and analyzing the acquired real-time data and then updating the real-time data into the corresponding memory data object. By adopting the method and the device, the complex scene and the background data can be mapped and synchronized in unity3D, the synchronization rate of the complex scene and the background data in unity3D can be increased, and the usability and the reliability are improved.

Description

Complex scene and background data mapping synchronization method and device based on unity3D platform
Technical Field
The invention belongs to the technical field of information visualization, and particularly relates to a complex scene and background data mapping synchronization method and device based on a unity3D platform.
Background
With the continuous development and progress of the information visualization technology, the three-dimensional visualization gradually embodies the advantages of the three-dimensional visualization compared with the two-dimensional display, and the object can be more intuitively and vividly displayed through the three-dimensional visualization, so that the user can more accurately grasp the whole situation.
Currently, three-dimensional visualization technology is mature, a plurality of three-dimensional tools such as 3D Max, Maya, Blender and the like are available for selection at present, and the software focuses on the establishment of a model, which has rich functions in scene making and animation making.
The Unity3D is a software specially used for making game scenes, building designs and animation displays, only the most basic solid, sphere, plane, cylinder and the like are embedded in the model, and the made model needs to be imported from the outside in practical application. The strength of Unity3D lies in the creation of scenes, and thus is widely applicable to three-dimensional rooms, such as those requiring various interactions, scene animation, and data presentation.
Each object in the game is a game object. The game objects do nothing themselves, they have proprietary properties, which become a character, an environment, or a special effect. The game object is a container for other components, such as islands that may hold a light map or different portions of a physically driven cart. According to the nature of the game object to be created, different components need to be added and combined into the game object, and different functions can be completed.
The data objects corresponding to the game object attributes have different business modes, one type of data objects are only used for synchronously updating the attributes of the game objects in real time, the other type of data objects are used for loading or storing data in the interactive operation with the user, and the data objects are effectively mapped into background data when the required functions are stably and effectively completed.
However, in the Unity3d scene, when data is presented through game objects, a large number of data objects (hundreds, thousands or even more) need to be presented or associated in a complex scene, so how to map the scene objects to the background data objects and update the display in real time is a technical problem to be solved.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a mapping synchronization method and apparatus for a complex scene and background data based on a unity3D platform.
The embodiment of the invention is realized by adopting the following technical scheme:
a complex scene and background data mapping synchronization method based on a unity3D platform comprises the following steps:
determining a unique identity ID for the background data object, and establishing a corresponding memory data object for storing the game object attribute, the background data entity mapping association information and the real-time update data of the game object in the unity3d scene for each game object in the unity3d scene;
traversing memory data objects corresponding to at least part of game objects in the unity3d scene, acquiring background data object identification IDs corresponding to the attributes of the game objects needing to be updated, and requesting real-time data from a background according to the background data object identification IDs;
and analyzing the acquired real-time data and then updating the real-time data into the corresponding memory data object.
Preferably, the background data service is implemented by determining a unique identification ID for a background data object, and the background data service includes:
providing a navigation query interface for realizing data structure query, and querying data information of a designated node when the navigation query interface is called;
providing a storage and reading interface, and inquiring or storing mapping associated information of the background data entity when the storage and reading interface is called;
and providing a real-time data interface, and inquiring data information required to be updated in the scene when the real-time data interface is called.
Preferably, the game objects in the unity3D scene are unityengine.
Preferably, the acquired real-time data is loaded asynchronously.
Preferably, after the acquired real-time data is analyzed, the analyzed data is updated to the corresponding memory data object according to a service script provided in advance.
A unit 3D platform-based complex scene and background data mapping synchronization device comprises:
the building module is used for building a corresponding memory data object for storing game object attributes, background data entity mapping association information and real-time update data of the game objects in the unity3d scene for each game object in the unity3d scene, wherein the background data object is pre-configured with a unique identification ID;
the request module is used for traversing at least part of memory data objects corresponding to the game objects in the unity3d scene, acquiring background data object identification IDs corresponding to the attributes of the game objects needing to be updated, and requesting real-time data from a background according to the background data object identification IDs;
and the synchronization module is used for analyzing the acquired real-time data and then updating the real-time data into the corresponding memory data object.
Preferably, the background data object is preconfigured with a unique identification ID to implement a background data service, wherein the background data service includes:
providing a navigation query interface for realizing data structure query, and querying data information of a designated node when the navigation query interface is called;
providing a storage and reading interface, and inquiring or storing mapping associated information of the background data entity when the storage and reading interface is called;
and providing a real-time data interface, and inquiring data information required to be updated in the scene when the real-time data interface is called.
Preferably, the game objects in the unity3D scene are unityengine.
Preferably, the synchronization module asynchronously loads and parses the acquired real-time data.
Preferably, after analyzing the acquired real-time data, the synchronization module updates the analyzed data to the corresponding memory data object according to a service script provided in advance.
Through the technical scheme, the invention relates to how to map and synchronize the complex scene and the background data in the unity3D platform, wherein the complex scene generally refers to that the number of attributes needing to be mapped in association with the background data in the scene is large, specifically, more than hundreds or thousands of data attributes in a single scene, and moreover, different attribute service modes cannot be processed uniformly, and the attribute service modes can be divided into real-time presentation attributes, default attributes, variable attributes and the like. Presenting the large amount of data in unity3D requires the method and management structure of the system. For example, thousands of data attributes are associated with a scene and need to be updated in due time and be able to complete user interaction. In order to solve the problem, the invention provides a method for mapping and synchronizing a complex scene and background data in unity3D and combining asynchronous data loading, which can realize mapping and synchronizing the complex scene and the background data in unity3D, can improve the synchronization rate of the complex scene and the background data in unity3D, and improve the usability and reliability.
Drawings
Fig. 1 is a schematic system structure diagram of a complex scene and background data mapping synchronization method based on a unity3D platform according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a complex scene and background data mapping synchronization method based on a unity3D platform according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a specific implementation process of a complex scene and background data mapping synchronization method based on a unity3D platform according to an embodiment of the present invention.
The object of the present invention, its functional characteristics and advantageous effects will be further described with reference to the following embodiments and drawings.
Detailed Description
The technical solutions of the present invention are further described in detail below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and can implement the present invention, but the embodiments are not limited to the present invention.
As shown in fig. 1 and fig. 2, the complex scene and background data mapping synchronization method based on the unity3D platform according to the embodiment of the present invention includes:
s10, determining a unique identity ID for the background data object, and establishing a corresponding memory data object for storing game object attributes, background data entity mapping association information and real-time update data of the game object in the unity3d scene for each game object in the unity3d scene;
s20, traversing memory data objects corresponding to at least part of game objects in the unity3d scene, acquiring background data object identification IDs corresponding to the attributes of the game objects needing to be updated, and requesting real-time data from a background according to the background data object identification IDs;
and S30, analyzing the acquired real-time data and then updating the real-time data into the corresponding memory data object.
In detail, the complex scene and background data mapping synchronization method based on the unity3D platform comprises the following specific steps:
and step A, determining a unique identity ID for the background data object to realize background data service. In the unity3D scenario, the attributes of the object are updated by requesting the corresponding data object, which is uniquely identified by an ID.
And B, establishing a corresponding memory data object for the game object in the unity3D scene, and storing the mapping association information of the game object attribute and the background data entity in the scene and the real-time data for updating the current object through the memory object.
And step C, storing and loading the mapping binding information of the game objects in the unity3D scene, the attributes of the game objects and the background data.
And D, updating and storing the game objects and the attributes thereof in the unity3D scene into the corresponding memory data objects in real time, and writing scripts to update the attributes of the game objects from the corresponding memory data objects.
And E, real-time interaction of the game object and the attributes thereof in the unity3D scene, wherein in the real-time running process, the game object responds to the operation of a user to acquire other related attributes, or modifies, saves, deletes and adds related attribute information to a memory data object corresponding to the game object, and updates and saves the memory data object to the background database through the step C.
In this embodiment, the background service uses Webservice to provide data request storage change operation, and in the unit 3D scenario, a Soap or POST mode is used to request Webservice service, where the Webservice data is XML-type data.
In a preferred embodiment, the background service provides a data request for saving and changing operations by using Webservice, the Webservice can be conveniently accessed in Unity3d, the web service can obtain related information such as a background data structure, and the related configuration information can also be submitted to a background database through the web service.
In the Unity3D scene, a Soap or POST mode is used for requesting the Webservice, a Soap mode is used for directly accessing background data in a non-Web client, and a POST mode is used in a Web client due to the limitation of Unity security.
The load data obtained by the Flex control in the unity3D scene from the WEB server is XML type data. This is because XML-type data can express tree-structured and list-structured data well.
Game objects in the unity3D scene are the unityengine game object, which is the most important object, each object in the game is a game object, which is a container that can hold the islands of a light map or different parts of a physically driven cart. According to the property of the object to be created, different components are added to be combined in the game object to complete different functions.
The script attached to the game object in the unity3D scene is in the language of C # or Javascript.
The loading data acquired by the request Webservice service is asynchronously loaded, and generally, the loading of a large data volume is slow, so that the loading speed is effectively increased by adopting an asynchronous loading mode for the loading of the large data volume.
In the step B, considering that different attribute service modes of different game objects cannot be processed uniformly, the attribute service modes may be specifically classified into real-time attribute presentation, default attribute, variable attribute, and the like, so that data mapping and binding operations need to be treated differently.
In the above solution, the attributes of the game object may be variables and methods in the game script, or may be other operable variables or methods.
Fig. 3 is a schematic diagram of a complex scene and background data mapping synchronization method based on a unity3D platform according to an embodiment of the present invention, and the detailed implementation process of the method according to the embodiment of the present invention is described in detail below with reference to fig. 3.
The first step is as follows: and determining a unique identity ID for the background data object to realize background data service.
The data service needs to implement a navigation query interface of the data structure, and when the interface is called, the data information of a specified node can be queried.
The data service needs to implement a save-read interface, and when the interface is called, the scene mapping relationship information can be inquired or saved.
The data service needs to implement a real-time data interface, and when the interface is called, data information required to be updated in a scene can be inquired.
The second step is that: memory data objects are created for game objects in the unity3d scene for storing mapping and real-time data information.
Each game object has an in-memory data object associated with it, in which all the attribute information of the game object is recorded. And analyzing and storing the acquired XML content into the data object by acquiring the mapping relation from the background. New data is parsed and updated into the data object by the polling service. The game object script of the unity3d scene completes the updated rendering by reading the attributes in the data object.
The third step: and establishing a corresponding memory data object for the game object in the unity3D scene, and writing a service script for the game object in the unity3d scene.
And updating the state attribute of the game object in the service script, and realizing the processing response to the user operation in the service script.
The fourth step: and requesting and updating real-time data information.
And traversing data objects corresponding to all game objects in the scene, acquiring an object mark bound by the attribute to be updated, and requesting real-time data from the background in an XML format.
And analyzing the received real-time data, updating the real-time data into the corresponding game object, and repeating the fourth step to continuously update and display the real-time data.
After the mapping and synchronization function of the complex scene and the background data is completed, the unity3d scene is loaded with and displays a large amount of background data.
Correspondingly, the embodiment of the invention also provides a complex scene and background data mapping synchronization device based on the unity3D platform, which comprises:
the building module is used for building a corresponding memory data object for storing game object attributes, background data entity mapping association information and real-time update data of the game objects in the unity3d scene for each game object in the unity3d scene, wherein the background data object is pre-configured with a unique identification ID;
the request module is used for traversing at least part of memory data objects corresponding to the game objects in the unity3d scene, acquiring background data object identification IDs corresponding to the attributes of the game objects needing to be updated, and requesting real-time data from a background according to the background data object identification IDs;
and the synchronization module is used for analyzing the acquired real-time data and then updating the real-time data into the corresponding memory data object.
Preferably, the background data object is preconfigured with a unique identification ID to implement a background data service, wherein the background data service includes:
providing a navigation query interface for realizing data structure query, and querying data information of a designated node when the navigation query interface is called;
providing a storage and reading interface, and inquiring or storing mapping associated information of the background data entity when the storage and reading interface is called;
and providing a real-time data interface, and inquiring data information required to be updated in the scene when the real-time data interface is called.
Preferably, the game objects in the unity3D scene are unityengine.
Preferably, the synchronization module asynchronously loads and parses the acquired real-time data.
Preferably, after analyzing the acquired real-time data, the synchronization module updates the analyzed data to the corresponding memory data object according to a service script provided in advance.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A complex scene and background data mapping synchronization method based on a unity3D platform is characterized by comprising the following steps:
determining a unique identity ID for the background data object, and establishing a corresponding memory data object for storing the game object attribute, the background data entity mapping association information and the real-time update data of the game object in the unity3d scene for each game object in the unity3d scene;
traversing memory data objects corresponding to at least part of game objects in the unity3d scene, acquiring background data object identification IDs corresponding to the attributes of the game objects needing to be updated, and requesting real-time data from a background according to the background data object identification IDs;
and analyzing the acquired real-time data and then updating the real-time data into the corresponding memory data object.
2. The unit 3D platform-based complex scene and background data mapping synchronization method according to claim 1, wherein background data services are implemented by determining a unique identity ID for a background data object, and the background data services include:
providing a navigation query interface for realizing data structure query, and querying data information of a designated node when the navigation query interface is called;
providing a storage and reading interface, and inquiring or storing mapping associated information of the background data entity when the storage and reading interface is called;
and providing a real-time data interface, and inquiring data information required to be updated in the scene when the real-time data interface is called.
3. The unit 3D platform-based complex scene and background data mapping synchronization method according to claim 1, wherein the game objects in the unit 3D scene are unityengine.
4. The unit 3D platform-based complex scene and background data mapping synchronization method according to claim 1, wherein the acquired real-time data is loaded asynchronously.
5. The unit 3D platform-based complex scene and background data mapping synchronization method according to claim 1, wherein after parsing the acquired real-time data, updating the parsed data into the corresponding in-memory data object according to a pre-provided service script.
6. A unit 3D platform-based device for mapping and synchronizing complex scenes and background data, comprising:
the building module is used for building a corresponding memory data object for storing game object attributes, background data entity mapping association information and real-time update data of the game objects in the unity3d scene for each game object in the unity3d scene, wherein the background data object is pre-configured with a unique identification ID;
the request module is used for traversing at least part of memory data objects corresponding to the game objects in the unity3d scene, acquiring background data object identification IDs corresponding to the attributes of the game objects needing to be updated, and requesting real-time data from a background according to the background data object identification IDs;
and the synchronization module is used for analyzing the acquired real-time data and then updating the real-time data into the corresponding memory data object.
7. The unit 3D platform-based complex scene and background data mapping synchronization device of claim 6, wherein background data objects are pre-configured with a unique identification ID to implement background data services, wherein the background data services include:
providing a navigation query interface for realizing data structure query, and querying data information of a designated node when the navigation query interface is called;
providing a storage and reading interface, and inquiring or storing mapping associated information of the background data entity when the storage and reading interface is called;
and providing a real-time data interface, and inquiring data information required to be updated in the scene when the real-time data interface is called.
8. The unit 3D platform-based complex scene and background data mapping synchronization device according to claim 6, wherein the game objects in the unit 3D scene are UnityEngine.
9. The unit 3D platform-based complex scene and background data mapping synchronization device according to claim 6, wherein the synchronization module asynchronously loads and parses the acquired real-time data.
10. The unit 3D platform-based complex scene and background data mapping synchronization device as claimed in claim 6, wherein the synchronization module parses the acquired real-time data and updates the parsed data into the corresponding in-memory data object according to a pre-provided service script.
CN201410513498.1A 2014-09-29 2014-09-29 Complex scene and background data mapping synchronization method and device based on unity3D platform Active CN105528350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410513498.1A CN105528350B (en) 2014-09-29 2014-09-29 Complex scene and background data mapping synchronization method and device based on unity3D platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410513498.1A CN105528350B (en) 2014-09-29 2014-09-29 Complex scene and background data mapping synchronization method and device based on unity3D platform

Publications (2)

Publication Number Publication Date
CN105528350A CN105528350A (en) 2016-04-27
CN105528350B true CN105528350B (en) 2019-12-20

Family

ID=55770582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410513498.1A Active CN105528350B (en) 2014-09-29 2014-09-29 Complex scene and background data mapping synchronization method and device based on unity3D platform

Country Status (1)

Country Link
CN (1) CN105528350B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113730920B (en) * 2021-09-15 2023-10-20 福建天晴在线互动科技有限公司 Method and system for presetting component synchronization attribute
CN115576952B (en) * 2022-11-14 2023-05-26 润芯微科技(江苏)有限公司 Method for realizing vehicle-mounted android platform communication structure based on Unreal
CN116319094B (en) * 2023-05-19 2023-08-11 北京安帝科技有限公司 Data safety transmission method, computer equipment and medium based on tobacco industry

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003038843A (en) * 2001-08-01 2003-02-12 Konami Co Ltd Game apparatus and game controlling method
CN102012906A (en) * 2010-10-27 2011-04-13 南京聚社数字科技有限公司 Three-dimensional scene management platform based on SaaS architecture and editing and browsing method
CN103092626A (en) * 2013-02-04 2013-05-08 福州大学 Rich internet application method based on Flex and web three-dimensional (3D) technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003038843A (en) * 2001-08-01 2003-02-12 Konami Co Ltd Game apparatus and game controlling method
CN102012906A (en) * 2010-10-27 2011-04-13 南京聚社数字科技有限公司 Three-dimensional scene management platform based on SaaS architecture and editing and browsing method
CN103092626A (en) * 2013-02-04 2013-05-08 福州大学 Rich internet application method based on Flex and web three-dimensional (3D) technology

Also Published As

Publication number Publication date
CN105528350A (en) 2016-04-27

Similar Documents

Publication Publication Date Title
US10868866B2 (en) Cloud storage methods and systems
US9720658B2 (en) Application creation method and apparatus
KR102185864B1 (en) Server-side rendering method and system of native content for presentation
US10048948B2 (en) Optimized retrieval of custom string resources
US10127206B2 (en) Dynamic column groups in excel
EP3399721B1 (en) Interface data displaying method and device
CN106980669B (en) A kind of storage of data, acquisition methods and device
CN106776012B (en) Virtual resource management method and system
US9519701B2 (en) Generating information models in an in-memory database system
US10805115B2 (en) Internet of things (IoT) gateway
US11138216B2 (en) Automatically invoked unified visualization interface
US10218803B2 (en) Integration of cloud services for consumption in cloud applications
US10970052B2 (en) System and method for enhancing component based development models with auto-wiring
CN104572084B (en) User interface generation and data distributing method, device in card business
CN109636301A (en) Workflow configuration method, system, terminal and the readable storage medium storing program for executing of financial business
CN105528350B (en) Complex scene and background data mapping synchronization method and device based on unity3D platform
CN103631578A (en) Data display method in power distribution network automated system
JP7366664B2 (en) Offline briefcase sync
CN106846431B (en) Unified Web graph drawing system supporting multiple expression forms
KR101446112B1 (en) Method and system for managing integration three dimension model
CN107357810B (en) A kind of method and system for landing page for exporting special topic
CN102129468B (en) Method for displaying customizable cluster state
CN107247785A (en) A kind of static readonly map file generation method and device
CN107018038A (en) Monitoring data querying method and server
US20180130240A1 (en) Displaying visualization images on portable electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518057 Energy Storage Building, 3099 South Keyuan Road, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Liwei Zhilian Technology Co., Ltd.

Address before: 518057 Nanshan District science and technology zone, Guangdong, Zhejiang Province, South Road, building W1-A, the first floor of the building, building two

Applicant before: Shenzhen ZTE NetView Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant