CN109783112A - The exchange method of virtual environment and physical hardware, device and storage medium - Google Patents
The exchange method of virtual environment and physical hardware, device and storage medium Download PDFInfo
- Publication number
- CN109783112A CN109783112A CN201711117467.4A CN201711117467A CN109783112A CN 109783112 A CN109783112 A CN 109783112A CN 201711117467 A CN201711117467 A CN 201711117467A CN 109783112 A CN109783112 A CN 109783112A
- Authority
- CN
- China
- Prior art keywords
- role
- physical hardware
- status information
- virtual environment
- attribute
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Abstract
Present invention discloses a kind of exchange method for realizing virtual environment and physical hardware, device and computer readable storage mediums.The described method includes: carrying out the load of physical hardware association role in virtual environment, physical hardware is by being associated with access of virtual environment with role;Attribute configuration is carried out to role and physical hardware, to obtain the attribute status information after attribute configuration;The synchronous storage of attribute status information is carried out between role and physical hardware;When either one is applied external change as both role and physical hardware, the synchronized update of attribute status information is carried out, so that not applying side's response external variation of the external change.Due to related role and physical hardware shared attribute status information between the two, so that the process control of physical hardware no longer needs individually to program, physical hardware and virtual environment are in a world together, so that can naturally be communicated between physical hardware and role, the interaction of customized the realization virtual environment and physical hardware of low threshold.
Description
Technical field
The present invention relates to computer application technology, in particular to a kind of side of interaction of virtual environment and physical hardware
Method, device and computer readable storage medium.
Background technique
With the continuous development of computer application, in the application program realized, in addition to providing various functions for user
Realization except, additionally it is possible to for user realize virtual environment, for user carry out virtual environment in role manipulation.For example, this
Virtual environment, can be the game of playing a game of user's entrance, and the role manipulated is the virtual role played a game in game.
The building of existing virtual environment is completion just have been developed before application issued, and can be realized
Interaction be also only limitted between the role in virtual environment.
On the one hand, can not it is customized realize virtual environment in role configuration, on the other hand, if necessary via virtual
Role realizes the interaction between physical hardware in environment, then while exploitation constructs this virtual environment, it has to be directed to
Physical hardware and individually develop programming, i.e. program involved in the realization of virtual environment and the physical hardware interacted with virtual environment
Control is that complicated communication issue is realized and needs to handle on this basis in programming respectively, realizes that threshold is high.
That is, the interaction between existing virtual environment and physical hardware, there is can not custom-configure role
And physical hardware, realize the high limitation of threshold.
Summary of the invention
Role and object can not be custom-configured in order to solve the interaction between virtual environment and physical hardware in the related technology
Manage hardware, and realize the high technical problem of threshold, the present invention provide a kind of exchange method for realizing virtual environment and physical hardware,
Device and computer readable storage medium.
A kind of exchange method of virtual environment and physical hardware, which comprises
The load of role associated by physical hardware in virtual environment is carried out, the physical hardware passes through the pass with the role
Couple into the virtual environment;
Attribute configuration is carried out to the role and the physical hardware, to obtain the letter of the attribute status after the attribute configuration
Breath, the attribute status information correspond respectively to the role and the physical hardware;
The synchronous storage of the attribute status information is carried out between the role and the physical hardware;
Wherein, when as both the role and the physical hardware, either one is applied external change, the institute of synchronous storage
It states attribute status information to carry out obtaining synchronized update, the Fang Xiang for not applying the external change is made by the synchronized update
Answer the external change.
A kind of interactive device of virtual environment and physical hardware, described device include:
Loading module, for carrying out the load of role associated by physical hardware in virtual environment, the physical hardware passes through
The virtual environment is accessed with being associated with for the role;
Configuration module, for carrying out attribute configuration to the role and the physical hardware, to obtain the attribute configuration
Attribute status information afterwards, the attribute status information correspond respectively to the role and the physical hardware;
Synchronous memory module, for carrying out the same of the attribute status information between the role and the physical hardware
Step storage;
Wherein, when as both the role and the physical hardware, either one is applied external change, the institute of synchronous storage
It states attribute status information and synchronizes update, make the side for not applying the external change respond institute by the synchronized update
State external change.
A kind of interactive device of virtual environment and physical hardware, comprising:
Processor;And
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is by the processing
Device realizes the exchange method of foregoing virtual environment and physical hardware when executing.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The exchange method of foregoing virtual environment and physical hardware is realized when row.
The technical solution that the embodiment of the present invention provides can include the following benefits:
The physical hardware and this physical hardware for being directed to customized realization virtual environment interaction are incorporated in virtual environment
Role, will be first to role associated by physical hardware in virtual environment, i.e. the role that is incorporated in virtual environment of physical hardware,
Execute load, physical hardware made to be able to access of virtual environment and with being associated with for role, then to role and physical hardware into
Row attribute configuration, to obtain the attribute status information for corresponding respectively to role and physical hardware after attribute configuration, finally in role
The synchronous storage of attribute status information is carried out between physical hardware, it thus can be in the attribute status information function of synchronous storage
Under, when either side is applied external change and causes attribute status information change in role and physical hardware, on the other hand then by
This variation is synchronized, and then responds applied external change, it is achieved that the interaction between virtual environment and physical hardware, and
And since related role and physical hardware are shared attribute status information therebetween, so that the program control of physical hardware
System no longer needs individually to program, and physical hardware and virtual environment are in a world together, so that between physical hardware and role
It can naturally communicate, thus the interaction of customized the realization virtual environment and physical hardware of low threshold.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
Invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and in specification together principle for explaining the present invention.
The schematic diagram of Fig. 1 implementation environment involved in the present invention shown according to an exemplary embodiment;
Fig. 2 is a kind of block diagram of device shown according to an exemplary embodiment;
Fig. 3 is the process of the exchange method of a kind of virtual environment shown according to an exemplary embodiment and physical hardware
Figure;
Fig. 4 is the process of a kind of virtual environment shown according to another exemplary embodiment and the exchange method of physical hardware
Figure;
Fig. 5 is according to the flow chart that the details of step 310 is described shown in Fig. 3 corresponding embodiment;
Fig. 6 is according to the flow chart that the details of step 350 is described shown in Fig. 3 corresponding embodiment;
Fig. 7 is according to the flow chart that the details of step 430 is described shown in Fig. 4 corresponding embodiment;
Fig. 8 is to face the simplified diagram that attribute status information is illustrated in active layer according to an exemplary embodiment;
Fig. 9 is the timing diagram of interaction between user shown according to an exemplary embodiment, role and physical hardware three;
Figure 10 is the block diagram of the interactive device of a kind of virtual environment shown according to an exemplary embodiment and physical hardware;
Figure 11 is the frame of a kind of virtual environment shown according to another exemplary embodiment and the interactive device of physical hardware
Figure;
Figure 12 is according to the block diagram that the details of loading module is described shown in Figure 10 corresponding embodiment.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is the schematic diagram of implementation environment involved in the present invention shown according to an exemplary embodiment.Involved by the present invention
And implementation environment, including control terminal 110 and physical hardware 130.
Control terminal 110 is for realizing the relevant control logic of virtual environment and virtual environment institute.Control terminal 110 can be
At least one of terminal devices such as computer terminal, smart phone, tablet computer.Physical hardware 130 is detached from control terminal 110
The entity hardware being present in physical world, for example, it may be the various electronic components such as sensor, are also possible to be assembled with each
Kind of sensor and the trolley encapsulated by certain shapes shell, it is any to be equipped with communication connection interface (e.g., WiFi communication connects
Mouthful) hardware device.
Entity hardware of the physical hardware 130 as necessary being in physical world, will be linked into constructed by control terminal 110
In virtual environment, on the one hand, object can be made by the external change that applies in virtual environment, such as the manipulation to role
Reason hardware 130 is perceived and is responded;On the other hand, it can also apply external change to physical hardware, so far make virtual environment
In role perceive and respond.
That is, virtual environment and physical hardware two-way interaction between the two will be realized in this implementation environment,
Physical hardware can be manipulated by the role in virtual environment, the role in virtual environment can be also manipulated by physical hardware.
Herein it should be noted that control terminal 110 be it is unique existing, and physical hardware 130 then can be one or
It is more than two, and can be single kind or a variety of types.
Fig. 2 is a kind of block diagram of device shown according to an exemplary embodiment.For example, device 200 can be above-mentioned reality
Apply the smart phone in environment.
Referring to Fig. 2, device 200 may include following one or more components: processing component 202, memory 204, power supply
Component 206, multimedia component 208, audio component 210, sensor module 214 and communication component 216.
The integrated operation of the usual control device 200 of processing component 202, such as with display, telephone call, data communication, phase
Machine operation and the associated operation of record operation etc..Processing component 202 may include one or more processors 218 to execute
Instruction, to complete all or part of the steps of following methods.In addition, processing component 202 may include one or more modules,
Convenient for the interaction between processing component 202 and other assemblies.For example, processing component 202 may include multi-media module, with convenient
Interaction between multimedia component 208 and processing component 202.
Memory 204 is configured as storing various types of data to support the operation in device 200.These data are shown
Example includes the instruction of any application or method for operating on the device 200.Memory 204 can be by any kind of
Volatibility or non-volatile memory device or their combination are realized, such as static random access memory (Static Random
Access Memory, abbreviation SRAM), electrically erasable programmable read-only memory (Electrically Erasable
Programmable Read-Only Memory, abbreviation EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable
Programmable Read Only Memory, abbreviation EPROM), programmable read only memory (Programmable Red-
Only Memory, abbreviation PROM), read-only memory (Read-Only Memory, abbreviation ROM), magnetic memory, flash
Device, disk or CD.One or more modules are also stored in memory 204, which is configured to by this
One or more processors 218 execute, to complete the whole or portion in any shown method of following Fig. 2, Fig. 3, Fig. 4 and Fig. 5
Step by step.
Power supply module 206 provides electric power for the various assemblies of device 200.Power supply module 206 may include power management system
System, one or more power supplys and other with for device 200 generate, manage, and distribute the associated component of electric power.
Multimedia component 208 includes the screen of one output interface of offer between described device 200 and user.One
In a little embodiments, screen may include liquid crystal display (Liquid Crystal Display, abbreviation LCD) and touch panel.
If screen includes touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touch panel
Including one or more touch sensors to sense the gesture on touch, slide, and touch panel.The touch sensor can be with
The boundary of a touch or slide action is not only sensed, but also detects duration associated with the touch or slide operation and pressure
Power.Screen can also include display of organic electroluminescence (Organic Light Emitting Display, abbreviation OLED).
Audio component 210 is configured as output and/or input audio signal.For example, audio component 210 includes a Mike
Wind (Microphone, abbreviation MIC), when device 200 is in operation mode, such as call model, logging mode and speech recognition mould
When formula, microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory
204 or via communication component 216 send.In some embodiments, audio component 210 further includes a loudspeaker, for exporting
Audio signal.
Sensor module 214 includes one or more sensors, and the state for providing various aspects for device 200 is commented
Estimate.For example, sensor module 214 can detecte the state that opens/closes of device 200, the relative positioning of component, sensor group
Part 214 can be with the position change of 200 1 components of detection device 200 or device and the temperature change of device 200.Some
In embodiment, which can also include Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 216 is configured to facilitate the communication of wired or wireless way between device 200 and other equipment.Device
200 can access the wireless network based on communication standard, such as WiFi (WIreless-Fidelity, Wireless Fidelity).Show at one
In example property embodiment, communication component 216 receives broadcast singal or broadcast from external broadcasting management system via broadcast channel
Relevant information.In one exemplary embodiment, the communication component 216 further includes near-field communication (Near Field
Communication, abbreviation NFC) module, to promote short range communication.For example, radio frequency identification (Radio can be based in NFC module
Frequency Identification, abbreviation RFID) technology, Infrared Data Association (Infrared Data
Association, abbreviation IrDA) technology, ultra wide band (Ultra Wideband, abbreviation UWB) technology, Bluetooth technology and other skills
Art is realized.
In the exemplary embodiment, device 200 can be by one or more application specific integrated circuit (Application
Specific Integrated Circuit, abbreviation ASIC), it is digital signal processor, digital signal processing appts, programmable
Logical device, field programmable gate array, controller, microcontroller, microprocessor or other electronic components are realized, for executing
Following methods.
Fig. 3 is the process of the exchange method of a kind of virtual environment shown according to an exemplary embodiment and physical hardware
Figure.The exchange method of the virtual environment and physical hardware, suitable for the control terminal 110 of the meaning of implementation environment shown in Fig. 1, the control
End 110 is device shown in Fig. 2 in one exemplary embodiment.As shown in figure 3, the interaction of the virtual environment and physical hardware
Method at least includes the following steps.
In the step 310, carry out the load of role associated by physical hardware in virtual environment, physical hardware by with role
Association access of virtual environment.
Wherein, physical hardware is the entity hardware that can carry out process control, for example, sensor, display screen, motor etc. are various
The combination of components, physical hardware can be acted by process control realization and be executed.Virtual environment is by running on terminal device
Program construction, user will realize the friendship between user and virtual environment in virtual environment and the manipulation of various roles
Mutually.Physical hardware is present in outside virtual environment, will be present in virtual environment in the form of role.
That is, the definition of role associated by physical hardware has been carried out in advance, specifically, role will be defined virtual
Show Styles in environment and the movement that can be performed.Match for example, role is loaded into resource file required for virtual environment
It sets, will be used to define Show Styles of the role in virtual environment.
It should be appreciated that the role in be loaded onto virtual environment, be it is associated with physical hardware, therefore, virtual
The movement that can be performed in environment, also there is relevances with virtual environment.
It should illustrate to further illustrate, the relevance in virtual environment between role and Internet of Things hardware, including virtual
Role is applied to it by external changes such as the operations of user in environment, generates itself movement variation, and then drive physical hardware
It responds and executes certain movement, also include that physical hardware perceives external change, and is transferred to the role in virtual environment, into
And this role is made to be affected and execute certain movement.
For example, the sensor assembled in physical hardware perceives external change, for example, the variation of temperature, light etc., just will
Relevant information is sent to the main control module itself having, and from main control module, into virtual environment, associated role feeds back, in turn
Associated role is set to respond perceived external change.
In another example physical hardware is the combination of motor and various components, association role applies in virtual environment
After user's operation, physical hardware can be made to hold under control action of the role to physical hardware under the driving of own motor
The various mechanical movements of row.
Therefore, role's access of virtual environment by loading in virtual environment so far can be passed through object by physical hardware
It manages hardware and virtual environment communication between the two and realizes mutual control between the two.
In a step 330, attribute configuration is carried out to role and physical hardware, to obtain the letter of the attribute status after attribute configuration
Breath, attribute status information correspond respectively to role and physical hardware.
Wherein, either physical hardware or the role associated by it have respectively respectively in the process control carried out
Corresponding attribute status information.Attribute status information indicates the tax of variable and variable required for realizing process control
Value.
Respectively role and physical hardware carry out attribute configuration, so obtain attribute status information corresponding to role and
Attribute status information corresponding to physical hardware.
Herein it should be noted that corresponding to the attribute status information of role and physical hardware, since role and physics are hard
There is relevances therebetween for part, therefore, the attribute status information corresponding to role and the attribute shape corresponding to physical hardware
There is also relevances between state information.That is, the variation of side's attribute status information, will lead to another party's attribute status
The variation of information enables to role and physical hardware to interact therebetween, is mutually connected with this side.
In step 350, the synchronous storage of attribute status information is carried out between role and physical hardware.
Wherein, as previously described, role has its corresponding attribute status information, and physical hardware also has corresponding to it
Attribute status information, so far, by role and physical hardware synchronous respectively corresponding attribute status information therebetween, so that
Attribute configuration all properties status information obtained is carried out to be shared by role and physical hardware.
It is shared, i.e., when as both role and physical hardware, either one is applied external change, the attribute status of synchronous storage
Information synchronizes update, by synchronized update the side's response external for not applying external change is changed.
With the external change that the physical hardware and role of subsequent progress can perceive, the attribute status of synchronous storage
Information will also obtain synchronized update therewith.
Specifically, external change is applied to the either side in role and physical hardware, signified external change,
The operation that can be user is also possible to the environment perceived, for example, in virtual environment or physical world environment variation,
The variation that can also be external information input and initiation, herein without enumerating.
It, will be so that role be with physical hardware in same in virtual environment by the realization of attribute status information synchronization mechanism
The world has got through the inconveniences such as existing difficult communication between role and physical hardware, so that between role and physical hardware
It can be in communication with each other, and then for the programming that the programming of Role Dilemma and physical hardware control, due to no longer needing to examine
Consider the obstacle being connected between role and physical hardware, programmed logic can be completed in an intuitive way, reduce volume as far as possible
The threshold of journey, the user of amateur exploitation even school-age children can complete.
Fig. 4 is the process of a kind of virtual environment shown according to another exemplary embodiment and the exchange method of physical hardware
Figure.After step 350, the exchange method of the virtual environment and physical hardware is further comprising the steps of.
In step 410, either one external change for being applied of both role and physical hardware, response external variation are received
The modification operation for executing corresponding attribute status information, obtains the attribute status information of variation.
Wherein, realize role and physical hardware attribute status information between the two it is shared after, for being present in void
Role in near-ring border, and the physical hardware being present in physical world, a possibility that being applied external change.It is any
One side, such as role or physical hardware are applied external change all and will lead to the variation of corresponding attribute status information, that is, trigger
The modification operation of corresponding attribute status information, thus modification operation can be obtained the corresponding variation of a side for being applied external change
Attribute status information.
Either one external change for being applied of both role and physical hardware, as previously described, the operation including user, institute
In environmental change etc. by external introduced variation, the modification for triggering stored attribute status information therefrom is operated.Modification
Operation includes the modification and newly-increased, deletion of attribute status information, and modification operation is so that attribute status present in script is believed
Cease changed operation.
It should be appreciated that being applied a side of external change, the attribute status information of corresponding storage, which is triggered, modifies operation,
Itself stored attribute status information is revised as the new attribute status information corresponding to external change, this is to be applied external change
Response of the side itself to external change changed, in one exemplary embodiment, with attribute status information corresponding to itself
Variation, corresponding movement will also be executed by being applied a side of external change, it may for example comprise to being not applied to the one of external change
The control action of side.
For example, touching operation is triggered to the role in virtual environment, at this point, its corresponding attribute status information is accordingly touched
Hair modification operation, so that attribute status information corresponding to role changes, it, also will be so that role exists with the generation that this changes
It is hard that the attribute status information for carrying out responding the Dynamically Announce of touching operation in virtual environment, and changing will also be synchronized to physics
Part.
In step 430, the attribute status information of variation is synchronous between role and physical hardware.
Wherein, both the role in virtual environment and physical hardware, either one be applied external change and cause pair
When attribute status information being answered to change, due to being not applied to a side of external change, there is also this attribute status information, because
This, need to be by the attribute status synchronizing information of variation, to guarantee the accuracy and shared timeliness of information between the two.
In step 450, do not apply outside according in synchronous attribute status information control role and physical hardware the two
Side's response external variation of variation.
Wherein, with the progress of changed attribute status synchronizing information, the side for not applying external change will be made
It perceives and is applied the attribute status that a side of external change is occurred by the external change that is applied and changes, this variation will drive
The side for not applying external change executes certain movement due to the relevance when the two, carrys out response external variation with this.
As previously described, corresponding to physical hardware and corresponding to the attribute status information of associated role, these two types of attributes
Also accordingly there is relevances between status information.Therefore, a side of external change is not applied in the attribute for obtaining synchronized update
After status information, the attribute status information corresponding to itself can also change therewith, therewith changed attribute status
Information will control or drive the side for not applying external change to respond by the execution of required movement.
By this exemplary embodiment, due to attribute status information synchronization mechanism between physical hardware and associated role
It introduces, so that physical hardware and role are at identical running environment, that is to say, that can realize physical hardware and angle together
The programming of process control in color, it is no longer necessary to be based respectively on role and physical hardware programming, and then necessarily also no longer need to solve
Therebetween the realization communicated will allow users to arbitrarily realize the interaction between role and physical hardware in user level.
Fig. 5 is according to the flow chart that the details of step 310 is described shown in Fig. 3 corresponding embodiment.The step
310, as shown in figure 5, at least including the following steps.
In step 311, the load and rendering that role in virtual environment is carried out by corresponding to the configuration file of role, are obtained
Obtain graphical display of the role in virtual environment.
Wherein, corresponding to the configuration file of role, for defining and describing the Show Styles of role and can be performed
Movement.For example, being associated with the role of physical hardware, configuration file is aobvious in virtual environment in addition to defining and describing role
Sample formula, and executing except various visual movements in virtual environment is also defined to the control action of physical hardware and right
External change that physical hardware is applied and the response action executed.
That is, configuration file includes resource file and attribute status information, resource file and role are in virtual environment
In Show Styles it is related, attribute status information is then related to the movement that role can be performed.
Therefore, it is associated with the role of physical hardware, by being defined the configuration file of generation, virtual environment can be loaded onto
In, display is rendered in this virtual environment, obtains graphical display of the role in virtual environment.
In step 313, physical hardware associated by control role creation own home process, and by the hardware of creation into
The virtual environment host process of journey and role's ownership establishes connection, so that physical hardware access of virtual environment.
Wherein, it should be noted that virtual environment building just creates virtual environment host process thus at the beginning of showing, leads to
It crosses virtual environment host process and realizes the execution that virtual environment institute's relative program controls.In exemplary embodiment, in void
In the execution of near-ring border institute's relative program control, for generated task, such as the control of role institute trigger action, it can lead to
The form for crossing creation thread is realized, i.e., the mode of multithreading is used under virtual environment host process.
With load of the role associated by physical hardware in virtual environment, will under virtual environment host process role thus
Institute's trigger action creates corresponding thread;And the physical hardware for being connected, its creation process, i.e. hardware process will be controlled,
And the connection between hardware process and virtual environment host process is established, at this point, physical hardware is just made to be access of virtual environment.
Access of the physical hardware in virtual environment so that in physical hardware and virtual environment association role communication, be
It is carried out by hardware process and virtual environment host process, it is direct-connected to association role via corresponding thread again on this basis,
While guaranteeing that various role institutes trigger action is executing concurrently in virtual environment by multithread mode, it is hard also to optimize physics
Linkage between part and associated role.
For example, association role by external change is influenced to be triggered execute a physical hardware control action and
Speech, since this control action is that association role is predetermined, therefore there is corresponding threads, at this point, only need to be in respective thread
Under the action of generate the corresponding attribute status information of this control action, attribute status information is sent to virtual environment main line by thread
Journey, and then physical hardware is sent to by the connection between virtual environment host process and hardware process, so that the category of dynamic change
Property status information be synchronized to physical hardware, drive physical hardware to execute under the attribute status information control synchronized specified dynamic
Make, so far, for associated role, just also completes the execution of its control action.
By this exemplary embodiment, the interaction between role and physical environment is just enabled directly, smoothly to carry out,
It is also role and physics while being in the possession of the user physical hardware and freely realizing that associated role is loaded into virtual environment
Mutual control between hardware, mutually linkage are laid a good foundation.
Further, the load for associated role in virtual environment, so that role associated by physical hardware
It can render and be shown in virtual environment, in the realization of this process, further comprise the performed configuration acted of role.
Relative to virtual role, the load of role associated by physical hardware is that the extension in virtual environment is realized, is being made
Virtual environment is loaded into after role associated by physical hardware, and the relevant process control of this role institute will be moved by triggering
The configuration process for making block is realized, i.e., by the configuration of movable block, and realizes the configuration acted performed by role.
It should be noted that movable block be role's institute's relative program control one or a few Codabar code information corresponding to
Figure existence form, movable block have mapped code information.Generation is formed by the splicing relationship between movable block and movable block
Code logic.Each role has its available several movable block, for example, it, which can classify, is shown in tool corresponding to virtual environment
In column.The role that user can freely be loaded onto virtual environment for possessed physical hardware needs to configure movement according to control
Block.
By the configuration of movable block, the code logic of the movement of execution required for being formed, and then can be realized in virtual environment
The control of role, and then thus role further realizes the control of physical hardware, conversely, also can be empty by physical hardware Reverse Turning Control
Role in near-ring border, that is to say, that role is patrolled by the code that the configuration of movable block deploys response physical hardware thus
Volume.
As movable block is configured on role, will movable block creates corresponding thread thus therewith, pass through what is created
Thread control role realizes the execution of the mapped code logic of movable block.
For the movement execution and the movement of physical hardware execution of role, all it is able to through movable block
Corresponding code logic is realized in configuration, for user's realization graphic programming while, but also user can carried out
It intuitively completes to program according to the expectation of oneself during graphic programming, the difficulty of realization is very low, and can be user
The control of role, even physics can directly be carried out that is, once completing the splicing of movable block by providing instant control effect
The control of hardware.
Fig. 6 is according to the flow chart that the details of step 350 is described shown in Fig. 3 corresponding embodiment.The step
350, as shown in fig. 6, at least including the following steps.
It in step 351, is triggered and is configured and associated process according to attribute status information, role will belonged to
Property configuration and the virtual environment host process that belongs to role of attribute status information creating that obtains, attribute will be carried out to physical hardware
Configuration and the hardware process that belongs to physical hardware of attribute status information creating obtained.
Wherein, as previously described, the role either in virtual environment or physical hardware, have that it is belonged into
Journey.Role in virtual environment belongs to virtual environment host process, and physical hardware then belongs to hardware process.
It should be appreciated that for each process, all its mapped memory headroom, involved in extent control performed by process
Variable and the assignment of variable etc., i.e. attribute status information, be all stored on process mapped memory headroom.
In the attribute configuration that triggering carries out role and physical hardware, attribute is carried out to role and physical hardware respectively and is matched
It sets, the attribute status information for the assignment for carrying required variable and variable is obtained with this.The configuration of variable, including variable
On the one hand statement, the modification of variable can be the modification to original variable for the modification of variable, on the other hand
It is also possible to the realization of newly-increased variable.
With being loaded into for role associated by physical hardware in virtual environment, at this point for role and physical hardware
, there is no corresponding attribute status information, need to configure this in speech, therefore, the attribute status information configured will be by
Create the memory headroom mapped to affiliated process.
In one exemplary embodiment, the storage address for attribute status information in memory headroom can pass through
The mode that Hash is assigned is distributed, and is being completed there are the distribution of address and then is being stored in attribute status information.
Further, Hash assignment is carried out to name variable entrained by attribute status information, according to name variable rope
Corresponding storage address in memory headroom is guided to, the i.e. executable write operation after finding corresponding storage address, by attribute shape
The write-in of state information.
In step 353, being mutually in step for attribute status information between role and physical hardware institute ownership process, angle are carried out
The virtual environment host process of color ownership and the hardware process shared attribute status information of physical hardware ownership.
Wherein, completing after the write-in of configuration attribute status information, the attribute status information of write-in can be held
Row synchronizes.
In one exemplary embodiment, attribute status information be written synchronize can by broadcasted between process into
Row is realized.That is, after the write-in for completing attribute status information, can broadcast between carry out process so that its
Its process can be synchronized to attribute status information, and then realize the shared of attribute status information between all processes, facilitate
The realization efficiency of communication and control between process.
It has just been achieved global variable as a result, has been also communication global variable since it is that striding course is realized,
From the point of view of scope of a variable, realizes striding course and across physical entity, realization connection, state dimension will be reduced to greatest extent
The complexity of shield and asynchronous schedule etc., but also the logic of user transparence on different physical entities and application program, for
For user, the interaction of role and physical hardware is realized by the code logic under same environment.
Fig. 7 is according to the flow chart that the details of step 430 is described shown in Fig. 4 corresponding embodiment.The step
430, as shown in fig. 7, at least including the following steps.
In step 431, in the side that external change is applied, by ownership process more new change attribute status letter
Breath.
Wherein, as previously described, the load of role associated by physical hardware has been carried out in the virtual environment for constructing completion,
Physical hardware also access of virtual environment therefrom, at this point, role in virtual environment and physical hardware either side can be carried out
External change applies.
When physical hardware or associated role perceive external change, institute's ownership process makes the memory headroom in mapping
Middle triggering carries out the modification operation of attribute status information.
In one exemplary embodiment, it for the triggering of modification operation, can also be positioned according to the name variable acted on
Storage address, this storage address are the address triggering the attribute status information of modification operation and being written into, will be in this storage address
On modification operation is executed to the attribute status information of write-in.
In step 433, the attribute status information of variation is synchronized to by the side that external change is applied and is not applied outside
The belonged to process of a side of portion's variation.
Wherein, synchronization of the attribute status information in other processes of variation is realized by the communication between process.At one
In exemplary embodiment, communication between signified process can be the execution of broadcast communication.
By synchronous mode so that between process can shared attribute status information, and then for the realization of communication, with
And for the interaction between role and physical hardware, just it is capable of the realization of lower difficulty, avoids the complexity in data processing.
, will be so that user, even low age user by exemplary embodiment as described above, such as children also can
It realizes the mutual operation of role in itself and virtual environment by programming, and is interacted with physical hardware, desired role and object
Hard-wired movement is managed, can be realized by the rapid configuration oneself carried out, for example, when physical hardware is turned on,
The specified voice of associated role output in virtual environment, associated role is then when physical hardware is closed, in virtual environment
Into sleep state.
In another example when the state of virtual environment changes, for example, user manipulates the associated role of physical hardware right
It successfully makes a breakthrough in office's game, then physical hardware understands flashing light and plays music.
For another example physical hardware perceives external temperature reduction, then its associated role in virtual environment will control real
The now events such as snow.
Physical hardware is also subjected to voice, so that its associated role in virtual environment converts speech into text.
More than, role in virtual environment and freely configuring for physical hardware can all be fast implemented by user, not needed
Spend most learning cost.
Below by taking a physical hardware as an example, above-mentioned realization virtual environment and physical hardware are described in conjunction with a concrete scene
Interactive process.
Fig. 8 is to face the simplified diagram that attribute status information is illustrated in active layer according to an exemplary embodiment.
As shown in Figure 8, attribute status information will be the i.e. striding course as existing for global property, across physical entity, user, role
And the difference between physical hardware three will not exist, so that the interaction between three is transparent for a user
, user, role and physical hardware are in the same world.
Fig. 9 is the timing diagram of interaction between user shown according to an exemplary embodiment, role and physical hardware three.
It should further emphasize, signified role is the association role of physical hardware herein.User then constructs virtual environment, so that angle
Color is loaded onto virtual environment, and carries out the attribute configuration of role and physical hardware.
In addition to this, user can also carry out the manipulation of role or physical hardware.
It is as shown in Figure 9 after role associated by physical hardware is loaded onto virtual environment, user will carry out role with
The attribute configuration of physical hardware creates attribute status information to role, also create attribute status information to physical hardware.
At this point, as indicated in step 510, after attribute status information corresponding to role is modified, step 520 is just executed,
So that the attribute status information of variation is synchronized to physical hardware.
For another example shown in step 530, after modifying physical hardware, step 540 is executed immediately, is carried out to role
It is corresponding synchronous.
And for user for the interaction that role or physical hardware are carried out, physical hardware or role all will to this into
Row perception and response, as shown in step 550 to step 560 and shown in step 570 to step 580.
Since attribute status information is not only consistent in distinct program control, one is still maintained on across physical entity
It causes, therefore can safeguard connection synchronizing process automatically, the code simplified in programming is realized, role and physical hardware are also enhanced
Between linkage, for a user, or even being capable of the simple and quick state face by virtual Environment Implementation physical hardware
Plate, the remote control functions such as end and console.
Following is apparatus of the present invention embodiment, can be used for executing the above-mentioned realization virtual environment of the present invention and physical hardware
Exchange method embodiment.For undisclosed details in apparatus of the present invention embodiment, virtual environment of the present invention and physics are please referred to
The exchange method embodiment of hardware.
Figure 10 is the block diagram of the interactive device of a kind of virtual environment shown according to an exemplary embodiment and physical hardware.
The interactive device of the virtual environment and physical hardware includes at least as shown in Figure 10: loading module 610,630 and of configuration module
Synchronous memory module 650.
Loading module 610, for carrying out the load of role associated by physical hardware in virtual environment, physical hardware by with
The association access of virtual environment of role.
Configuration module 630, for carrying out attribute configuration to role and physics, to obtain the letter of the attribute status after attribute configuration
Breath, attribute status information correspond respectively to role and physical hardware.
Synchronous memory module 650, for carrying out the synchronous storage of attribute status information between role and physical hardware.
Wherein, when as both role and physical hardware, either one is applied external change, the attribute status letter of synchronous storage
Breath synchronizes update, by synchronized update the side's response external for not applying external change is changed.
Figure 11 is the frame of a kind of virtual environment shown according to another exemplary embodiment and the interactive device of physical hardware
Figure.The interactive device of the virtual environment and physical hardware, as shown in figure 11, further includes: variation sensing module 710, variation synchronize
Module 730 and response module 750.
Change sensing module 710, for receiving either one external change for being applied of both role and physical hardware, response
External change executes the modification operation of corresponding attribute status information, obtains the attribute status information of variation.
Change synchronization module 730, the attribute status information for that will change is synchronous between role and physical hardware.
Response module 750, for being parked in control role and physical hardware the two not according to synchronous attribute status
Apply side's response external variation of external change.
Figure 12 is according to the block diagram that the details of loading module is described shown in Figure 10 corresponding embodiment.The load mould
Block 610 includes at least as shown in figure 12: load rendering unit 611 and attribute creating unit 613.
Rendering unit 611 is loaded, the load of role in virtual environment is carried out for the configuration file by corresponding to role
And rendering, obtain graphical display of the role in virtual environment.
Attribute creating unit 613, for the process of the creation own home of physical hardware associated by control role, and will creation
Hardware process and role ownership virtual environment host process establish connection so that physical hardware access of virtual environment.
Optionally, the present invention also provides the interactive device of a kind of virtual environment and physical hardware, the virtual environment and physics
The interactive device of hardware can in aforementioned shown implementation environment, execute Fig. 2, Fig. 3, Fig. 4 and Fig. 5 it is any shown in virtual environment with
The all or part of step of the exchange method of physical hardware.Described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing:
The load of role associated by physical hardware in virtual environment is carried out, the physical hardware passes through the pass with the role
Couple into the virtual environment;
Triggering carries out the role and the attribute configuration of physical hardware obtains the attribute status information configured, the attribute shape
State information corresponds respectively to the role and physical hardware;
The synchronous storage of the attribute status information is carried out between the role and physical hardware;
Wherein, the attribute status information of synchronous storage according to both role and physical hardware either one be applied it is outer
Portion changes to obtain synchronized update, and the side for not applying the external change responds the external change.
The processor of device in the embodiment executes the concrete mode of operation in relation to the virtual environment and physics
Detailed description is performed in the embodiment of the exchange method of hardware, no detailed explanation will be given here.
In the exemplary embodiment, a kind of storage medium is additionally provided, which is computer readable storage medium,
It such as can be the provisional and non-transitorycomputer readable storage medium for including instruction.The storage medium is for example including instruction
Memory 204, above-metioned instruction can by the processor 218 of device 200 execute to complete the above method.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. the exchange method of a kind of virtual environment and physical hardware, which is characterized in that the described method includes:
The load of role associated by physical hardware in virtual environment is carried out, the physical hardware with being associated with for the role by connecing
Enter the virtual environment;
Attribute configuration is carried out to the role and the physical hardware, to obtain the attribute status information after the attribute configuration,
The attribute status information corresponds respectively to the role and the physical hardware;
The synchronous storage of the attribute status information is carried out between the role and the physical hardware;
Wherein, when as both the role and the physical hardware, either one is applied external change, the category of synchronous storage
Property status information synchronize update, responded by the side that the synchronized update not apply the external change described outer
Portion's variation.
2. the method according to claim 1, wherein described carry out between the role and the physical hardware
After the synchronous storage of the attribute status information, which comprises
Either one external change for being applied of both the role and the physical hardware is received, the external change is responded and executes
The modification operation of corresponding attribute status information, obtains the attribute status information of variation;
The attribute status information of variation is synchronous between the role and the physical hardware;
It is controlled in the role and physical hardware the two according to the synchronous attribute status information and does not apply the external change
A side respond the external change.
3. the method according to claim 1, wherein role associated by physical hardware in the progress virtual environment
Load, the physical hardware is by being associated with the access virtual environment with the role, comprising:
Configuration file by corresponding to the role carries out the load and rendering of role described in the virtual environment, obtains institute
State graphical display of the role in the virtual environment;
The process of the creation own home of physical hardware associated by the role is controlled, and by the hardware process of creation and the role
The virtual environment host process of ownership establishes connection, so that the physical hardware accesses the virtual environment.
4. according to the method described in claim 3, it is characterized in that, described carry out between the role and the physical hardware
The synchronous storage of the attribute status information, comprising:
It is triggered and is configured and associated process according to the attribute status information, attribute configuration will carried out to role and obtained
The virtual environment host process that belongs to the role of attribute status information creating, attribute configuration will be carried out to physical hardware and obtained
The hardware process that the attribute status information creating obtained belongs to the physical hardware;
Being mutually in step for attribute status information between the role and physical hardware institute ownership process is carried out, role's ownership
The hardware process shared attribute status information of virtual environment host process and physical hardware ownership.
5. according to the method described in claim 2, it is characterized in that, the attribute status information of variation corresponds to role or object
Hardware is managed, the attribute status information by variation is synchronous between the role and the physical hardware, comprising:
In the side that the external change is applied, by ownership process more new change the attribute status information;
The attribute status information of the variation is synchronized to by the side that the external change is applied and is not applied outside described
The belonged to process of a side of portion's variation.
6. the interactive device of a kind of virtual environment and physical hardware, which is characterized in that described device includes:
Loading module, for carrying out the load of role associated by physical hardware in virtual environment, the physical hardware by with institute
The association for stating role accesses the virtual environment;
Configuration module, for carrying out attribute configuration to the role and the physical hardware, to obtain the attribute after attribute configuration
Status information, the attribute status information correspond respectively to the role and the physical hardware;
Synchronous memory module, is deposited for carrying out the synchronizing for attribute status information between the role and the physical hardware
Storage;
Wherein, when as both the role and the physical hardware, either one is applied external change, the category of synchronous storage
Property status information synchronize update, responded by the side that the synchronized update not apply the external change described outer
Portion's variation.
7. device according to claim 6, which is characterized in that described device includes:
Change sensing module, for receiving either one external change for being applied of both the role and the physical hardware, rings
It answers the external change to execute the modification operation of corresponding attribute status information, obtains the attribute status information of variation;
Change synchronization module, the attribute status information for that will change is same between the role and the physical hardware
Step;
Response module, for being controlled in the role and physical hardware the two not according to the synchronous attribute status information
The side for applying the external change responds the external change.
8. according to the method described in claim 6, it is characterized in that, the loading module includes:
Rendering unit is loaded, carries out role's described in the virtual environment for the configuration file by corresponding to the role
Load and rendering, obtain graphical display of the role in the virtual environment;
Attribute creating unit, for controlling the process of the creation own home of physical hardware associated by the role, and by creation
The virtual environment host process of hardware process and role ownership establishes connection, so that the physical hardware accesses the virtual ring
Border.
9. the interactive device of a kind of virtual environment and physical hardware characterized by comprising
Processor;And
Memory is stored with computer-readable instruction on the memory, and the computer-readable instruction is held by the processor
The exchange method of virtual environment according to any one of claim 1 to 5 and physical hardware is realized when row.
10. a kind of computer readable storage medium, is stored thereon with computer program, the computer program is executed by processor
The exchange method of Shi Shixian virtual environment according to any one of claim 1 to 5 and physical hardware.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711117467.4A CN109783112A (en) | 2017-11-13 | 2017-11-13 | The exchange method of virtual environment and physical hardware, device and storage medium |
PCT/CN2018/114139 WO2019091369A1 (en) | 2017-11-13 | 2018-11-06 | Method and device for interaction between virtual environment and physical hardware, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711117467.4A CN109783112A (en) | 2017-11-13 | 2017-11-13 | The exchange method of virtual environment and physical hardware, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109783112A true CN109783112A (en) | 2019-05-21 |
Family
ID=66438739
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711117467.4A Pending CN109783112A (en) | 2017-11-13 | 2017-11-13 | The exchange method of virtual environment and physical hardware, device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109783112A (en) |
WO (1) | WO2019091369A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471803A (en) * | 2019-07-05 | 2019-11-19 | 华为技术有限公司 | A kind of physical hardware operating method, electronic equipment, storage medium and chip |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106648071A (en) * | 2016-11-21 | 2017-05-10 | 捷开通讯科技(上海)有限公司 | Social implementation system for virtual reality |
CN106681479A (en) * | 2015-11-05 | 2017-05-17 | 丰唐物联技术(深圳)有限公司 | User interaction method and system based on virtual reality |
US20170151484A1 (en) * | 2015-04-23 | 2017-06-01 | Eon Reality Sports, Llc | Virtual reality sports training systems and methods |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200302732A9 (en) * | 2011-10-20 | 2020-09-24 | Robert A. Luciano, Jr. | Gesture based gaming controls for an immersive gaming terminal |
CN102542174B (en) * | 2012-01-19 | 2015-12-16 | 马卡里 | Live RPG system |
CN102693091A (en) * | 2012-05-22 | 2012-09-26 | 深圳市环球数码创意科技有限公司 | Method for realizing three dimensional virtual characters and system thereof |
-
2017
- 2017-11-13 CN CN201711117467.4A patent/CN109783112A/en active Pending
-
2018
- 2018-11-06 WO PCT/CN2018/114139 patent/WO2019091369A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170151484A1 (en) * | 2015-04-23 | 2017-06-01 | Eon Reality Sports, Llc | Virtual reality sports training systems and methods |
CN106681479A (en) * | 2015-11-05 | 2017-05-17 | 丰唐物联技术(深圳)有限公司 | User interaction method and system based on virtual reality |
CN106648071A (en) * | 2016-11-21 | 2017-05-10 | 捷开通讯科技(上海)有限公司 | Social implementation system for virtual reality |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471803A (en) * | 2019-07-05 | 2019-11-19 | 华为技术有限公司 | A kind of physical hardware operating method, electronic equipment, storage medium and chip |
CN110471803B (en) * | 2019-07-05 | 2021-01-29 | 华为技术有限公司 | Physical hardware operation method, electronic equipment, storage medium and chip |
Also Published As
Publication number | Publication date |
---|---|
WO2019091369A1 (en) | 2019-05-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10635379B2 (en) | Method for sharing screen between devices and device using the same | |
US20230043249A1 (en) | Avatar Editing Environment | |
CN106062705B (en) | Cross-platform rendering engine | |
US9697702B2 (en) | Display device and method for controlling the same | |
JP6671483B2 (en) | Method and apparatus for controlling smart devices and computer storage media | |
CN107870672B (en) | Method and device for realizing menu panel in virtual reality scene and readable storage medium | |
CN105190486A (en) | Display apparatus and user interface screen providing method thereof | |
TWI662475B (en) | Application producing apparatus and method and application driving apparatus | |
CN109410297A (en) | It is a kind of for generating the method and apparatus of avatar image | |
CN106255948A (en) | User terminal apparatus and control method thereof | |
CN111651116A (en) | Split screen interaction method, electronic equipment and computer storage medium | |
CN105191327A (en) | Display apparatus and display method for displaying a polyhedral graphical user interface | |
CN102662664A (en) | Interface animation realization method and system | |
CN103092612A (en) | Method and electronic device for achieving three dimensional (3D) desktop mapping of Android operating system | |
CN107918518A (en) | Interactive operation method, apparatus, terminal device and operating system | |
CN109783144A (en) | Processing method, device and the storage medium of variable in virtual environment interaction realization | |
CN109783112A (en) | The exchange method of virtual environment and physical hardware, device and storage medium | |
KR102184162B1 (en) | System and method for producing reactive webtoons | |
Linghao et al. | On methods of designing smartphone interface | |
CN103262003B (en) | VPN is used on TV to present remote-control device application graphical | |
CN104077114A (en) | Method for changing display interface of application software and electronic equipment | |
CN109857249A (en) | It is a kind of for generating the method and apparatus of avatar image | |
CN110134463A (en) | Data processing method, device, equipment and machine readable media | |
CN107291561A (en) | A kind of figure synthetic method, information interacting method and system | |
CN103997634B (en) | User terminal and its method for showing image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190521 |