Summary of the invention
Technical matters to be solved by this invention is to provide a kind of method of execution and integrated wireless optical communication applications function in the application.
The present invention solves the problems of the technologies described above a kind of method that the technical scheme adopted is the wireless light communication of execution in the application application function, comprise the following steps: the initialization interface calling a subscriber interface module in this application program, to be enabled in a wireless light communication application toolkit integrated in this application program, this wireless light communication application toolkit comprises this subscriber interface module and a basic module, this subscriber interface module has one or more user interface bag and this initialization interface, and this basic module has one or more business interface; The first business interface of one first business interface bag in this user interface bag is loaded in this application program; In response to the first business datum that user inputs at this first business interface, call the first business interface corresponding with this first business interface in this basic module; And this first business interface by this first business datum coding and be modulated to light signal to be supplied to a light emitting devices.
In one embodiment of this invention, above-mentioned method also comprised before the step at the first business interface loading one first business interface bag in this user interface bag in this application program: the General Purpose Interface loading the General Purpose Interface bag in this user interface bag in this application program; And in response to the universal command that user inputs at this General Purpose Interface, call general-purpose interface corresponding with this General Purpose Interface in this business interface; A general request is sent at this general-purpose interface; And whether run succeeded according to this general request, determine in this application program, whether load this first business interface.
In one embodiment of this invention, above-mentioned method also comprises: the second business interface loading one second business interface bag in this user interface bag in this application program; In response to the second business datum that user inputs at this second business interface, call the second business interface corresponding with this second business interface in this basic module; And this second business interface by this second business datum coding and be modulated to light signal to be supplied to this light emitting devices.
In one embodiment of this invention, this business interface and this user interface bag are one_to_one corresponding.
In one embodiment of this invention, this basic module comprises one or more infrastructure service module, and this infrastructure service module comprises network request modules, and this general-purpose interface sends this general request by this network request modules.
In one embodiment of this invention, this infrastructure service module comprises security protection module, and the method also comprises these security protection module encryption and decryption data of use.
In one embodiment of this invention, this infrastructure service module comprises local memory module, and the method also comprises this local memory module of use and stores the wireless light communication identification code obtained.
In one embodiment of this invention, this General Purpose Interface handbag draws together login interface bag and register interface bag, and this general-purpose interface comprises login interface and registration interface.
In one embodiment of this invention, this user interface bag also comprise payment interface bag, unblank interface bag, false proof interface bag in one or more.
The present invention also proposes a kind of method of the optical communication applications of integrated wireless in the application function, comprise the following steps: obtain the wireless light communication application toolkit corresponding with this wireless light communication application function, this wireless light communication application toolkit comprises subscriber interface module and basic module, this subscriber interface module has one or more user interface bag and an initialization interface, and this basic module has one or more business interface; This wireless light communication application toolkit is imported in this Develop Application System engineering; In this application program, start entrance, the detected parameters of this wireless light communication application toolkit is set; And in this application program in the functional module corresponding with this wireless light communication application function, the initialization interface parameter of the subscriber interface module of this wireless light communication application toolkit is set.
In one embodiment of this invention, the validity of this wireless light communication application toolkit of checking is also comprised while the detected parameters of this wireless light communication application toolkit is set.
In one embodiment of this invention, this basic module also has one or more infrastructure service module.
In one embodiment of this invention, this infrastructure service module comprises local memory module, network request modules and security protection module.
The present invention is owing to adopting above technical scheme, make it compared with prior art, perform wireless light communication application function by the mode adding wireless light communication application toolkit in the application, may not request application developer self-developing wireless light communication application toolkit.And the various application based on optical communication can be realized by the wireless light communication application function of wireless light communication application toolkit.
Embodiment
Following embodiment of the present invention describes the integrated method with performing wireless light communication application function in the application.At this, wireless light communication application function refers to the application function based on wireless light communication, such as, based on functions such as the payment of optical communication, identification, false proof, data transmission.Wireless light communication can carry out in free space, and the light used can be visible ray, ultraviolet light or infrared light.
At this, propose a kind of wireless light communication application toolkit, it is the software package with aforesaid wireless light communication application function.Wireless light communication application toolkit can have a wireless light communication application function, also can have multiple wireless light communication application function.The one or more modules performing required function are included in wireless light communication application toolkit.According to required wireless light communication application function, wireless light communication application toolkit optionally can configure modules.Can comprise some general modules in wireless light communication application toolkit, this is the module that various application function all can need.In wireless light communication application toolkit, also can comprise some particular modules, this is the module that application specific functionality just can need.
Fig. 1 illustrates the framework of wireless light communication application toolkit according to an embodiment of the invention.Shown in figure 1, the wireless light communication application toolkit 100 of the present embodiment comprises user interface (UserInterface, UI) module 110 and basic module 120.Subscriber interface module 110 is responsible for process user incoming event, and basic module 120 is responsible for process service logic.As shown in Figure 1, subscriber interface module 110 has initialization interface 111 and multiple user interface bag 112.Initialization interface 111 is supplied to application program and calls, for starting wireless light communication application toolkit 100.These user interface bags 112 such as can comprise the first business interface bag 112b, the second business interface bag 112c etc. of General Purpose Interface bag 112a and application-specific scene.General Purpose Interface bag 112a provides some reusable user interfaces, such as, verify interface, login interface and register interface.112b, the second user interface bag 112c are wrapped as configurable option, by application call in the first user interface of application-specific scene.
Basic module 120 can comprise some business interfaces 121, provides business support to subscriber interface module 110.These business interfaces 121 can with user interface bag 112 one_to_one corresponding above.Such as, the corresponding second business interface bag 112c of general-purpose interface 121a corresponding General Purpose Interface bag 112a, the first business interface 121b corresponding first business interface bag 112b, the second business interface 121c.
Fig. 2 illustrates the framework of wireless light communication application toolkit according to another embodiment of the present invention.Shown in figure 2, the wireless light communication application toolkit 200 of the present embodiment comprises subscriber interface module 210 and basic module 220.Subscriber interface module 210 is responsible for process user incoming event, and basic module 220 is responsible for process service logic.As shown in Figure 2, subscriber interface module 210 has initialization interface 211 and multiple user interface bag 212.Initialization interface 211 is supplied to application program and calls, for starting wireless light communication application toolkit 200.These user interface bags 212 such as can comprise the first business interface bag 212b, the second business interface bag 212c etc. of General Purpose Interface bag 212a and application-specific scene.General Purpose Interface bag 212a provides some reusable user interfaces, such as, verify interface, login interface and register interface.212b, the second user interface bag 212c are wrapped as configurable option, by application call in the first user interface of application-specific scene.
Basic module 220 can comprise some business interfaces 221, provides business support to subscriber interface module 210.These business interfaces 221 can be corresponding with user interface bag 212 above.Such as, the corresponding second business interface bag 212c of general-purpose interface 221a corresponding General Purpose Interface bag 212a, the first business interface 222a corresponding first business interface bag 212b, the second business interface 222c.
Basic module 220 also can comprise some infrastructure service modules 222, as local memory module 222a, network request modules 222b and security protection module 222c.Local memory module 222a is used for data, and such as corresponding with application program or portable electric appts photon identification code is stored in this locality.Network request modules 222b is used for sending request to network.Security protection module 222c is used for being encrypted transmission data, to reception decrypt data.
Although illustrate that wireless light communication application toolkit has General Purpose Interface bag and general-purpose interface in fig. 1 and 2, but be appreciated that, if there are the means identifying validated user reliably in the electronic equipment at application program, operating system or its place, then wireless light communication application toolkit can not have General Purpose Interface bag and general-purpose interface.
When application development, above-mentioned wireless light communication application toolkit can be integrated in application program.Wireless light communication application toolkit can be provided by the developer beyond application program person.Like this, application developer need not be redeveloped the program needed for above-mentioned execution wireless light communication application function voluntarily.And wireless light communication application toolkit can be reused in multiple application program, save the resource needed for exploitation.When application developer needs integrated wireless optical communication applications function, corresponding kit can be downloaded according to own service demand.
Fig. 3 illustrates the method flow diagram of integrated wireless optical communication applications function in the application according to an embodiment of the invention.Shown in figure 3, the method for the present embodiment comprises the following steps:
In step 301, obtain the wireless light communication application toolkit corresponding with wireless light communication application function;
In step 302, wireless light communication application toolkit is imported in Develop Application System engineering;
In step 303, start entrance in the application, the detected parameters of wireless light communication application toolkit is set;
In step 304, in functional module corresponding with wireless light communication application function in the application, the initialization interface parameter of the subscriber interface module of wireless light communication application toolkit is set.
Fig. 4 illustrates the method flow diagram of integrated wireless optical communication applications function in the application according to an embodiment of the invention.Shown in figure 4, the method for the present embodiment comprises the following steps:
In step 401, obtain the wireless light communication application toolkit corresponding with wireless light communication application function;
In step 402, wireless light communication application toolkit is imported in Develop Application System engineering;
In step 403, start entrance in the application, the detected parameters of wireless light communication application toolkit is set, and the validity of checking wireless light communication application toolkit;
In step 404, in functional module corresponding with wireless light communication application function in the application, the initialization interface parameter of the subscriber interface module of wireless light communication application toolkit is set.
Fig. 3 and embodiment illustrated in fig. 4 in, wireless light communication application toolkit can be the wireless light communication application toolkit shown in Fig. 1, Fig. 2 or its change embodiment.
Once be integrated with wireless light communication application toolkit in application program, the portable electric appts of user can be provided to, such as, in smart mobile phone, panel computer or wearable device.Fig. 5 illustrates the portable electric appts software architecture according to an embodiment of the invention with wireless light communication application toolkit.Shown in figure 5, software architecture 500 comprises application layer 510, wireless light communication application layer 520 and podium level 530.Podium level 530 can be the platforms such as iOS, Android, WindowsPhone, BlackBerry, Symbian.
Fig. 6 illustrates the method flow diagram performing wireless light communication application function according to an embodiment of the invention in the application.Shown in figure 1 and Fig. 6, the method for the present embodiment comprises the following steps:
In step 601, call the initialization interface 111 of a subscriber interface module 110 in the application, to start wireless light communication application toolkit 100 integrated in the application.
In step 602, load the General Purpose Interface of the General Purpose Interface bag 112a in user interface bag 112 in the application.
In step 603, in response to the universal command that user inputs at General Purpose Interface, call general-purpose interface 121a corresponding with General Purpose Interface in business interface.
In step 604, send a general request at general-purpose interface 121a.
In step 605, run succeeded in response to general request 121a, load the first business interface of one first business interface bag 112b in user interface bag in the application.
In step 606, in response to the first business datum that user inputs at this first business interface, call the first business interface corresponding with this first business interface in this basic module.
In step 607, the first business interface 121b by first business datum coding and be modulated to light signal to be supplied to a light emitting devices.
As an alternative, step 605-607 can be respectively: run succeeded in response to general request, loads the second business interface of one second business interface bag in user interface bag in the application; In response to the second business datum that user inputs at the second business interface, call the second business interface corresponding with the second business interface in basic module; The second business interface by second business datum coding and be modulated to light signal to be supplied to light emitting devices.
In one embodiment, light emitting devices is such as the flashlamp of portable electric appts.
Be that in step 604, general-purpose interface 121a by security protection module 222c enciphered data, and sends general request by network request modules 222b for flow change shown in wireless light communication application toolkit 200, Fig. 6 embodiment illustrated in fig. 2.In step 605, the data that can be run succeeded by security protection module 222c deciphering general request 121a, and by local memory module 222a, the photon identification code corresponding with application program or portable electric appts is stored in this locality.In step 607, the first business datum is encrypted by security protection module 222c.
In the flow process of Fig. 6 A or its change case, the General Purpose Interface of loading can be checking interface or login interface.Checking interface can be gesture checking, password authentication, fingerprint authentication or other known local verification mode.By this checking, wireless light communication application toolkit can identify whether user is validated user.Now, wireless light communication application toolkit can use the local still photon identification code before the deadline stored to carry out the first business.That is, the term of validity can being set for photon identification code, allowing user to carry out business when not logging in the term of validity.Login interface can be input user name, password or other known remote access mode.By logging in, remote server can identify whether user is validated user, and when being identified as validated user, provides photon identification code to wireless light communication application toolkit.Wireless light communication application toolkit can use this photon identification code temporarily obtained to carry out the first business.
Although load General Purpose Interface to carry out verifying or logging in the flow process of Fig. 6 A, be appreciated that if there are the means identifying validated user reliably in the electronic equipment at application program, operating system or its place, then can not load General Purpose Interface.Now, wireless light communication application toolkit can be used in the local still photon identification code before the deadline stored and carries out the first business.According to this design simplified embodiment as shown in Figure 6B, its flow process comprises the steps.
In step 611, call the initialization interface 111 of a subscriber interface module 110 in the application, to start wireless light communication application toolkit 100 integrated in the application.
In step 612, load the first business interface of one first business interface bag 112b in user interface bag in the application.
In step 613, in response to the first business datum that user inputs at this first business interface, call the first business interface corresponding with this first business interface in this basic module.
In step 614, the first business interface 121b by first business datum coding and be modulated to light signal to be supplied to a light emitting devices.
Fig. 7 illustrates the example of the wireless light communication application toolkit according to the embodiment of the present invention.Shown in figure 7, the wireless light communication application toolkit 700 of this example comprises user interface (UserInterface, UI) module 710 and basic module 720.Subscriber interface module 710 is responsible for process user incoming event, and basic module 720 is responsible for process service logic.Subscriber interface module 710 has initialization interface 711 and user interface bag 712, such as login interface bag 712a and payment interface bag 712b.Initialization interface 111 is supplied to application program and calls, for starting wireless light communication application toolkit 100.Login interface bag 712a provides login interface.
Basic module 720 can comprise login interface 721a and payment interface 721b.Basic module 720 comprises local memory module 722a, network request modules 722b and security protection module 722c simultaneously.
General Purpose Interface bag is above for login interface bag.General Purpose Interface bag can also comprise checking interface bag and register interface bag.General Purpose Interface bag and general-purpose interface are corresponding.If login interface bag drawn together by General Purpose Interface handbag, general-purpose interface comprises login interface.If checking interface bag drawn together by General Purpose Interface handbag, general-purpose interface comprises checking interface.If register interface bag drawn together by General Purpose Interface handbag, general-purpose interface comprises registration interface.
To swipe the card under using above-mentioned payment interface bag 712b to can be used for line payment scene, utilize " scratch brushing " to replace tradition to swipe the card operation.Fig. 8 illustrates the method flow example performing wireless light communication application function in the application according to the embodiment of the present invention.Shown in figure 8, flow process comprises the following steps:
In step 801, call the initialization interface 711 of a subscriber interface module 710 in the application, to start wireless light communication application toolkit 700 integrated in the application.
In step 802, load the login interface of login interface bag 712a in the application.
Figure 10 illustrates exemplary login interface 1000.By Fig. 9, registration then can illustrate that exemplary register interface 900 completes in advance.
In step 803, in response to the instruction that user inputs at login interface 1000, call login interface 721a corresponding with General Purpose Interface in business interface.Instruction is such as " cell-phone number ", " password " etc.
In step 804, send a logging request at login interface 721a.
In step 805, run succeeded in response to logging request, load the payment interface of payment interface bag 712b in the application.
Figure 12 illustrates exemplary payment interface 1200.If user has bound bank card (tying up card interface 1100 shown in use Figure 11 to complete) before, then load data the information that can store from this locality, and use safety protection module 722b data decryption.User can select a wherein bank card, and clicks payment button.
In step 806, in response to the payment data that user inputs in payment interface 1200, call payment interface 721b corresponding with payment interface in basic module 720.
In step 807, payment interface 721b by first business datum coding and be modulated to light signal to be supplied to a light emitting devices.At this, payment data can be encrypted by use safety protection module 722b, complete transaction.
The business interface bag of the embodiment of the present invention is not limited to payment interface bag, can also be unblank interface bag, false proof interface bag etc.
Although the present invention describes with reference to current specific embodiment, but those of ordinary skill in the art will be appreciated that, above embodiment is only used to the present invention is described, change or the replacement of various equivalence also can be made when not departing from spirit of the present invention, therefore, as long as all will drop in the scope of claims of the application the change of above-described embodiment, modification in spirit of the present invention.