CN109783152A - Control method, device and the computer readable storage medium of physical hardware - Google Patents

Control method, device and the computer readable storage medium of physical hardware Download PDF

Info

Publication number
CN109783152A
CN109783152A CN201711115730.6A CN201711115730A CN109783152A CN 109783152 A CN109783152 A CN 109783152A CN 201711115730 A CN201711115730 A CN 201711115730A CN 109783152 A CN109783152 A CN 109783152A
Authority
CN
China
Prior art keywords
role
hardware
movable block
physical
physical hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711115730.6A
Other languages
Chinese (zh)
Other versions
CN109783152B (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 Chuangkegongchang Science & Technology Co Ltd
Original Assignee
Shenzhen Chuangkegongchang Science & 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 Chuangkegongchang Science & Technology Co Ltd filed Critical Shenzhen Chuangkegongchang Science & Technology Co Ltd
Priority to CN201711115730.6A priority Critical patent/CN109783152B/en
Publication of CN109783152A publication Critical patent/CN109783152A/en
Application granted granted Critical
Publication of CN109783152B publication Critical patent/CN109783152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

Present invention discloses a kind of control method of physical hardware, device and computer readable storage mediums.The described method includes: carrying out the extension load of hardware role by the configuration file of physical hardware;Configuration file by extending load for physical hardware carries out hardware role and renders update, obtains hardware role and hardware role for the movable block of configuration;It is configured and is operated according to the movable block of the hardware role of progress and performed movement, obtain the role's interaction scenarios for incorporating hardware role and hardware role mapping movable block;The triggering operation for monitoring the mapped movable block of hardware role carries out action control to corresponding physical hardware according to the movable block for the operation that is triggered.Realize introducing of the physical hardware to role's interaction scenarios, and then physical world is in conjunction with virtual world, the interaction being no longer limited by between virtual role, physical hardware is also no longer limited by the program of fixed configurations, enhance role's interaction scenarios performance, freely carries out the control of physical hardware and the interaction of hardware role.

Description

Control method, device and the computer readable storage medium of physical hardware
Technical field
The present invention relates to computer application technology, in particular to a kind of method, apparatus of the control of physical hardware and Computer readable storage medium.
Background technique
With the development of Computer Applied Technology, by the realization of role's interaction scenarios, user is able to carry out virtual role Freely control, to realize the interaction between virtual role.For example, in the game of playing a game that a game application carries out, display Game picture has just corresponded to role's interaction scenarios, and the game role in game picture for manipulation is role's interaction scenarios The role of middle meaning.
But existing role's interaction, it is only limitted to virtual role.And for physical hardware, for example, the control of various sensors System, is that the function of the realization required for the sensor or even functional unit are developed and issued by developer, and can not be real Existing physical hardware freely controls, and then introduces role's interaction scenarios.
With the development of the various applications such as Internet of Things, artificial intelligence, physical hardware is presented the development of diversification, and by It more and more is passed to interface as information, is introduced into the function realization of application program.But nonetheless, for role For interaction scenarios, it is still limited to the interaction of virtual role.
In summary, it would be highly desirable to realize the introducing of role corresponding to physical hardware under role's interaction scenarios, and then realize object Freely controlling for reason hardware, is no longer limited to the program of fixed configurations.
Summary of the invention
It is only limitted to the interaction between virtual role in order to solve role's interaction scenarios present in the relevant technologies, and physics is hard Part is also limited by the technical issues of program of fixed configurations, the present invention provides a kind of control method of physical hardware, device and Computer readable storage medium.
A kind of method of physical hardware control, which comprises
The configuration file being defined by physical hardware carries out the extension load that the physical hardware corresponds to hardware role;
The rendering that the configuration file by extending load for the physical hardware carries out hardware role updates, and obtains Hardware role and the hardware role for configuration movable block;
It is configured and is operated according to the movable block of hardware role and performed movement to be carried out in role's interaction scenarios, melted Enter role's interaction scenarios of the hardware role and the hardware role mapping movable block;
The triggering operation for monitoring the mapped movable block of the hardware role, according to the movable block for the operation that is triggered to right Physical hardware is answered to carry out action control.
A kind of control device of physical hardware, described device include:
Loading module is extended, the configuration file for being defined by physical hardware carries out the physical hardware and corresponds to hardware The extension of role loads;
Update module is rendered, carries out hardware angle for the configuration file by extending load for the physical hardware The rendering of color updates, and obtains hardware role and the hardware role for the movable block of configuration;
Role's configuration module, for according to the movement for being the hardware role and performed movement that carry out in role's interaction scenarios Block configuration operation, obtains the role's interaction scenarios for incorporating the hardware role and the hardware role mapping movable block;
Action executing module, the triggering for monitoring the mapped movable block of the hardware role is run, according to the fortune that is triggered The capable movable block carries out action control to corresponding physical hardware.
A kind of control device of physical hardware characterized by 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 control method of physical hardware as described above when executing.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor The control method of physical hardware as described above is realized when row.
The technical solution that the embodiment of the present invention provides can include the following benefits:
To the physical hardware possessed, this physical hardware pair is carried out by the configuration file that this physical hardware is defined first It answers the extension of hardware role to load, the wash with watercolours of hardware role is then carried out by the configuration file that physical hardware thus extends load Dye updates, and obtains hardware role and hardware role for the movable block of configuration, last basis is to carry out in role's interaction scenarios The configuration operation of the movable block of hardware role and performed movement, obtains the angle for incorporating hardware role and hardware role mapping movable block Color interaction scenarios, so far, the triggering for just monitoring the mapped movable block of hardware role are run, according to the movable block for the operation that is triggered to Corresponding physical hardware carries out action control, realizes introducing of the physical hardware to role's interaction scenarios, and then physical world and void The quasi- world is combined, and interaction, role's interaction scenarios are no longer limited by the interaction between virtual role, and physical hardware is not yet It is limited to the program of fixed configurations again, extends the application of physical hardware, enhances the performance of role's interaction scenarios, freely carries out The interaction of hardware role in the control and role's interaction scenarios of physical hardware.
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.
Fig. 1 is the schematic diagram of 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 a kind of flow chart of the control method of physical hardware shown according to an exemplary embodiment;
Fig. 4 is according to the flow chart that the details of step 310 is described shown in Fig. 3 corresponding embodiment;
Fig. 5 is according to the flow chart that the details of step 330 is described shown in Fig. 1 corresponding embodiment;
Fig. 6 is according to the flow chart that the details of step 333 is described shown in Fig. 5 corresponding embodiment;
Fig. 7 is according to the flow chart that the details of step 350 is described shown in Fig. 3 corresponding embodiment;
Fig. 8 is according to the flow chart that the details of step 370 is described shown in Fig. 3 corresponding embodiment;
Fig. 9 is a kind of control method flow chart of the physical hardware shown according to another exemplary embodiment;
Figure 10 is a kind of control method flow chart of the physical hardware shown according to another exemplary embodiment;
Figure 11 is that schematic diagram is realized in the load of role in role's interaction scenarios shown according to an exemplary embodiment;
Figure 12 is the configuration file schematic diagram of physical hardware A shown according to an exemplary embodiment;
Figure 13 be physical hardware A shown according to an exemplary embodiment execute extension load and by corresponding hardware angle The implementation flow chart of color injection;
Figure 14 is that the role shown in an exemplary embodiment loads surface chart;
Figure 15 is that code prompt and wrong grammer are highlighted under code pattern shown according to an exemplary embodiment Realize schematic diagram;
Figure 16 is the realization schematic diagram converted between code and movable block shown according to an exemplary embodiment;
Figure 17 is interface partition schematic diagram shown according to an exemplary embodiment;
Figure 18 is a kind of block diagram of the control device of physical hardware shown according to an exemplary embodiment;
Figure 19 is according to the block diagram that the details of extension loading module is described shown in Figure 18 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, constructed role's interaction field can be accessed including control terminal 110 and via the realization in control terminal 110 Scape, and then realize the physical hardware 130 freely controlled.
Control terminal 110 can be at least one of portable mobile terminals such as computer terminal, smart phone, tablet computer. Physical hardware 130 is to be detached from the hardware device being present in physical world in control terminal 110, for example, it may be sensor sheet Body is also possible to be assembled with various sensors and the car body that is encapsulated by certain shapes shell and any is equipped with communication connection The hardware device of interface (for example, WiFi communication connecting interface etc.).
Physical entity of the physical hardware 130 as necessary being in physical world will lead under the action of control terminal 110 It crosses method shown in the execution present invention and introduces role's interaction scenarios, and then realize freely controlling to this physical hardware 130.
In this implementation environment, control terminal 110 interacts therebetween with physical hardware 130, wherein control terminal 110 Can be it is unique, corresponding to physical hardware 130 can be one or more, and can be in the case where multiple 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 AccessMemory, abbreviation SRAM), electrically erasable programmable read-only memory (Electrically Erasable ProgrammableRead-Only Memory, abbreviation EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable ReadOnly 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, temperature sensor or visual sensor. It should be noted that the above-mentioned sensor enumerated is only preferable example, the sensor that the present invention can configure is without being limited thereto.
Communication component 216 is configured to facilitate the communication of wired or wireless way between device 200 and other equipment.One In a example, device 200 can access the wireless network based on communication standard, as WiFi (WIreless-Fidelity, wirelessly Fidelity).In one exemplary embodiment, communication component 216 is received via broadcast channel from external broadcasting management system Broadcast singal or broadcast related 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, can be based on penetrating in NFC module Frequency identification (Radio 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 technologies are 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 a kind of flow chart of the control method of physical hardware shown according to an exemplary embodiment.The physics is hard The control method of part, suitable for the control terminal 110 of the meaning of implementation environment shown in Fig. 1, the control terminal 110 is in an exemplary implementation It is device shown in Fig. 2 in example.As shown in figure 3, the control method of the physical hardware, at least includes the following steps.
In the step 310, the configuration file being defined by physical hardware carries out the expansion that physical hardware corresponds to hardware role Exhibition load.
Wherein, physical hardware is controlled by the instruction that accessed application program issues and the external module having by itself, For example, the combination of sensor, display screen, motor and various components, corresponding movement is executed instruction with this.Pass through biography Sensor perceives external information, for example, temperature, distance, light etc., to be sent to the main control module itself having, by master control mould Block realizes the feedback of external information performed by physical hardware to the application program feedback accessed.
In another example so that physical hardware has motor function, and then being referred to by the combination of motor and various components Under the control of order, so that the combination of various components executes various mechanical movements driven by a moto on physical hardware.
Should remark additionally herein, signified application program, as through the invention shown in method and realize Control program.
Different physical hardwares, the external module for having it exclusive is constituted, and then has different functions, for user For, by for owned physical hardware, the access of physical hardware in the application is carried out according to their needs.Example Such as, when expectation runs the function that a certain physical hardware has, so that it may which triggering executes the access of method shown in the present invention and answers With program, in order to be able to carry out free control to this physical hardware.
It follows that different physical hardwares, there is the function corresponding to it, and realize that is executed needed for this function moves Make.That is, different physical hardwares has its attribute information, which describes the movement of corresponding physical hardware It executes, and indicates realized function etc..The configuration file that physical hardware is defined, then it is corresponding with this attribute information, and On the one hand it defines how that this physical hardware is driven to execute had function, on the other hand, also defines this physical hardware work For the role accessed, i.e. the presence of hardware role, and then side can in the subsequent access for realizing role's interaction scenarios, The realization of this physical hardware is freely controlled under this role's interaction scenarios.
Therefore, the configuration file that will be defined by this physical hardware, the extension for carrying out role in role's interaction scenarios add It carries, role's interaction scenarios is enabled to expand hardware role, and be no longer only limitted to the interaction of virtual role.
Unique existence form of the hardware role as physical hardware in role's interaction scenarios, will be so that role's interaction scenarios By original pure based on interactive process virtual via virtual role in data plane, the i.e. realization of virtual scene, evolution It combines closely for virtual world and physical world, virtual world will pass through channel constructed by application program and physical hardware, real Now with physical hardware, the interaction of physical world where physical hardware.
By the load for the configuration file that physical hardware is defined, the extension that physical hardware thus carries out role is loaded, I.e. to existing role, hardware role is expanded.
Extension, be relative to script there is only virtual role for, existing role will be made as a result, in addition to Including virtual role, further comprises user and possess hardware role corresponding to physical hardware.
It, will be so that matching defined in physical hardware thus as physical hardware carries out the extension load of corresponding hardware role It sets file to be loaded in memory, so far, that is, the relevant treatment of this configuration file can be performed, physical hardware is accessed, it is corresponding Hardware role and control execute be introduced into.
In a step 330, the rendering that hardware role is carried out by extending the configuration file of load for physical hardware updates, Hardware role and hardware role are obtained for the movable block of configuration.
Wherein, it should be understood that the extension of configuration file loads, and on the one hand indicates and only realizes various virtual roles originally In the application program of control terminal 110, it is able to initiate role's extension, introduces hardware role and relevant movable block, on the other hand, Configuration file will be loaded on memory, and configuration file carries various numbers relevant to physical hardware and corresponding hardware role According to being able to execute various operations to configuration file.
Further, configuration file carries the resource file of corresponding hardware role, for example, hardware role's title is believed Breath, character icon etc., in addition to this, configuration file are carried to corresponding hardware role also for the movement block message of configuration.It is dynamic The movable block of the current configuration of hardware role thus and being specifically defined for movable block are indicated as block message.Movable block is used for Realize control of the hardware role to corresponding physical hardware.
Therefore, by the configuration file of extension load, the rendering that can carry out corresponding hardware role updates, hard to realize Part role and the defined movable block of hardware role, or the presence and addition of the newly-increased movable block of development hardware role.By This hardware role and hardware role obtained can freely activate for the movable block of configuration under the manipulation of user, into And control of the hardware role to physical hardware is carried out by the operation of activated movable block.
That is, hardware role obtained and hardware role are for the movable block of configuration, being can be according to whether control It makes the movement that corresponding physical hardware and required physical hardware execute and is freely configured in role's interaction scenarios, pass through The execution of step 310 and step 330 will realize the introducing of hardware role corresponding to physical hardware, so that obtaining freely to select Hardware role and movable block.
It should further illustrate, each hardware role realizes its control to physical hardware, the execution of this control, It is to be realized by the movable block configured.Introduced each hardware role has the various motion block for being configured, right For the physical hardware control of the realization required for user, it can therefrom choose, can also all use, herein without limit It is fixed.
Hardware role obtained is as existing for available role at this time, and this hardware role is for the dynamic of configuration Make block, is then existed as available interactive action.
So far, it by the execution of step 310 and step 330, will be provided firmly by the subsequent role's interaction scenarios realized Part role and this hardware role for configuration movable block, the physical hardware that user is possessed all can by extension load and The progress updated is rendered, corresponding hardware role is obtained, the scalability and role for which thereby enhancing role are disposed flexible Property.
In step 350, matched according to the movable block for the hardware role and performed movement that are carried out in role's interaction scenarios Operation is set, the role's interaction scenarios for incorporating hardware role and the hardware role mapping movable block are obtained.
Wherein, as previously described, role's interaction scenarios refer to via constructed by the realized application program of the present invention, realize Between role, including the interaction between hardware role, between virtual role and between hardware role and virtual role, have non- Often high interactive performance.
Operation and movable block configuration operation are configured for the configuration operation that role's interaction scenarios carry out, including role.At one Being operated in the specific implementation, configuring operation and can only be configured including movable block for exemplary embodiment, it is configured to angle to be attached to The hardware role of color interaction scenarios, hardware role increases movable block newly thus;Also may include role configure operation and herein Role configures the movable block configuration operation executed on the basis of operation, and corresponding hardware role is configured to role's interaction scenarios, And the configuration of movable block is carried out therewith.
In one exemplary embodiment, configuration operation can be to corresponding character icon or the triggering of movable block icon The drag operation of progress.
Hardware role and this hardware role are obtained for the movable block of configuration by abovementioned steps, or hard to have extended The movable block that part role increases newly will all be rendered and be updated to the page, for example, toolbar, in order to which user passes through the dragging of triggering Option and installment is operated to role's interaction scenarios.
In step 370, the triggering operation for monitoring the mapped movable block of hardware role, according to the movable block for the operation that is triggered Action control is carried out to corresponding physical hardware.
Wherein, it should be understood that for a hardware role, by the configuration of its movable block in role's interaction scenarios, Multiple movable blocks that this hardware role is configured are obtained, and are mutually spliced between movable block.
One movable block has its defined code description information, this is obtained to movable block and executes the dynamic of institute's definition movement Make control information, achievees the purpose that the corresponding physical hardware of control executes required movement.Furthermore, exist between each other Splicing relationship, the logical relation between code information indicated by code collocation information will be described.Movable block is hard in physics Corresponding component in part, such as sensor etc. are assembled being in physical hardware, this component institute to realize specific function Splicing relationship between corresponding multiple movable blocks and movable block just forms the code logic for realizing this specific function.
Hardware role mapped movable block in role's interaction scenarios will all have the code information corresponding to it, this code Information can be specific each Codabar code, is also possible to the parameter of code corresponding to incoming spliced movable block, can also be Spliced movable block corresponds to the expression and expression of variable in code, logical expression, circulation etc., and therefore, hardware role is mapped Movable block, after the operation that is triggered, have it is corresponding execute content, once listen to the triggering operation of movable block, just root The control that physical hardware is carried out according to corresponding code information, so that movement performed by physical hardware is and institute's run action block Code information be consistent.
So far, the movement control of the involvement and hardware role of hardware role in role's interaction to physical hardware is just realized System therefore can initiation movement as needed since the movement of the controlled execution of physical hardware is matched with institute action of configuration block Block configuration operation, and then freely controlling for physical hardware is realized, have very high flexibility and controllability, and physics is hard The accuracy of part control is high.
Fig. 4 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 4, at least including the following steps.
In step 311, the hardware role carried out according to triggering is newly-increased or is hardware role for action of configuration block It is newly-increased, the configuration file that corresponding physical hardware is defined is obtained, configuration file is for describing newly-increased hardware role or hardware The movable block that role increases newly.
In step 313, the load of configuration file is carried out, is increased newly with development hardware role or for development hardware role Movable block.
Wherein, signified hardware role is newly-increased, is directed to for being configured to the role of role's interaction scenarios and carrying out hardware angle Color increases newly.For a user, the newly-increased of hardware role can be carried out to the physical hardware possessed.For example, new in user When obtaining a physical hardware, so that it may corresponding hardware role is obtained to the extension load of this physical hardware, to realize role's interaction In the application program of scene, this hardware role is increased newly.
In addition to carrying out the newly-increased of hardware role, can also be it is existing, that is, the hardware role extended is newly-increased to be configured To the movable block of this hardware role.
Either hardware role's or movable block is newly-increased, that is, extend the realization of load, is carried out by configuration file 's.Here, it is necessary to carry out the detailed description of configuration file.
Configuration file is uniquely corresponding to hardware role, but can correspond to a movable block or multiple movable blocks.Institute The configuration file of acquisition, indicated hardware role and in the absence of, then thus initiate hardware role creation;And in meaning It is then the creation for capableing of action of configuration block for initiating this hardware role when the hardware role shown has existed.
The data that configuration file is carried are broadly divided into two classes, a kind of related to the role realized, another kind of, then To by the movement of realization role definition it is related.
Specifically, configuration file includes resource file information, movable block configuration information and the generation corresponding to movable block Code description information.Resource file information is related to the hardware role realized, and resource file information indicates realized hardware angle The title of color, and display sample of the realized hardware role in application program and the realized role's interaction scenarios of application program Formula, or even further comprise Show Styles, audio content etc. that realized hardware role can export in role's interaction scenarios. In configuration file under the action of resource file information, thus it is ensured that hardware role is in the ongoing presence of role's interaction, Jin Erneng Enough and virtual role is adapted, and guarantees that hardware role incorporates the performance of role's interaction scenarios.
Further illustrate, in configuration file, resource file information include role name claim, character icon etc.;And movable block The movable block that configuration information then indicates as the configuration of hardware role indicated by role's title, and in the generation for corresponding to movable block Under code description information effect, the classification of this movable block, and specific definition, i.e. code information are indicated.
As physical hardware is defined the acquisition of configuration file, this configuration file is loaded onto memory, it is corresponding to carry out Hardware role, or movable block is increased newly for development hardware role, thus the introduced hardware of role's interaction scenarios of enriching constantly Role, had access to physical hardware of also enriching constantly are also rich while getting through virtual world and physical world The rich interaction of virtual world and physical world, has very high Scalable Performance.
Fig. 5 is according to the flow chart that the details of step 330 is described shown in Fig. 1 corresponding embodiment.The step 330, as shown in figure 5, at least including the following steps.
In step 331, the configuration file of load is parsed, generates hardware role or newly-increased dynamic for development hardware role The role for making block extends object.
Wherein, by the role to institute's loading configuration file, the data that configuration file is carried be can be obtained, for example, angle Color name claims, the store path of data, task, the movable block configured and corresponding to movable block code description information, realized Physical hardware corresponding to role etc..It should be appreciated that signified task, i.e. corresponding hardware role are currently loaded by extension In, the various tasks needed to be implemented, to guarantee that loaded hardware role's is available and controllable.For example, it is desired to trigger appointing for processing Business includes transmission role's title, transfer operation block description information and monitors whether movable block is triggered operation.Pass through task Deployment, so that the hardware role carried out is newly-increased or development hardware role increases movable block newly, it is that effectively, ensure that subsequent The enforceability of process flow corresponding to hardware role and movable block.
The data that configuration file is carried are obtained by the parsing to configuration file, role's extension pair is generated to this data As on the one hand encapsulating the data parsed, on the other hand, being able to based role extension object and smoothly complete hardware role institute Involvement in relevant extension load and role's interaction scenarios.
In step 333, object is extended by role and carries out hardware role or the newly-increased movable block of development hardware role Rendering.
Wherein, as previously described, role extends data packaged by object, defines hardware role, or has extended hard Part role increases the Show Styles of movable block newly, therefore such as character icon etc. it is corresponding to carry out will to extend object by role Interface rendering.
In step 335, rendering is updated into the hardware role obtained or development hardware role increases movable block update newly To the corresponding toolbar of role's interaction scenarios.
Wherein, hardware role is carried out, or the rendering that development hardware role has increased movable block newly updates, so that it is shown to On interface, it can choose and be configured in role's interaction scenarios at any time for user.
Toolbar is various roles to be carried on interface and each role is capable of the region of action of configuration block.Rendering updates Hardware role or development hardware role increases movable block newly, will be such as the angle of aforementioned meaning with existing for form of icons Chromatic graph mark, and will be added in toolbar.
So far, being just embodied as physical hardware realizes the extension load of corresponding hardware role, obtains this physical hardware energy The hardware role of role's interaction scenarios is enough incorporated, in addition to this, the movable block that also can be realized development hardware role is newly-increased.
That is, can be with meaning the newly-increased hardware role that can be applied to role's interaction scenarios of physical hardware, it can also be with Mean that existing hardware role increases movable block newly, so that the interaction of hardware role and other roles, and the control to physical hardware More horn of plenty and precisely is made, and can adapt to have very high flexibility and scalability in user demand.
Fig. 6 is according to the flow chart that the details of step 333 is described shown in Fig. 5 corresponding embodiment.The step 333, as shown in fig. 6, at least including the following steps.
In step 3331, judge role extend object belonging to hardware role whether with the development hardware in toolbar There is conflict in role, if NO, then follow the steps 3333, if YES, then follow the steps 3335.
In step 3333, the creation of affiliated hardware role is triggered, object is extended by role and is extended hardware role Rendering.
In step 3335, object is extended by role and obtains newly-increased movable block, is added to corresponding development hardware role Newly-increased movable block.
Wherein, as previously described, it is all in role's interaction scenarios to show that application program can be configured to for toolbar Role, including hardware role and virtual role, also show the movable block that can be configured.Therefore, passing through load configuration When the generated role's extension object of file is extended load, object is extended for the role of generation, should judge that this role expands Whether hardware role indicated by exhibition object is present in toolbar, to confirm that this role extends hardware role indicated by object Whether it has been created.
If role extends hardware role indicated by object with the role in toolbar there is conflicting, illustrate that role expands Hardware role indicated by exhibition object has been created, and is herein only that the hardware role created configures new movable block.
If role extends hardware role indicated by object with the role in toolbar in the presence of not conflicting, illustrate role Hardware role indicated by extension object is not present in toolbar, need to carry out the creation of hardware role.
Triggering is carried out to the creation of hardware role as a result, and then realizes rendering more by executing step 335 shown in fig. 5 Newly.
By this exemplary embodiment, user can be realized, the dynamic of role and movable block have been updated, so that Incorporated role's interaction scenarios are not limited to hardware role, are also not necessarily limited to the newly-increased of hardware role, role can for hardware The movable block of configuration is also able to carry out dynamic and updates, since movable block corresponds to code information, will also realize The dynamic of code information updates, for through the realized graphic programming of movable block, extreme enrichment graphic programming institute The content and function that can cover are realized, while intuitively creation code, provide more realization possibilities.
Fig. 7 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. 7, at least including the following steps.
In step 351, operation positioning role's interaction field is configured according to the role to trigger progress in role's interaction scenarios The hardware role that scape is configured, the stage region that rendering hardware role to role's interaction scenarios is shown.
Wherein, first it should be noted that the interface that application program is realized includes two classes, one kind is that role loads boundary Face, for the addition of role and the movable block addition of existing role;It is another kind of, it is the relevant control of role's interaction scenarios institute And display interface.
The relevant control of role interaction scenarios institute and display interface, include toolbar, working region, code region with And stage region.Movable block present in toolbar, the dragging that these movable blocks carry out classification and show, and triggered with user It operates and selected movable block is moved to working region.
It is answered for realizing the performed configuration acted of role in role's interaction scenarios, especially hardware role working region When explanation, the performed movement of hardware role includes the control action implemented to corresponding physical hardware, so it is real Under the action of applying control action, so that physical hardware is controlled by hardware role.For the configuration of movement performed by a hardware role For, in working region, selected movable block is spliced together, the code information of movable block mapped and movable block it Between splicing relationship, just ensure that hardware role movement execute.
Code region for carrying out the splicing relationship present in working region between movable block and movable block immediately The display of code information.Movable block mapped code information, and the code logic formed by splicing relationship are direct It is reflected in code region, and code region has editting function, the editor of shown code information can be carried out, and then directly made For movable block and role.
Stage region, also referred to as stage role region are that the interface of role's interaction scenarios is presented.Incorporate role's interaction All roles of scene will show in stage region.In addition, stage region is provided with to jump to role and load boundary The button in face carries out new role in order to which user triggers when needed, for example, the addition of new hardware role.
Operation is configured by the role that role's interaction scenarios trigger progress, for configuring institute for the role's interaction carried out The role of involvement.In exemplary embodiment in the specific implementation, configure operation according to the role triggered, navigate to as angle Color interaction scenarios are configured with hardware role, at this point, this hardware role is rendered to the stage area that role's interaction scenarios are shown Domain.
In step 353, operation is configured according to the movable block carried out is triggered to hardware role, is obtained as hardware role configuration Movable block and movable block between splicing relationship, hardware role that stage region is shown and mutually splicing map to hardware role Movable block be dissolved into role's interaction scenarios.
Wherein, it for the realization of role's interaction scenarios, after the configuration for completing role, just needs to be configured Role carries out the configuration of movable block, therefore, will initiate movable block configuration behaviour to the hardware role for being configured to role's interaction scenarios Make.
By the initiation of movable block configuration operation, and the movable block configuration of hardware role is carried out, the movable block configured is It is multiple, it is stitched together between each other, to complete to execute movement or the configuration of combination of actions needed for hardware role, so that firmly Part role is incorporating while role's interaction scenarios, and mapped movable block is also dissolved into role's interaction scenarios, in turn Realize interaction of the hardware role in role's interaction scenarios.
In another exemplary embodiment, step 350 further include: be the hardware role creation master for rendering to stage region Process, and when the movable block of hardware role is configured, corresponding behavior act thread is created for movable block.
Wherein, it should be understood that the extension that user executes hardware role to the physical hardware possessed loads, and physics is hard Hardware role corresponding to part is introduced into realized application program, certainly exists immediately using this hardware role, by this hardware Role is configured to the demand of role's interaction scenarios.
Therefore in stage region hardware role be rendered and incorporate role's interaction scenarios, on the one hand create master thus Process, host process will be for realizing the interactions and hardware role and external communication between role in role's interaction scenarios.
For the movable block that hardware role is configured, behavior act thread all is created thus, to pass through behavior act Thread executes the movement that hardware role is configured.That is, behavior act thread executes the mapped movable block of hardware role Corresponding code information, so that hardware role can be realized the execution of required movement, including to physical hardware control action Execution.
It will pass through multithread mode realization as a result, to be precisely controlled physical hardware, in this implementation, due to being multithreading Mode, therefore various motion can be concurrently executed, hardware role is improved to the control performance of physical hardware.
Corresponding, Fig. 8 is according to the stream that the details of step 370 is described shown in Fig. 3 corresponding embodiment Cheng Tu.The step 370, as shown in figure 8, at least including the following steps.
In step 371, listens to hardware role mapping movable block and be triggered when running, the corresponding behavior of trigger action block It acts thread and action control information is generated according to the code description information of mapping, and be back to host process.
In step 373, by host process to the corresponding physical hardware transfer operation control of movable block institute mapping hardware role Information processed, triggering physical hardware execute corresponding actions.
Wherein, the role's interaction scenarios realized include two large divisions, and a part is the role that stage region is carried out It has been shown that, and the Dynamically Announce interacted between role;Another part is then working region.Working region had both carried out role institute Splice the presentation of relationship between action of configuration block and movable block, and the role in role's interaction scenarios will be carried out performed dynamic The control of work.
Specifically, movable block shown by working region, user can apply operation to it as needed, with trigger action The operation of block, and then realize control of the user to movement performed by role in role's interaction scenarios.
As previously described, each movable block configured by role, i.e. movable block shown by working region, there is correspondence Behavior act thread.Listen to the operation that is triggered of movable block in working region, behavior act thread corresponding to movable block Just code information corresponding to this movable block is executed, so that the role of respective action block mapping executes corresponding actions.
When the mapped role of movable block is hardware role, the movement of execution includes the control action to physical hardware. The execution of corresponding behavior act thread energy code information is that movable block generates action control information, passes through this action control information Transmission to physical hardware, control physical hardware execute corresponding actions, realize control of the hardware role to physical hardware.
Further, the realization for hardware role to physical hardware action control is to correspond to row in institute's run action block It is realized under cooperation for movement thread and host process.Behavior act thread action control information generated, need by with The communication party that physical hardware occurs can be transmitted to physical hardware.Therefore, behavior act thread generate action control information it Afterwards, host process will be returned to by interface, action control information is sent to physical hardware through communication connection interface by main length of run.
Corresponding, the physical hardware for receiving action control information is carried out corresponding movement, and with dynamic The execution of work and to hardware role's return action implementing result.It is returned specifically, implementing result will will be acted along receiving path Protocol processor to behavior act thread is parsed via protocol processor and is obtained specific as a result, returning to main thread , complete the execution for the treatment of process corresponding to a movable block.
So far, institute's configuration work region and stage region effect under, can by movable blocks multiple in toolbar to The dragging of working region interacts between hardware role rapid deployment role and executes to physical hardware the code information of control, And then movement corresponding to instant realization executes, while enhancing interactive performance between virtual world and physical world, Reduce the threshold that image conversion programs under realized role's interaction scenarios.
Fig. 9 is a kind of control method flow chart of the physical hardware shown according to another exemplary embodiment.The physics is hard The control method flow chart of part, as shown in figure 9, at least including the following steps.
In step 510, the movable block for involvement role's interaction scenarios positions the code description information of mapping respectively.
Wherein, as previously described, each movable block, all corresponding code description information.The instruction of code description information Being specifically defined for corresponding movable block, for example, parameter, return value and corresponding code information, and then by parameter, return The method that value and corresponding code information can be encapsulated as corresponding role's execution movement.
In role's interaction scenarios, it is directed to each movable block that role is configured, is all navigated to and is reflected by its corresponding relationship The code collocation information penetrated.
In step 530, conversion of the movable block to code information is carried out according to code description information, and to role's interaction field The code information that scape carries out under code pattern is shown.
Wherein, the extraction that code information in mapping code description information is carried out by movable block, by the code information of extraction It is shown in code region, so that user checks the code currently edited.
In one exemplary embodiment, according to code description information, movable block definition layer is constructed, the movement of building is passed through Block definition layer realizes the mutual conversion between movable block and code.
Specifically, code description information includes in addition to this parameter, return value and code information further comprise movable block Therefore the attribute of the movable blocks such as ID, movable block description according to the content that code description information is included, constructs movable block definition Layer.
So far, it is configured in the movable block of role in role's interaction scenarios, it is just quick by constructed movable block definition layer Conversion is returned, can be also quickly converted by the code being written to corresponding movable block, and then automatically move this to corresponding code It is dragged in working region as block, the performed dynamic configuration acted of role in role's interaction scenarios is realized, for obtaining for code information Mulitpath must be provided.
By exemplary embodiment as described above, the code for realizing institute's action of configuration block is shown, shown code Information and the movable block of configuration match, and with being constantly configured on role for movable block, shown code information also exists Dynamic increases therewith, will enhance the programming learning experience of user.
Figure 10 is a kind of control method flow chart of the physical hardware shown according to another exemplary embodiment.The physics is hard The control method of part, it is as shown in Figure 10, at least further comprising the steps of.
In step 610, the code information carried out according to role's interaction scenarios under code pattern for assigned role triggering Input obtains the code information of the newly-increased movement of assigned role.
Wherein, code pattern is dynamic for the assigned role configuration in role's interaction scenarios in such a way that code information inputs Make the operation mode of block.That is, the movable block of role configures, including movable block is realized in Drag tool column, also includes generation The input of code information under pattern.
Even configuration of the movable block on assigned role, core lie also in corresponding code information, execute movement It is to be realized according to the code information configured.Therefore, which kind of operation mode no matter is acquired, can all be carried out in role's interaction scenarios The performed configuration acted of role.
Specifically, code region carries out the input of code information, this process is needle as user inputs the triggering of operation A role in role's interaction scenarios is carried out, this role is signified assigned role.
In act 630, according to code description information belonging to the code information mapping of the newly-increased movement of assigned role.
Wherein, as previously described, movable block has the code description information corresponding to it, and includes in code description information Code information, therefore the code information inputted for the newly-increased movement of assigned role can map to affiliated code description information.
In step 650, the movable block that itself mapping assigned role is positioned by code description information, movable block dynamic is spelled It is connected to the movable block that assigned role has mapped in role's interaction scenarios.
Wherein, corresponding movable block can be obtained according to the code description information of mapping, this movable block is to pass through use Family input operates and is configured to the movable block of assigned role.
It should be appreciated that the code information in working region, includes the code information that user is inputted, it is and workspace Movable block present in domain matches, and the logical relation between code information just corresponded in working region movable block it Between splicing relationship.
Therefore, after positioning obtains the movable block of institute's input code information MAP, this movable block is dragged in work automatically Region and the splicing that be dragged in movable block in working region is carried out according to the logical relation between code information in code region.
In one exemplary embodiment, the generation that user inputs under code pattern for newly-increased act of assigned role is obtained After code information, as previously described, movable block definition layer is constructed based on code description information due to being movable block, The movable block of institute's input code information MAP will can be directly obtained by movable block definition layer, it is convenient and efficient.
Further, in one exemplary embodiment, step 610 include: role's interaction scenarios code pattern under hold The continuous reception for carrying out inputted character, is directed to inputted character, carries out language by predefined code snippet mapping library Method inspection and/or macrodefinition matching.
Wherein, it should be understood that under code pattern, the code information input process that triggering carries out in code region is to continue The character input process of progress.Therefore, in the process, the character of lasting input will be received, predefined code will be passed through Fragment map library carries out syntax check to this, and then the realization prompt that carries out promptly and accurately reports an error with grammer.
In addition, also macrodefinition matching will be carried out based on predefined code snippet library, it would be possible to which corresponding code snippet is aobvious Show in code region, be inserted into for selection by the user, realizes the quick input of code information.
Predefined code snippet mapping library, for storing various code snippets, on the one hand, judge institute on this basis The character of input whether grammaticalness specification, on the other hand also provide matched macrodefinition, the i.e. encapsulation of code snippet for user, To improve input efficiency.
Embodiment shown in through the invention will realize the access of physical hardware, and then realize that hardware role is participated in Role's interaction and hardware role realize for it on this basis to the action control of physical hardware and free execute movement The movable block of corresponding code information configures, and the code information inversely carried out inputs and brings movable block therefrom Dynamic change, for a user, effect that code information is occurred and code information variation will be perceived by this and by The performed variation acted of this caused role action even physical hardware, hence for the programming study that user is carried out Speech, solid image express code information and grammer, enhance intuitive and visualization in programming study.
Therefore, through the invention shown in embodiment, provide more interactive performances for various physical hardwares, it can be achieved that Random freely the configuring of physical hardware interaction and movement execution, and the configuration process for being carried out, such as movable block The input of configuration and code information can all execute via the display in stage region and the movement of physical hardware and is When verifying, the modification carried out on this basis, which also can be perceived accurately, to be this time modified for for role and physical hardware Effect, controllability is strong, has very high real-time and dynamical feedback performance.
Example is realized shown in through the invention, and visualization and tangibly programming process completely can be realized for user.
By taking a physical hardware A as an example, the control process of above-mentioned physical hardware is described in conjunction with a concrete scene.
Figure 11 is that schematic diagram is realized in the load of role in role's interaction scenarios shown according to an exemplary embodiment.First It should be noted that in role's interaction scenarios role introducing, refer to for new physical hardware, such as physical hardware A, so that object Reason hardware A can have corresponding hardware role, and then the interaction in participation role interaction scenarios, as shown in figure 11, either empty Quasi- role or hardware role A execute load, solution under the action of role's loader 710, i.e. Extension Manager Analysis and render process such as the execution of step 730 to step 750, and then make working region, stage region and code area respectively Domain obtains corresponding content and shows.
It in step 730, loads in the progress of role, is carried out to configuration file, and it is similar, for newly-increased The introducing of movable block, and carried out by configuration file.
Figure 12 is the configuration file schematic diagram of physical hardware A shown according to an exemplary embodiment.For physical hardware The introducing of hardware role corresponding to A, either progress physical hardware A, or the friendship for physical hardware A in role's interaction scenarios Mutually newly-increased movable block, can all be realized by corresponding configuration file.
It is as shown in figure 12, the configuration file of physical hardware A, including role's title, character icon, movement block sort and dynamic It is specifically defined as block.Movable block, which is specifically defined, has corresponded to code information etc..
Figure 13 be physical hardware A shown according to an exemplary embodiment execute extension load and by corresponding hardware angle The implementation flow chart of color injection.But it should be stated that being not limited to physical hardware A, a variety of different physical hardwares can lead to The extension load of this implementation process progress is crossed, and then is injected in role's interaction scenarios.
Specifically, step 810, which is first carried out, loads the configuration file defined, this step can pass through LoadExtension (key, path) sentence executes realization, and then generates role and extend object, and role extends object extension。
Wherein, object extension is extended for role, defined name is role's title;Path is storage road Diameter;Worker is the task of required execution, will correspond to the behavior act thread of movable block;Blocks is movement Block;Device is physical hardware.
So far, new hardware role on the one hand can be achieved and extend load, as the subsequent execution of step 820 on the other hand will There is dynamic addition movable block such as the subsequent execution of step 830 for the newly-increased movable block for configuration of development hardware role Ability.
As shown in step 820, the role for being directed to generation extends object, will judge whether it is new physics hardware, can lead to That crosses that newdevice judges sentence executes realization.If it is new physics hardware, then the hardware role for carrying out this physical hardware adds Add, i.e., as shown in step 821 and step 840.
As shown in step 830, be directed to generation role extend object, will also judge be as increase newly movable block, if It is newly-increased movable block, then the creation of movable block and the creation of respective code information is carried out, and then update, such as step 831, step 833 and step 840 sequentially carry out.
New physics hardware is just completed as a result, and the extension load of the hardware role as corresponding to physical hardware A can also basis Need to complete physical hardware A extended load hardware role movable block it is newly-increased.
Figure 14 is that role's load surface chart shown in an exemplary embodiment is just obtained by process as described above The movement set of blocks of hardware role B and toolbar 880 in stage region 870 shown in Figure 14.
It should be appreciated that movement set of blocks carries out classification display in the interface display carried out, the foundation of classification exists Block sort is acted defined in the configuration file.
It is carried out for loading each time, all creates corresponding extension task thus, such as step 910, on the one hand realize angle Color extends corresponding generation, on the other hand includes carrying out movable block to be triggered the monitoring task of operation, as shown in task 920, And guarantee the execution and communication of each movement under the action of respective behavior acts thread, especially hardware role is to physics The realization communicated between hardware.
Listen to the hardware role institute action of configuration block corresponding to physical hardware be triggered run when, this movable block institute is right The behavior act thread answered increases the behavior that movable block is created by step 850 newly thus after executing movable block and increasing newly Thread is acted, action control information will be obtained by protocol processor.
The action control information of acquisition is sent to host process by behavior act thread, by host process execute with physical hardware it Between send and receive, and then guarantee physical hardware movement execute.
On this basis, the real-time perfoming that code prompt and wrong grammer under code pattern are highlighted is extended. In code region, the movable block configuration of role by the input of character corresponding to code information, can be carried out, and then can also not had to The directly movement of configuration role execution by way of movable block, can also corresponding configuration movement by character input.
Figure 15 is that code prompt and wrong grammer are highlighted under code pattern shown according to an exemplary embodiment Realize schematic diagram.
On the one hand the character inputted obtains possible corresponding code snippet, such as step under the action of grammar checker 1010 and the execution of step 1020 on the other hand will carry out the inspection of syntax gauge, such as holding for step 1030 and step 1040 Row.
On this basis, being entered in code region with code information, corresponding movable block are also dragged into workspace Domain, to realize conversion of the code to movable block.
Figure 16 is the realization schematic diagram converted between code and movable block shown according to an exemplary embodiment.For this For the realization of invention, the input of movable block and code information is all the two entrances that role carries out movement configuration, therefore acts It is mutually converted between block and institute's input code both information.
Specifically, having the movable block definition layer corresponding to it for a movable block, which is to movable block Unique description.The movable block definition layer include movable block ID, movable block description, the parameter of movable block, the return value of movable block, The attribute of the movable blocks such as corresponding code information is a kind of existence form as code description information.
When writing code, each code can all find corresponding movable block mapping in movable block definition layer, in turn The figure of reversed rendering movable block, to realize one code of every input, all shows respective action block figure to working region simultaneously The function of shape.
Figure 17 is interface partition schematic diagram shown according to an exemplary embodiment.As shown in figure 17, code region 1110, character input is carried out according to selected computer language under code pattern, and obtain and act in working region 1130 Block accordingly shows.
The movable block either configured in working region 1130 or the code information for including in code region 1110, Performed movement is all configured with for the hardware role B in stage region 870.
Realization through the invention, the physical hardware that will user freely obtained, for example, being mounted with various sensors Electronic component, the equipment etc. with movable function can be dissolved into role's interaction scenarios, and as auxiliary, be led to Cross the movable block arbitrarily dragged, and the matching with code information, be easy to allow users to fully understand each code and Logical relation between code provides effective auxiliary tool while realizing graphic programming for the programming study of user.
Following is apparatus of the present invention embodiment, and the control method that can be used for executing the above-mentioned physical hardware of the present invention is implemented Example.For undisclosed details in apparatus of the present invention embodiment, the control method embodiment of physical hardware of the present invention is please referred to.
Figure 18 is a kind of block diagram of the control device of physical hardware shown according to an exemplary embodiment.The physical hardware Control device, include at least: extension loading module 1210, rendering update module 1230, role's configuration module 1250 and movement Execution module 1270.
Loading module 1210 is extended, the configuration file for being defined by physical hardware carries out physical hardware and corresponds to hardware The extension of role loads.
Update module 1230 is rendered, carries out hardware role's for the configuration file by extending load for physical hardware Rendering updates, and obtains hardware role and hardware role for the movable block of configuration.
Role's configuration module 1250 is the hardware role carried out in role's interaction scenarios and performed movement for basis Movable block configuration operation, obtains the role's interaction scenarios for incorporating hardware role and hardware role mapping movable block.
Action executing module 1270, the triggering for monitoring the mapped movable block of hardware role is run, according to the fortune that is triggered Capable movable block carries out action control to corresponding physical hardware.
Figure 19 is according to the block diagram that the details of extension loading module is described shown in Figure 18 corresponding embodiment.The expansion Exhibition loading module 1210 includes at least as shown in figure 19: configuration file obtaining unit 1211 and configuration loading unit 1213.
Configuration file obtaining unit 1211, the hardware role for being carried out according to triggering it is newly-increased or for hardware role for Action of configuration block increases newly, obtains the configuration file that corresponding physical hardware is defined, configuration file is for describing newly-increased hardware The movable block that role or hardware role increase newly.
Loading unit 1213 is configured, for carrying out the load of configuration file, with development hardware role or to have extended firmly Part role increases movable block newly.
Optionally, the present invention also provides a kind of control devices of physical hardware, and the control device of the physical hardware can be former State in shown implementation environment, execute Fig. 2, Fig. 3, Fig. 4 and Fig. 5 it is any shown in physical hardware control method whole or portion Step by step.Described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing:
The configuration file being defined by physical hardware carries out the extension load that the physical hardware corresponds to hardware role;
The rendering that configuration file by extending load for physical hardware carries out hardware role updates, and obtains hardware role With the hardware role for the movable block of configuration;
It is configured and is operated according to the movable block of hardware role and performed movement to be carried out in role's interaction scenarios, melted Enter role's interaction scenarios of the hardware role and the hardware role mapping movable block;
The triggering operation for monitoring the mapped movable block of the hardware role, according to the movable block for the operation that is triggered to right Physical hardware is answered to carry out action control.
The processor of device in the embodiment executes the concrete mode of operation in the control in relation to the physical hardware Detailed description is performed in the embodiment of method, 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 104, above-metioned instruction can by the processor 118 of device 100 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. a kind of control method of physical hardware, which is characterized in that the described method includes:
The configuration file being defined by physical hardware carries out the extension load that the physical hardware corresponds to hardware role;
It is updated, is obtained by the rendering that the configuration file for extending load for the physical hardware carries out the hardware role The hardware role and the hardware role for configuration movable block;
It is configured and is operated according to the movable block of hardware role and performed movement to be carried out in role's interaction scenarios, obtained and incorporate institute State role's interaction scenarios of hardware role and the hardware role mapping movable block;
The triggering operation for monitoring the mapped movable block of the hardware role, according to the movable block for the operation that is triggered to counterpart It manages hardware and carries out action control.
2. the method according to claim 1, wherein the configuration file being defined by physical hardware carries out The physical hardware corresponds to the extension load of hardware role, comprising:
The hardware role carried out according to triggering is newly-increased or is the hardware role for the newly-increased of action of configuration block, is corresponded to The configuration file that physical hardware is defined, the configuration file is used to describe newly-increased hardware role or the hardware role is new The movable block of increasing;
The load of the configuration file is carried out, increases movable block newly with development hardware role or for development hardware role.
3. according to the method described in claim 2, it is characterized in that, the institute by extending load for the physical hardware It states configuration file and carries out the rendering of hardware role and update, obtain hardware role and the hardware role for the movable block of configuration, Include:
The configuration file of load is parsed, the role for generating hardware role or increasing movable block newly for development hardware role expands Open up object;
Object, which is extended, by the role carries out hardware role or the rendering of the newly-increased movable block of development hardware role;
Rendering is updated into the hardware role obtained or the newly-increased movable block of development hardware role is updated to role's friendship The corresponding toolbar of mutual scene.
4. the method according to claim 1, wherein the method also includes:
To incorporate the code description information that the movable block of role's interaction scenarios positions mapping respectively;
Carry out conversion of the movable block to code information according to the code description information, and to role's interaction scenarios into Code information under line code mode is shown.
5. the method according to claim 1, wherein the method also includes:
According to the code information input that role's interaction scenarios carry out under code pattern for assigned role triggering, obtain described specified The code information of the newly-increased movement of role;
According to code description information belonging to the code information positioning of the newly-increased movement of the assigned role;
The movable block that itself mapping assigned role is positioned by the code description information splices the movable block dynamic to described The movable block that assigned role has mapped in role's interaction scenarios.
6. according to the method described in claim 5, it is characterized in that, described is to refer under code pattern according to role's interaction scenarios Determine role and trigger the code information input carried out, obtains the code information of the newly-increased movement of the assigned role, comprising:
The reception that inputted character is persistently carried out under the code pattern of role's interaction scenarios is directed to inputted character and passes through Predefined code snippet mapping library carries out syntax check and/or macrodefinition matching.
7. a kind of control device of physical hardware, which is characterized in that described device includes:
Loading module is extended, the configuration file for being defined by physical hardware carries out the physical hardware and corresponds to hardware role Extension load;
Update module is rendered, carries out hardware role's for the configuration file by extending load for the physical hardware Rendering updates, and obtains hardware role and the hardware role for the movable block of configuration;
Role's configuration module, for being matched according to the movable block for being the hardware role and performed movement that carry out in role's interaction scenarios Operation is set, the role's interaction scenarios for incorporating the hardware role and the hardware role mapping movable block are obtained;
Action executing module, the triggering for monitoring the mapped movable block of the hardware role is run, according to the operation that is triggered The movable block carries out action control to corresponding physical hardware.
8. device according to claim 7, which is characterized in that the extension loading module includes:
Configuration file obtaining unit, the hardware role for being carried out according to triggering is newly-increased or is the hardware role for configuration Movable block increases newly, obtains the configuration file that corresponding physical hardware is defined, the configuration file is for describing newly-increased hardware The movable block that role or the hardware role increase newly;
Loading unit is configured, with development hardware role or is development hardware angle for carrying out the load of the configuration file Color increases movable block newly.
9. a kind of control device of 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 control method of physical hardware according to any one of claim 1 to 6 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 control method of Shi Shixian physical hardware according to any one of claim 1 to 6.
CN201711115730.6A 2017-11-13 2017-11-13 Physical hardware control method, device and computer readable storage medium Active CN109783152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711115730.6A CN109783152B (en) 2017-11-13 2017-11-13 Physical hardware control method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711115730.6A CN109783152B (en) 2017-11-13 2017-11-13 Physical hardware control method, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109783152A true CN109783152A (en) 2019-05-21
CN109783152B CN109783152B (en) 2021-08-13

Family

ID=66493063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711115730.6A Active CN109783152B (en) 2017-11-13 2017-11-13 Physical hardware control method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109783152B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258338A (en) * 2012-02-16 2013-08-21 克利特股份有限公司 Method and system for driving simulated virtual environments with real data
CN103455413A (en) * 2012-05-31 2013-12-18 联想(北京)有限公司 Method, device and system for interaction scenario test data processing of communication terminals
CN106774949A (en) * 2017-03-09 2017-05-31 北京神州四达科技有限公司 Collaborative simulation exchange method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103258338A (en) * 2012-02-16 2013-08-21 克利特股份有限公司 Method and system for driving simulated virtual environments with real data
CN103455413A (en) * 2012-05-31 2013-12-18 联想(北京)有限公司 Method, device and system for interaction scenario test data processing of communication terminals
CN106774949A (en) * 2017-03-09 2017-05-31 北京神州四达科技有限公司 Collaborative simulation exchange method, device and system

Also Published As

Publication number Publication date
CN109783152B (en) 2021-08-13

Similar Documents

Publication Publication Date Title
US10255265B2 (en) Process flow diagramming based on natural language processing
CN102662664B (en) Interface animation realization method and system
US20090313004A1 (en) Platform-Independent Application Development Framework
US8739120B2 (en) System and method for stage rendering in a software authoring tool
KR101323148B1 (en) Ucr contents editor device
Asensio et al. Emulating home automation installations through component-based web technology
KR100988597B1 (en) Robot content authoring system having user Friendly form in web environments
CN114064024A (en) Method, apparatus, device, storage medium, and program product for developing micro-application
CN104470686A (en) System and method for generating contextual behaviours of a mobile robot executed in real time
Francese et al. Supporting the development of multi-platform mobile applications
CN109544665A (en) Generation method, device and the storage medium of animation poster
CN109783144B (en) Method and device for processing variable in interactive realization of virtual environment and storage medium
CN105302558A (en) Content presentation system and method for multiple clients
JP6986590B2 (en) Voice skill creation method, voice skill creation device, electronic device and storage medium
WO2024066825A1 (en) Page project development method, apparatus, device, medium and product
KR101519381B1 (en) Apparatus and method for making web application using html5
CN101650553B (en) Application of robot manufacturing tool for controlling robot and manufacturing robot contents
CN102999371A (en) Lua script-based human-computer interface development method and system
CN113010157A (en) Code generation method and device
CN109783152A (en) Control method, device and the computer readable storage medium of physical hardware
KR20150012869A (en) System for providing contents authoring tool, apparatus and method for providing authoring tool and storage medium recording program thereof
CN104077114A (en) Method for changing display interface of application software and electronic equipment
CN113760261B (en) Graphical building block programming method and terminal based on FGUI
Gill Using React Native for mobile software development
Blumendorf Multimodal interaction in smart environments: a model-based runtime system for ubiquitous user interfaces

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
GR01 Patent grant
GR01 Patent grant