CN103645896B - Method and device for achieving application function based on HTML5 - Google Patents

Method and device for achieving application function based on HTML5 Download PDF

Info

Publication number
CN103645896B
CN103645896B CN201310635003.8A CN201310635003A CN103645896B CN 103645896 B CN103645896 B CN 103645896B CN 201310635003 A CN201310635003 A CN 201310635003A CN 103645896 B CN103645896 B CN 103645896B
Authority
CN
China
Prior art keywords
application
photographic head
code
operation object
opened
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310635003.8A
Other languages
Chinese (zh)
Other versions
CN103645896A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310635003.8A priority Critical patent/CN103645896B/en
Publication of CN103645896A publication Critical patent/CN103645896A/en
Application granted granted Critical
Publication of CN103645896B publication Critical patent/CN103645896B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and device for achieving the application function based on an HTML5, and relates to the technical field of communication. The method and device solve the problem that the process of executing an application to be executed based on the HTML5 is complex. The method specifically comprises the following steps: application operation information is received, wherein the application operation information comprises an application operation instruction and the information of an operation object corresponding to the application to be executed, and the application operation instruction is used for instructing the application to be executed; an application tag corresponding to the application to be executed is searched for, wherein the application tag is unique; the application to be executed is executed according to the information of the operation object and the application tag. The method and device can be applied to execution of the application to be executed.

Description

Realize the method and apparatus of application function based on HTML5
Technical field
The present invention relates to communication technical field, more particularly, to it is based on HTML5(Hypertext Markup Language, surpasses Text mark up language)Realize the method and apparatus of application function.
Background technology
Html possesses the easy characteristic of application and development, camera(Photographing unit)Related application is the weight of Mobile operating system Want part, can develop camera correlation function based on html becomes increasingly urgent.
Html latest edition is Html5, in MultiMedia Field, it can support that audio frequency (audio), video (video) are drawn Etc. (canvas) function of three aspects, in other words, can realize corresponding work(by multiple Html5 labels in MultiMedia Field Can, wherein, Html5 label can include:Audio tag, video tab, drawing label etc..
In prior art, in webRTC(Web Real-Time Communications, networked realtime communication)(I.e. one Carry out the technology of real-time video and voice communication inside browser)In camera function can be added separately to multiple In Html5 label, when calling corresponding camera function, can call from multiple Html5 labels accordingly and count accordingly According to realize corresponding camera function.
State in realization during application function is realized based on HTML5, in prior art, at least there are the following problems:Real Now corresponding Camera function needs to coordinate by multiple html5 labels and realizes, i.e. the application of Camera function is realized in execution Process is complex.
Content of the invention
Embodiments of the invention provide a kind of method and apparatus realizing application function based on HTML5, solve and are based on HTML5 executes the complex problem of process of pending application.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that:
In a first aspect, providing a kind of method that application function is realized based on HTML5, including:
Receive application operating information, described application operating information includes application operating instruction and the corresponding behaviour of pending application Make the information of object, described application operating instructs for indicating described pending application;
Search and the corresponding application label of described pending application, described application label is unique;
Information according to described operation object and described application label execute described pending application.
In conjunction with a first aspect, in the first possible implementation, described application label includes:Interface layer, business are patrolled Collect layer, platform adaptation layer;
The described information according to described operation object and described application label execute described pending application, including:
Described interface layer is searched and the corresponding interface of described pending application;
Search service logic corresponding with described interface and execute code from described Business Logic;
On described Business Logic, the information according to described operation object enters industry to described service logic execution code Business logical process, obtains hardware interaction execution code;
In described platform adaptation layer, accordingly grasped according to the described operation object execution of described hardware interaction execution code instruction Make, described corresponding operating is the corresponding operation of described pending application.
In conjunction with the first possible implementation of first aspect, in the possible implementation of second, described wait to hold Row application includes:For switching the application of photographic head;
The described information according to described operation object carries out business logic processing to described service logic execution code, obtains Hardware interaction execution code, including:
Code is executed according to described service logic and judges whether the quantity of photographic head is more than 1;
The information life of code and described operation object if the quantity of photographic head is more than 1, is executed according to described service logic Become described hardware interaction execution code, described operation object includes:The current photographic head opened and specified photographic head to be opened, Described hardware interaction execution code includes:The mark of the photographic head of described current unlatching and described specified photographic head to be opened Mark;
Described interaction according to described hardware executes code instruction described operation object execution corresponding operating, including:
Opened according to the described specified photographic head to be opened of described hardware interaction execution code instruction, and indicate described current The photographic head opened is closed.
The first possible implementation in conjunction with first aspect or the possible implementation of second, may at the third Implementation in, described pending application includes:For opening the application of photographic head;
The described information according to described operation object carries out business logic processing to described service logic execution code, obtains Hardware interaction execution code, including:
Code is executed according to described service logic and the information of described operation object judges that specified photographic head to be opened is No permission is used, and described operation object includes:Described specified photographic head to be opened;
If described specified photographic head to be opened is allowed to use, code and described behaviour are executed according to described service logic The information making object generates described hardware interaction execution code, and described hardware interaction execution code includes:Described finger to be opened Determine the mark of photographic head;
Described interaction according to described hardware executes code instruction described operation object execution corresponding operating, including:
Opened according to the described specified photographic head to be opened of described hardware interaction execution code instruction.
In conjunction with first aspect the first possible implementation to any one mode in the third possible implementation, In the 4th kind of possible implementation, described pending application includes:Application for shooting image;
The described information according to described operation object carries out business logic processing to described service logic execution code, obtains Hardware interaction execution code, including:
Code is executed according to described service logic and the information of described operation object generates described hardware interaction execution code, Described operation object includes:The current photographic head opened, described hardware interaction execution code includes:The shooting of described current unlatching The mark of head;
Described interaction according to described hardware executes code instruction described operation object execution corresponding operating, including:
Indicate the photographic head execution photographing operation of described current unlatching according to described hardware interaction execution code.
Second aspect, provides a kind of method realizing application function based on HTML5, including:
Receiving unit, for receiving application operating information, described application operating information includes application operating instruction and waits to hold Row applies the information of corresponding operation object, and described application operating instructs for indicating described pending application;
Searching unit, for searching and the corresponding application label of described pending application, described application label is unique;
Performance element, executes described pending application for the information according to described operation object and described application label.
In conjunction with second aspect, in the first possible implementation, described application label includes:Interface layer, business are patrolled Collect layer, platform adaptation layer;
Described performance element, including:
Searching modul, for searching and the corresponding interface of described pending application in described interface layer;From described business Search service logic corresponding with described interface in logical layer and execute code;
Business logic processing module, in described Business Logic, the information according to described operation object is to described Service logic execution code carries out business logic processing, obtains hardware interaction execution code;
Performing module, in described platform adaptation layer, indicating described operation according to described hardware interaction execution code Object executes corresponding operating, and described corresponding operating is the corresponding operation of described pending application.
In conjunction with the first possible implementation of second aspect, in the possible implementation of second, described wait to hold Row application includes:For switching the application of photographic head;
Described business logic processing module, specifically for executing, according to described service logic, the quantity that code judges photographic head Whether it is more than 1;If the quantity of photographic head is more than 1, execute the information of code and described operation object according to described service logic Generate described hardware interaction execution code, described operation object includes:The current photographic head opened and specified shooting to be opened Head, described hardware interaction execution code includes:The mark of the photographic head of described current unlatching and described specified shooting to be opened The mark of head;
Described performing module, specifically for indicating described specified shooting to be opened according to described hardware interaction execution code Head is opened, and indicates the photographic head closing of described current unlatching.
The first possible implementation in conjunction with second aspect or the possible implementation of second, may at the third Implementation in, described pending application includes:For opening the application of photographic head;
Described business logic processing module, specifically for executing code and described operation object according to described service logic Information judges whether specified photographic head to be opened allows to be used, and described operation object includes:Described to be opened specified take the photograph As head;If described specified photographic head to be opened is allowed to use, code and described operation are executed according to described service logic The information of object generates described hardware interaction execution code, and described hardware interaction execution code includes:Described to be opened specifying The mark of photographic head;
Described performing module, specifically for indicating described specified shooting to be opened according to described hardware interaction execution code Head is opened.
In conjunction with second aspect the first possible implementation to any one mode in the third possible implementation, In the 4th kind of possible implementation, described pending application includes:Application for shooting image;
Described business logic processing module, specifically for executing code and described operation object according to described service logic Information generates described hardware interaction execution code, and described operation object includes:The current photographic head opened, described hardware interaction is held Line code includes:The mark of the photographic head of described current unlatching;
Described performing module, specifically for indicating the photographic head of described current unlatching according to described hardware interaction execution code Execution photographing operation.
The method and apparatus realizing application function based on HTML5 provided in an embodiment of the present invention, receives application operating information, Described application operating information includes application operating instruction and the pending information applying corresponding operation object, described application operating Instruct for indicating described pending application;Search and the corresponding application label of described pending application, described application label is Uniquely;Information according to described operation object and described application label execute described pending application.After such scheme, Wait to hold it is only necessary to just can perform by a unique application label corresponding with pending application when executing pending application Row application, to execute with coordinating by multiple html5 labels in prior art compared with applying accordingly, to simplify the process of realization, Also simplify development process simultaneously.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, also may be used So that other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is in prior art, realizes the flow chart being related to the application of image capture device under the framework of webrtc;
A kind of flow chart of method realizing application function based on HTML5 that Fig. 2 provides for the present embodiment;
The flow chart that Fig. 3 realizes the method for application function for the another kind that the present embodiment provides based on HTML5;
Fig. 4 is the flow chart being executed using the method shown in Fig. 3 for browsing the application clapping picture;
A kind of structural representation of device realizing application function based on HTML5 that Fig. 5 provides for the present embodiment;
Fig. 6 realizes the structural representation of the device of application function for the another kind that the present embodiment provides based on HTML5.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation description is it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of not making creative work Embodiment, broadly falls into the scope of protection of the invention.
As shown in figure 1, in prior art, realizing under the framework of webrtc being related to the flow process of the application of image capture device Figure, in order to realize browser internal support audio frequency and video real-time Communication for Power, needs for corresponding application request to be transplanted to browser engine Middle use;The execution being related to the application of image capture device can be realized by html5 label and JavaScript interface, its In, html5 label can include:Video label(A kind of video tab), image label(A kind of image tag), canvas mark Sign(A kind of painting canvas label)Etc. multiple labels.
Wherein, the getUsermedia () in Fig. 1 can be one of html5 function, is that those skilled in the art are ripe The technology known, will not be described here.
In method shown in Fig. 1, the application realizing being related to image capture device is to need to join by multiple html5 labels Close and realize, implementation procedure is complex.
In order to solve the above problems, the present embodiment provides a kind of realization due to the method for function, as Fig. 2 institute based on HTML5 Show, can include:
201st, receive application operating information.
It is necessary first to receive application operating information before executing pending application, then according to the application operating receiving Information executes pending application.
Wherein, described application operating information can be, but not limited to including:Application operating instruction and pending application are corresponding The information of operation object, described application operating instruction can serve to indicate that described pending application.
As an embodiment of the present embodiment, the application operating information of reception can be, but not limited to send for user 's.
202nd, search and the corresponding application label of described pending application.
Wherein, described application label is unique, and that is, pending application is only corresponding with unique one application label.
203rd, the information according to described operation object and described application label execute described pending application.
In the present embodiment, during the pending application of execution required data be all contained in corresponding with pending application unique An application label in this unique application label can only to be passed through just can execute pending application.
In the present embodiment, receive application operating information, described application operating information includes application operating and instructs and pending Apply the information of corresponding operation object, described application operating instructs for indicating described pending application;Search and treat with described Corresponding application label is applied in execution, and described application label is unique;Information according to described operation object and described application Label executes described pending application.After such scheme, when executing pending application it is only necessary to answer by with pending With corresponding unique one application label just can perform pending application, with prior art in join by multiple html5 labels Close and compare to execute to apply accordingly, simplify implementation procedure, also simplify development process simultaneously.
In daily customer service occasion, such as in video calling, all have the demand that dual camera is used, but prior art Scheme only support to open a photographic head it is impossible to the multiple photographic head of free switching, reduce Consumer's Experience.
In order to solve the above problems and background technology in the problem mentioned, the present embodiment provides another kind of real based on HTML5 The method of existing application function, wherein, the method is further expanding and optimize to the method shown in Fig. 2, and the present embodiment Executive agent can be, but not limited to as browser engine, as shown in figure 3, can include:
301st, the application operating information that browser engine receive user sends.
It is necessary first to receive application operating information before executing pending application, then according to the application operating receiving Information executes pending application.
Wherein, application operating information can be, but not limited to including:Application operating instruction and the corresponding operation of pending application The information of object, described application operating instruction can serve to indicate that described pending application.
As an embodiment of the present embodiment, pending application can be, but not limited to for:It is related to image capture device Application, be related to application of voice capture device etc..
For example, application operating instruction can be, but not limited to be related to the application of image capture device, application for instruction execution Operation information can include:Execution is related to the application operating instruction of the application of image capture device, and execution is related to image and adopts Information of the corresponding operation object of application of collection equipment etc..
Further, application operating instruction specifically can be, but not limited to for indicating below image capture device execution at least The application of one operation:Open, close, taking pictures, imaging, picture browsing(The picture browsing can be by image capture device The picture shooting or locally stored picture), switching shooting first-class.Wherein, the photographic head providing in the present embodiment is to be arranged at Photographic head in image capture device.
302nd, search and the corresponding application label of described pending application.
Wherein, described application label is unique.
In the present embodiment, in order to simplify development process and application implementation procedure, can be involved by executing pending application All data all encapsulate with unique one application label in, when executing pending application, only unique one by this Application label, that is, when executing pending application, can apply corresponding unique one to answer by calling with pending Realized with the corresponding data in label.
Below application label is simply introduced.
Further, application label can be, but not limited to as HTML5 label, and applies the label can be and HTML5 label Structure identical label, for example, is specifically as follows canvas label or video label etc..
As an embodiment of the present embodiment, the present embodiment can be obtained by changing the source code of browser engine Application label is provided.
Further, application label can be, but not limited to including:Interface layer, Business Logic, platform adaptation layer.Wherein, Interface layer can be, but not limited to as JavaScript interface layer.
Interface layer can include:The pending application one-to-one interface different from least one, may be used to provide Use to developer, that is, user can be able to be shown as on code level by interface layer and browser engine transmission data Increase CameraCanvasContext.idl file.
Business Logic can include:The pending application corresponding service logic execution code different from least one, I.e. Business Logic can include the interfaces different from least one corresponding service logic execution code, and service logic executes generation Code can be the execution method of pending application, and Business Logic can be also used for executing code to pending according to service logic Application carry out business logic processing and with the interacting of platform adaptation layer, there is the effect formed a connecting link.Platform adaptation layer master Can be, but not limited to for realize on different operating system platform with the interacting of hardware device.
What deserves to be explained is, the structure of application label is identical with the structure of HTML5 label, and the present embodiment is to HTML5 label Structure be not construed as limiting, be technology well known to those skilled in the art, will not be described here.
303rd, browser engine is searched and the corresponding interface of described pending application in described interface layer.
As an embodiment of the present embodiment, interface layer can be provided with multiple and different application one-to-one corresponding Interface, for example, in interface layer, be provided with 6 interfaces, above-mentioned 6 interfaces can be, but not limited to respectively with realize following being related to figure Application as collecting device corresponds:Open photographic head, close photographic head, take pictures, image, picture browsing, switching photographic head.
For example, if pending application is the application for opening image capture device, browser engine can exist first Search in interface layer and the corresponding interface of application opening image capture device.The present embodiment is not limited to the above-mentioned example enumerated Son, can also be other scenes, will not be described here.
304th, browser engine searches service logic execution code corresponding with described interface from described Business Logic.
As an embodiment of the present embodiment, can store in the Business Logic of application label and answer with pending With corresponding service logic execute code, i.e. the execution method of pending application, browser engine find with pending should After corresponding interface, service logic execution code corresponding with described interface can be searched from described Business Logic.
The present embodiment executes storage mode in Business Logic for the code to service logic and acquisition modes do not limit Fixed, can be set according to actual needs, be will not be described here.
305th, on described Business Logic, browser engine is according to the information of described operation object to described service logic Execution code carries out business logic processing, obtains hardware interaction execution code.
Further, if described pending application includes:For switching the application of photographic head, then in described Business Logic On, browser engine carries out business logic processing according to the information of described operation object to described service logic execution code, obtains To hardware interaction execution code can be, but not limited to including:
Code is executed according to described service logic and judges whether the quantity of photographic head is more than 1;
The information life of code and described operation object if the quantity of photographic head is more than 1, is executed according to described service logic Become described hardware interaction execution code, described operation object includes:The current photographic head opened and specified photographic head to be opened, Described hardware interaction execution code includes:The mark of the photographic head of described current unlatching and described specified photographic head to be opened Mark.
Further, if described pending application includes:For opening the application of photographic head, then in described Business Logic On, browser engine carries out business logic processing according to the information of described operation object to described service logic execution code, obtains Can include to hardware interaction execution code:
Code is executed according to described service logic and the information of described operation object judges that specified photographic head to be opened is No permission is used, and described operation object includes:Described specified photographic head to be opened;
If described specified photographic head to be opened is allowed to use, code and described behaviour are executed according to described service logic The information making object generates described hardware interaction execution code, and described hardware interaction execution code includes:Described finger to be opened Determine the mark of photographic head.
Further, if described pending application includes:For the application of shooting image, then in described Business Logic On, browser engine carries out business logic processing according to the information of described operation object to described service logic execution code, obtains Can include to hardware interaction execution code:
Code is executed according to described service logic and the information of described operation object generates described hardware interaction execution code, Described operation object includes:The current photographic head opened, described hardware interaction execution code includes:The shooting of described current unlatching The mark of head.
As an embodiment of the present embodiment, logical process application being carried out in Business Logic can be placed on c+ + realize being processed in class CameraRenderingContext.
What deserves to be explained is, can include in the interface layer providing in the present embodiment applying corresponding connecing with least one Mouthful, business logic processing layer can include executing code with least one corresponding service logic of application described.I.e. in interface layer Can include and for switching the application of photographic head, for opening the application of photographic head, being used for application of shooting image etc. at least A kind of corresponding interface of application, business logic processing layer can include and at least one application above-mentioned corresponding service logic execution Code.
The present embodiment is not construed as limiting to the species of pending application, can be set according to actual needs, and here is no longer Repeat.
306th, in described platform adaptation layer, browser engine indicates described operation according to described hardware interaction execution code Object executes corresponding operating.
As an embodiment of the present embodiment, browser engine can be by platform adaptation layer and corresponding hardware I.e. the pending information applying corresponding operation object interacts.
Described hardware interaction execution code can be that Business Logic sends to platform adaptation layer.
Further, if described pending application includes:For switching the application of photographic head, then in described platform adaptation layer On, browser engine can include according to the described operation object execution corresponding operating of described hardware interaction execution code instruction:
Opened according to the described specified photographic head to be opened of described hardware interaction execution code instruction, and indicate described current The photographic head opened is closed.
Further, if described pending application includes:For opening the application of photographic head, then in described platform adaptation layer On, browser engine can include according to the described operation object execution corresponding operating of described hardware interaction execution code instruction:
Opened according to the described specified photographic head to be opened of described hardware interaction execution code instruction.
Further, if described pending application includes:For the application of shooting image, then in described Business Logic On, browser engine carries out business logic processing according to the information of described operation object to described service logic execution code, obtains Can include to hardware interaction execution code:
Indicate the photographic head execution photographing operation of described current unlatching according to described hardware interaction execution code.
, in described platform adaptation layer, browser engine is according to described hardware interaction execution code instruction institute for the present embodiment The method stating operation object execution corresponding operating is not construed as limiting, and is technology well known to those skilled in the art, will not be described here.
In addition, application label in platform adaptation layer on, browser engine can also realize for a certain pending should Interface in a corresponding unique application label, service logic execute the hardware interface of code and operation object Encapsulation, conveniently can be directly using the data after encapsulation when subsequently executing this application again.
Or, described hardware interaction execution code can also only be entered by browser engine with the information of corresponding operation object Row encapsulation, conveniently when subsequently executing this application more directly using the data after encapsulation.
The method that the present embodiment is packaged to the corresponding information to hardware interaction execution code and operation object is not made Limit, be technology well known to those skilled in the art, will not be described here.
To sum up, can be included according to the step that unique one application label executes pending application:
Browser engine determines and the corresponding interface of pending application in interface layer;Search from described Business Logic Service logic corresponding with described interface executes code;On described Business Logic, according to the information pair of described operation object Described service logic execution code carries out business logic processing, obtains hardware interaction execution code, and hardware interaction is executed generation Code sends to platform adaptation layer;In described platform adaptation layer, right according to the described operation of described hardware interaction execution code instruction As executing corresponding operating, described corresponding operating is the corresponding operation of described pending application.
The present embodiment can be mainly used in Mobile operating system relevant real-time video media related occasion, e.g., image Collecting device, videocorder, video calling etc..
A specific example is set forth below.
It is to illustrate for as a example browsing the application clapping picture by pending application, as shown in figure 4, being used for for execution The flow chart browsing the application clapping picture.
When web application execution browse taken a picture operation when, browser engine can by be used for browsing This application realized by the corresponding unique application label of application clapping picture, specifically can include:Browser engine is described Search in interface layer and be used for browsing the corresponding interface of application clapping picture;Search and this interface from described Business Logic Corresponding service logic executes code, searches the execution side for browsing the application clapping picture from described Business Logic Method;On described Business Logic, the information according to described operation object carries out business to described service logic execution code and patrols Collect and process, obtain hardware interaction execution code, specifically can include:Obtain the number of local picture;Judge local picture number Whether it is less than 1;If picture number is less than 1, executes this and fail and quit a program for browsing the application clapping picture, if figure Piece number is not less than 1, then designated pictures to be browsed are read out, and according to the data display form of place system to specifying Picture enters row format conversion;Generate hardware interaction execution code in Business Logic, and hardware interaction execution code is sent To platform adaptation layer;In described platform adaptation layer, indicate that described operation object is held according to described hardware interaction execution code Row corresponding operating, specifically can include:The designated pictures entered after row format conversion are plotted in painting canvas and go to realize specifying figure The display of piece, according to circumstances can also be adjusted to the size of picture, direction etc., then can update the data.
For another example, can realize showing local preview image in real time, capturing local image, browse this by above-described embodiment The operations such as ground photo, operating process can include:
1st, select image capture device application icon from the list of application of mobile terminal and open, after system default is opened Put photographic head, now show the preview real time imaging of post-positioned pick-up head.
2nd, click on button of taking pictures to take pictures, obtain picture and local file is saved as with jpeg form.
3rd, take pictures end, recover preview be take pictures before state.
4th, click on switching push button, switching photographic head is preposition, now shows preposition preview real time imaging.
5th, click on and take figure button, filed a document piece in preview picture library, now gone out to be wanted the picture checked.
6th, close photographic head, return to list of application.
In the present embodiment, receive application operating information, described application operating information includes application operating and instructs and pending Apply the information of corresponding operation object, described application operating instructs for indicating described pending application;Search and treat with described Corresponding application label is applied in execution, and described application label is unique;Information according to described operation object and described application Label executes described pending application.After such scheme, when executing pending application it is only necessary to answer by with pending With corresponding unique one application label just can perform pending application, with prior art in join by multiple html5 labels Close and compare to execute to apply accordingly, simplify the process of realization, also simplify development process simultaneously, furthermore it is possible to pass through image The switching of photographic head realized by collecting device label.
Some device embodiments are provided below, this device embodiment is respectively at the corresponding embodiment of the method phase of above-mentioned offer Corresponding.
The present embodiment provides a kind of device realizing application function based on HTML5, as shown in figure 5, can include:
Receiving unit 51, for receiving application operating information, described application operating information includes application operating instruction and treats The information of corresponding operation object is applied in execution, and described application operating instructs for indicating described pending application;
Searching unit 52, for searching and the corresponding application label of described pending application, described application label is unique 's;
Performance element 53, for the information according to described operation object and described application label execution described pending should With.
In the present embodiment, receiving unit, for receiving application operating information, described application operating information includes application operating Instruction and the pending information applying corresponding operation object, described application operating instructs for indicating described pending application; Searching unit, for searching and the corresponding application label of described pending application, described application label is unique;Execute list Unit, executes described pending application for the information according to described operation object and described application label.After such scheme, Wait to hold it is only necessary to just can perform by a unique application label corresponding with pending application when executing pending application Row application, to execute with coordinating by multiple html5 labels in prior art compared with applying accordingly, to simplify the process of realization, Also simplify development process simultaneously.
The present embodiment provides another kind of device realizing application function based on HTML5, and this device is to the device shown in Fig. 5 Further expanding and optimizing, as shown in fig. 6, can include:
Receiving unit 61, for receiving application operating information, described application operating information includes application operating instruction and treats The information of corresponding operation object is applied in execution, and described application operating instructs for indicating described pending application;
Searching unit 62, for searching and the corresponding application label of described pending application, described application label is unique 's;
Performance element 63, for the information according to described operation object and described application label execution described pending should With.
Further, described application label includes:Interface layer, Business Logic, platform adaptation layer;
Described performance element 63, including:
Searching modul 631, for searching and the corresponding interface of described pending application in described interface layer;From described industry Search service logic corresponding with described interface in business logical layer and execute code;
Business logic processing module 632, in described Business Logic, the information according to described operation object is to institute State service logic execution code and carry out business logic processing, obtain hardware interaction execution code;
Performing module 633, in described platform adaptation layer, indicating described behaviour according to described hardware interaction execution code Make object execution corresponding operating, described corresponding operating is the corresponding operation of described pending application.
Further, described pending application includes:For switching the application of photographic head;
Described business logic processing module 632, judges photographic head specifically for executing code according to described service logic Whether quantity is more than 1;If the quantity of photographic head is more than 1, code and described operation object are executed according to described service logic Information generates described hardware interaction execution code, and described operation object includes:The current photographic head opened and to be opened specifying Photographic head, described hardware interaction execution code includes:The mark of the photographic head of described current unlatching and described to be opened specifying The mark of photographic head;
Described performing module 633, specifically for according to described to be opened the specifying of described hardware interaction execution code instruction Photographic head is opened, and indicates the photographic head closing of described current unlatching.
Further, described pending application includes:For opening the application of photographic head;
Described business logic processing module 632, specifically for right according to described service logic execution code and described operation The information of elephant judges whether specified photographic head to be opened allows to be used, and described operation object includes:Described finger to be opened Determine photographic head;If described specified photographic head to be opened is allowed to use, code and described is executed according to described service logic The information of operation object generates described hardware interaction execution code, and described hardware interaction execution code includes:Described to be opened The mark of specified photographic head;
Described performing module 633, specifically for according to described to be opened the specifying of described hardware interaction execution code instruction Photographic head is opened.
Further, described pending application includes:Application for shooting image;
Described business logic processing module 632, specifically for right according to described service logic execution code and described operation The information of elephant generates described hardware interaction execution code, and described operation object includes:The current photographic head opened, described hardware is handed over Mutually execution code includes:The mark of the photographic head of described current unlatching;
Described performing module 633, specifically for indicating taking the photograph of described current unlatching according to described hardware interaction execution code As head executes photographing operation.
In the present embodiment, receiving unit, for receiving application operating information, described application operating information includes application operating Instruction and the pending information applying corresponding operation object, described application operating instructs for indicating described pending application; Searching unit, for searching and the corresponding application label of described pending application, described application label is unique;Execute list Unit, executes described pending application for the information according to described operation object and described application label.After such scheme, Wait to hold it is only necessary to just can perform by a unique application label corresponding with pending application when executing pending application Row application, to execute with coordinating by multiple html5 labels in prior art compared with applying accordingly, to simplify the process of realization, Also simplify development process, furthermore it is possible to realize the switching of photographic head by image capture device label simultaneously.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can borrow Help software to add the mode of necessary common hardware to realize naturally it is also possible to pass through hardware, but the former is more preferably in many cases Embodiment.Based on such understanding, the portion that technical scheme substantially contributes to prior art in other words Divide and can be embodied in the form of software product, this computer software product is stored in the storage medium that can read, such as count The floppy disk of calculation machine, hard disk or CD etc., including some instructions with so that a computer equipment(Can be personal computer, Server, or the network equipment etc.)Method described in execution each embodiment of the present invention.
The above, the only specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, all should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should described be defined by scope of the claims.

Claims (8)

1. a kind of based on HTML HTML5 realize application function method it is characterised in that include:
Receive application operating information, described application operating information includes application operating instruction and the corresponding operation of pending application is right The information of elephant, described application operating instructs for indicating described pending application;
Search and the corresponding application label of described pending application, described application label is unique;
Information according to described operation object and described application label execute described pending application;
Described application label includes:Interface layer, Business Logic, platform adaptation layer;
The described information according to described operation object and described application label execute described pending application, including:
Described interface layer is searched and the corresponding interface of described pending application;
Search service logic corresponding with described interface and execute code from described Business Logic;
On described Business Logic, the information according to described operation object carries out business to described service logic execution code and patrols Collect and process, obtain hardware interaction execution code;
In described platform adaptation layer, corresponding operating is executed according to the described operation object of described hardware interaction execution code instruction, Described corresponding operating is the corresponding operation of described pending application.
2. method according to claim 1 is it is characterised in that described pending application includes:For switching photographic head Application;
The described information according to described operation object carries out business logic processing to described service logic execution code, obtains hardware Interaction execution code, including:
Code is executed according to described service logic and judges whether the quantity of photographic head is more than 1;
If the quantity of photographic head is more than 1, code is executed according to described service logic and the information of described operation object generates institute State hardware interaction execution code, described operation object includes:The current photographic head opened and specified photographic head to be opened, described Hardware interaction execution code includes:The mark of the photographic head of described current unlatching and the mark of described specified photographic head to be opened Know;
Described interaction according to described hardware executes code instruction described operation object execution corresponding operating, including:
Opened according to the described specified photographic head to be opened of described hardware interaction execution code instruction, and indicate described current unlatching Photographic head close.
3. method according to claim 1 and 2 is it is characterised in that described pending application includes:For opening photographic head Application;
The described information according to described operation object carries out business logic processing to described service logic execution code, obtains hardware Interaction execution code, including:
Code is executed according to described service logic and the information of described operation object judges whether specified photographic head to be opened is permitted Permitted to be used, described operation object includes:Described specified photographic head to be opened;
If described specified photographic head to be opened is allowed to use, code is executed according to described service logic and described operation is right The information of elephant generates described hardware interaction execution code, and described hardware interaction execution code includes:Described to be opened specified take the photograph Mark as head;
Described interaction according to described hardware executes code instruction described operation object execution corresponding operating, including:
Opened according to the described specified photographic head to be opened of described hardware interaction execution code instruction.
4. method according to claim 3 is it is characterised in that described pending application includes:Answering for shooting image With;
The described information according to described operation object carries out business logic processing to described service logic execution code, obtains hardware Interaction execution code, including:
Code is executed according to described service logic and the information of described operation object generates described hardware interaction execution code, described Operation object includes:The current photographic head opened, described hardware interaction execution code includes:The photographic head of described current unlatching Mark;
Described interaction according to described hardware executes code instruction described operation object execution corresponding operating, including:
Indicate the photographic head execution photographing operation of described current unlatching according to described hardware interaction execution code.
5. a kind of based on HTML HTML5 realize application function device it is characterised in that include:
Receiving unit, for receiving application operating information, described application operating information includes application operating instruction and answers with pending With the information of corresponding operation object, described application operating instructs for indicating described pending application;
Searching unit, for searching and the corresponding application label of described pending application, described application label is unique;
Performance element, executes described pending application for the information according to described operation object and described application label;
Described application label includes:Interface layer, Business Logic, platform adaptation layer;
Described performance element, including:
Searching modul, for searching and the corresponding interface of described pending application in described interface layer;From described service logic Search service logic corresponding with described interface in layer and execute code;
Business logic processing module, in described Business Logic, the information according to described operation object is to described business Logic execution code carries out business logic processing, obtains hardware interaction execution code;
Performing module, in described platform adaptation layer, indicating described operation object according to described hardware interaction execution code Execution corresponding operating, described corresponding operating is the corresponding operation of described pending application.
6. device according to claim 5 is it is characterised in that described pending application includes:For switching photographic head Application;
Whether described business logic processing module, specifically for executing the quantity that code judges photographic head according to described service logic More than 1;If the quantity of photographic head is more than 1, code is executed according to described service logic and the information of described operation object generates Described hardware interaction execution code, described operation object includes:The current photographic head opened and specified photographic head to be opened, institute State hardware interaction execution code to include:The mark of the photographic head of described current unlatching and the mark of described specified photographic head to be opened Know;
According to described hardware interaction execution code, described performing module, specifically for indicating that described specified photographic head to be opened is opened Open, and indicate the photographic head closing of described current unlatching.
7. the device according to claim 5 or 6 is it is characterised in that described pending application includes:For opening photographic head Application;
Described business logic processing module, specifically for executing the information of code and described operation object according to described service logic Judge whether specified photographic head to be opened allows to be used, described operation object includes:Described specified photographic head to be opened; If described specified photographic head to be opened is allowed to use, code and described operation object are executed according to described service logic Information generates described hardware interaction execution code, and described hardware interaction execution code includes:Described specified photographic head to be opened Mark;
According to described hardware interaction execution code, described performing module, specifically for indicating that described specified photographic head to be opened is opened Open.
8. device according to claim 7 is it is characterised in that described pending application includes:Answering for shooting image With;
Described business logic processing module, specifically for executing the information of code and described operation object according to described service logic Generate described hardware interaction execution code, described operation object includes:The current photographic head opened, described hardware interaction execution generation Code includes:The mark of the photographic head of described current unlatching;
Described performing module, specifically for indicating the photographic head execution of described current unlatching according to described hardware interaction execution code Photographing operation.
CN201310635003.8A 2013-12-02 2013-12-02 Method and device for achieving application function based on HTML5 Active CN103645896B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310635003.8A CN103645896B (en) 2013-12-02 2013-12-02 Method and device for achieving application function based on HTML5

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310635003.8A CN103645896B (en) 2013-12-02 2013-12-02 Method and device for achieving application function based on HTML5

Publications (2)

Publication Number Publication Date
CN103645896A CN103645896A (en) 2014-03-19
CN103645896B true CN103645896B (en) 2017-02-08

Family

ID=50251120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310635003.8A Active CN103645896B (en) 2013-12-02 2013-12-02 Method and device for achieving application function based on HTML5

Country Status (1)

Country Link
CN (1) CN103645896B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108363590A (en) * 2018-05-17 2018-08-03 珠海横琴盛达兆业科技投资有限公司 A kind of method of webpage version free switching computer camera
CN111142976B (en) * 2019-12-25 2023-05-26 上海米哈游网络科技股份有限公司 Logic code execution method, device, server and medium
CN112954191A (en) * 2021-01-27 2021-06-11 上海淇玥信息技术有限公司 Information identification method and device based on communication interface and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106576A (en) * 2007-08-10 2008-01-16 腾讯科技(深圳)有限公司 A wireless application system and method for mobile terminal
CN103108149A (en) * 2013-02-27 2013-05-15 深圳市中兴移动通信有限公司 Video call and monitoring achieving method based on hypertext markup language (HTML) 5
CN103237083A (en) * 2013-05-08 2013-08-07 北京邮电大学 Mobile information service resource aggregation system and mobile information service resource aggregation method
CN103246501A (en) * 2012-02-08 2013-08-14 北京磊友信息科技有限公司 Method and client-side for sharing application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106576A (en) * 2007-08-10 2008-01-16 腾讯科技(深圳)有限公司 A wireless application system and method for mobile terminal
CN103246501A (en) * 2012-02-08 2013-08-14 北京磊友信息科技有限公司 Method and client-side for sharing application
CN103108149A (en) * 2013-02-27 2013-05-15 深圳市中兴移动通信有限公司 Video call and monitoring achieving method based on hypertext markup language (HTML) 5
CN103237083A (en) * 2013-05-08 2013-08-07 北京邮电大学 Mobile information service resource aggregation system and mobile information service resource aggregation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
多媒体富客户端在线教学平台的设计与实现;赵锐;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20131115(第11期);I138-248 *

Also Published As

Publication number Publication date
CN103645896A (en) 2014-03-19

Similar Documents

Publication Publication Date Title
US10963040B2 (en) Generating storyboard for a knowledge base in virtual mobile management
CN103024572B (en) A kind of television set
WO2012023750A2 (en) Update management method and apparatus
US6829619B1 (en) Information providing server
WO2013060153A1 (en) Method and terminal for adding quick link
US10757193B2 (en) Increased interoperability between web-based applications and hardware functions
CN103645896B (en) Method and device for achieving application function based on HTML5
CN102566983B (en) Object based on Windows system pulls implementation method and system thereof
CN106201610A (en) Web application accesses the method and device of the primary function of terminal
CN111414743B (en) Method and device for calling document template, electronic equipment and storage medium
CN115202834A (en) Task migration system and method
CN110659021B (en) Development and test system for micro application in mobile terminal
CN102959546A (en) Method and apparatus for converting content
CN102215434A (en) Electronic program guide system capable of automatically adapting to various screen display
WO2022160985A1 (en) Distributed photographing method, electronic device, and medium
CN111246299A (en) Communication terminal and application management method
CN113709026B (en) Method, device, storage medium and program product for processing instant communication message
CN112558968B (en) Method, device, equipment and storage medium for generating resource tree view
CN103838553B (en) Display control method and electronic equipment
CN112685104A (en) Application program starting control method and device, electronic equipment and storage medium
CN112351221B (en) Image special effect processing method, device, electronic equipment and computer readable storage medium
KR101482149B1 (en) Apparatus for executing application, method thereof and computer recordable medium storing the method
CN114579206B (en) Method, device, equipment and medium for dynamically loading application program
CN102427467A (en) Remote browsing system and method for pathological digital slices
CN117135341A (en) Image processing method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant