CN104765617B - Based on the HTML5 stream application functional interface distribution method realized and system - Google Patents

Based on the HTML5 stream application functional interface distribution method realized and system Download PDF

Info

Publication number
CN104765617B
CN104765617B CN201510222387.XA CN201510222387A CN104765617B CN 104765617 B CN104765617 B CN 104765617B CN 201510222387 A CN201510222387 A CN 201510222387A CN 104765617 B CN104765617 B CN 104765617B
Authority
CN
China
Prior art keywords
interface
functional
application
module
html5
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
CN201510222387.XA
Other languages
Chinese (zh)
Other versions
CN104765617A (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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510222387.XA priority Critical patent/CN104765617B/en
Publication of CN104765617A publication Critical patent/CN104765617A/en
Application granted granted Critical
Publication of CN104765617B publication Critical patent/CN104765617B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The present invention provides a kind of functional interface distribution method of stream application realized based on HTML5, specific steps are as follows: provides the functional interface of several stream applications realized based on HTML5;The request of any functional interface is called in response, runs the corresponding functional module of the functional interface;Corresponding response results are returned to by the corresponding call back function of the functional module or return value.A kind of functional interface dissemination system of stream application realized based on HTML5 is also provided based on the method, the method of the invention can provide simpler application and development mode not only for developer, new application experience can also be provided the user with, without installation, i.e. point is used, and its interactivity, experience property are close to locally applied.

Description

Based on the HTML5 stream application functional interface distribution method realized and system
Technical field
The present invention relates to intelligent terminal mobile application fields, specifically, the present invention relates to a kind of based on HTML5 realization Stream application functional interface distribution method and corresponding system.
Background technique
With the continuous development of mobile intelligent terminal, mobile terminal App increases increasingly.Currently, being roughly divided into Native App, Web App and stream application based on HTML5.Wherein, Native App, i.e. native applications, also referred to as local App are Refer to the intelligent terminal exploitation based on certain operating system, the third party application of operation is write using primary formula.Web App is the application program based on web access designed for mobile browser.Native applications are by being then based on the primary of system platform Capability development, various special efficacys and function may be implemented, interactivity, user experience are best.But since it is based on certain Kind operating system customizing, so cannot achieve cross-platform, and due to the equipment fragmentation of mobile terminal, cause primary answer With the program for needing to develop miscellaneous editions, and the maintenance in later period update it is very complicated.The equipment fragmentation refers to that mobile terminal is flat The differentiation of platform is increasing, and equipment is various, and brand is numerous, and version is different, resolution ratio disunity etc..Web App passes through URL It realizes the access to web page resources, although that is, point is used, its user experience is poor without installation, and operation system cannot be utilized The primary ability of system.
Stream application based on HTML5 is a kind of completely new application mode, is not necessarily to installation compared to Native App, may be implemented I.e. point is used, and interactivity, user experience are close to native applications;It may provide the user with better experience compared to Web App Degree, may call upon the primary ability of operating system, application interface is made more to optimize smoothness.In order to easily carry out stream application Exploitation, the present invention provide the functional interface distribution method and system of a kind of stream application realized based on HTML5.
Summary of the invention
The purpose of the present invention aims to solve the problem that at least one above-mentioned problem, provides a kind of stream application realized based on HTML5 Functional interface distribution method, comprising the following steps:
The functional interface of several stream applications realized based on HTML5 is provided;
The request of any functional interface is called in response, runs the corresponding functional module of the functional interface;
Corresponding response results are returned to by the corresponding call back function of the functional module or return value.
Specifically, the functional interface include it is following any one or it is any a variety of: sharing interface, image interface, audio Interface, intelligence interface, facility information interface, geolocation interface, the primary interface of system, scan interface, statistics interface, branch Pay interface, login interface and push interface.
Specifically, the corresponding module of the functional interface is stored in cloud server.
Specifically, the functional interface is the JS API realized based on JavaScript.
Specifically, the statistics interface is used to provide statistics and analysis user property and user behavior data to stream application Ability.
Specifically, the primary interface of system is used for the primary API of calling system.
Specifically, the primary API of the system is packaged using Native.js technology.
Specifically, the stream application refers to the application software of the mobile intelligent terminal based on HTML5 exploitation.
Specifically, the stream application is developed based on the HTML5Plus ability standardized.
Specifically, the stream application is developed using MUI frame.
A kind of functional interface dissemination system for the stream application realized based on HTML5, comprising:
Request module: it is used for request call stream application required function interface;
Engine modules: for responding the calling of the functional interface and returning to corresponding result;
Display module: for showing the corresponding interface of the functional interface.
Specifically, the functional interface include it is following any one or it is any a variety of: sharing interface, image interface, audio Interface, intelligence interface, facility information interface, geolocation interface, the primary interface of system, scan interface, statistics interface, branch Pay interface, login interface and push interface.
Specifically, the engine modules execute the method as described in claim 1.
Specifically, the engine modules encapsulate the corresponding module of the types of functionality interface.
Specifically, the engine modules are stored in cloud server.
Preferably, when the corresponding interface of any functional module encapsulated in the engine modules is called, engine modules It is locally downloading with card format.
Specifically, the functional interface is the JS API realized based on JavaScript.
Specifically, the statistics interface is used to provide statistics and analysis user property and user behavior data to mobile application Ability.
Specifically, the primary interface of system is used for the primary API of calling system.
Specifically, the primary API of the system is packaged using Native.js technology.
Specifically, the stream application refers to the application software of the mobile intelligent terminal based on HTML5 exploitation.
Specifically, the stream application is developed based on the HTML5Plus ability standardized.
Specifically, the stream application is realized based on MUI frame.
Compared with prior art, the solution of the invention has the following advantages:
1, by interface engine, providing the common 12 class function package of stream application to the interface of types of functionality, developer It only needs to provide an application interface, the interface engine for encapsulating 12 generic modules is built in wherein it is possible to easily carry out The exploitation of application.Secondly, by the common function modularization of application, it is only necessary to once be downloaded into mobile phone local, eliminate repetition peace Various locally applied common function modules are filled, memory headroom is saved.
2, it since stream application is realized based on HTML5, is parsed by the kernel of browser, without installation, i.e. point It uses, and is not limited by operating system platform, realize cross-platform, also provide for subsequent updating maintenance and defecate very much Benefit.
3, stream application of the present invention can by the native interface of the primary interface calling system bottom of system so that Stream application has the ability that web application does not have, such as two dimensional code, map, payment, message push ability.It is inserted without animation Part can realize smooth animation effect, and the interface of optimization, Experience Degree and interactivity are almost close to locally applied.
The additional aspect of the present invention and advantage will be set forth in part in the description, these will become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is a kind of flow diagram of the stream application functional interface distribution method based on HTML5 of the present invention;
Fig. 2 is a kind of functional block diagram of the stream application functional interface dissemination system based on HTML5 of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art Language and scientific term), there is meaning identical with the general understanding of those of ordinary skill in fields of the present invention.Should also Understand, those terms such as defined in the general dictionary, it should be understood that have in the context of the prior art The consistent meaning of meaning, and unless idealization or meaning too formal otherwise will not be used by specific definitions as here To explain.
Those skilled in the art of the present technique are appreciated that " terminal " used herein above, " terminal device " both include wireless communication The equipment of number receiver, only has the equipment of the wireless signal receiver of non-emissive ability, and including receiving and emitting hardware Equipment, have on bidirectional communication link, can execute two-way communication reception and emit hardware equipment.This equipment It may include: honeycomb or other communication equipments, shown with single line display or multi-line display or without multi-line The honeycomb of device or other communication equipments;PCS (Personal Communications Service, PCS Personal Communications System), can With combine voice, data processing, fax and/or communication ability;PDA(Personal Digital Assistant,It is personal Digital assistants), it may include radio frequency receiver, pager, the Internet/intranet access, web browser, notepad, day It goes through and/or GPS (Global Positioning System, global positioning system) receiver;Conventional laptop and/or palm Type computer or other equipment, have and/or the conventional laptop including radio frequency receiver and/or palmtop computer or its His equipment." terminal " used herein above, " terminal device " can be it is portable, can transport, be mounted on the vehicles (aviation, Sea-freight and/or land) in, or be suitable for and/or be configured in local runtime, and/or with distribution form, operate in the earth And/or any other position operation in space." terminal " used herein above, " terminal device " can also be communication terminal, on Network termination, music/video playback terminal, such as can be PDA, MID (Mobile Internet Device, mobile Internet Equipment) and/or mobile phone with music/video playing function, it is also possible to the equipment such as smart television, set-top box.
Those skilled in the art of the present technique are appreciated that remote network devices used herein above comprising but be not limited to count The cloud that calculation machine, network host, single network server, multiple network server collection or multiple servers are constituted.Here, Yun Youji It is constituted in a large number of computers or network servers of cloud computing (Cloud Computing), wherein cloud computing is distributed computing One kind, a super virtual computer consisting of a loosely coupled set of computers.In the embodiment of the present invention, distal end It can be realized and be communicated by any communication mode between the network equipment, terminal device and WNS server, including but not limited to, is based on The mobile communication of 3GPP, LTE, WIMAX, based on TCP/IP, the computer network communication of udp protocol and based on bluetooth, infrared The low coverage wireless transmission method of transmission standard.
Hypertext markup language (HyperText Mark-up Language, HTML) is that current Internet application is most extensive Extending mark language, and constitute web document dominant language.HTML5 is the newest version of HTML, compared to HTML it Preceding version, HTML5 provide more reasonable label Tag, and multimedia object no longer will all be bundled in object or embed In Tag, but video has the Tag of video, and audio has the Tag of audio;Local data base support is additionally provided, which will embed The SQL database of one local, to accelerate interactive search, caching and index function.In addition, HTML5 is additionally provided Canvas label object, the rich animation for not needing plug-in unit may be implemented by the object, which will bring directly to browser In the ability of painted on top polar plot, it means that Web page maker can be detached from Flash and Silverlight, directly clear It lookes in device and shows figure or animation.HTML5 will also provide application programming interfaces (API) to realize the editor in browser, drag and drop, And the ability of various graphic user interfaces.
Refering to Figure 1, the present invention provides a kind of functional interface distribution method of stream application realized based on HTML5, The following steps are included:
S11, the functional interface of several stream applications realized based on HTML5 is provided;
Stream application is novel as one kind, for the application software of mobile intelligent terminal, Native different from the past App or Web App is the App of a kind of operation write based on HTML, JS, CSS and mobile terminal, can not only call Web App cannot achieve or realize bad system capability, such as camera, file system capacity of equipment, two dimensional code, payment, message The professional abilities such as push can also be returned by the primary ability of the HTML5Plus JS API Calls mobile phone extended, such as pop-up Deng 400,000 kinds of primary abilities, same as Native App powerful function and performance are realized.
Wherein, HTML5Plus specification is an open specification, allows third party's browser manufacturer or other mobile phones Runtime manufacturer realizes.Extend JavaScript object plus, allow js call various browsers cannot achieve or Realize that bad system capability, capacity of equipment such as camera, gyroscope, file system etc., professional ability as above descend load, two dimension Code, map, payment, voice input, message push etc..
Stream application of the present invention carries out exploitation realization based on the ability that HTML5Plus is standardized, and for the ease of its exploitation, mentions The common 12 class functional interface of stream application, including sharing interface, image interface, audio interface, intelligence interface, facility information are supplied The primary interface of interface, geolocation interface, system, scan interface count interface, payment interface, login interface and push away Send interface.Wherein,
1, sharing interface
By the social sharing function of Share module management client, the sharing ability for calling terminal social software is provided. Social sharing management object is obtained by plus.share, wherein plus is the JavaScript object in HTML5plus, including Method have:
GetServices obtains sharing service.
2, image interface
Gallery module management system photograph album is supported to select picture or video file from photograph album, saves picture or video File is to functions such as photograph albums.Photograph album is obtained by plus.gallery and manages object, and wherein plus is in HTML5plus JavaScript object, including method have:
For pick from system photograph album select file, picture or video, save saves file to system photograph album.
3, audio interface
Audio module for providing the recording and playing function of audio, can the microphone apparatus of calling system record, Loudspeaker apparatus can also be called to play audio file.Audio frequency controller object is obtained by plus.audio, wherein plus is JavaScript object in HTML5plus, including method have:
GetRecorder obtains the recording object of current device, and createPlayer creates audio and plays object.
4, intelligence interface
Speech module management speech voice input function, provides speech identifying function, support user by microphone apparatus into Row voice input content obtains voice input management object by plus.speech, and wherein plus is in HTML5plus JavaScript object, including method have:
StartRecognize starts speech recognition, and stopRecognize stops speech recognition.
5, facility information interface
By Device module management facility information, for obtaining the relevant information of mobile device, such as model, manufacturer. Equipment information management object is obtained by plus.device, wherein plus is the JavaScript object in HTML5plus, packet The method included has:
Dial makes a phone call, and beep beeps, vibrate vibration equipment, and whether setWakelock setting application is protected Wake-up states are held, isWakelock obtains whether program is always maintained at wake-up states, and the system sound of equipment is arranged in setVolume Amount, getVolume obtain the system sound volume of equipment.
6, geolocation interface
Geolocation module management device location information, for obtaining geographical location information, such as longitude, dimension.It is logical It crosses plus.geolocation and obtains device location management object, wherein plus is the JavaScript object in HTML5plus, Including method have:
GetCurrentPosition obtains current device location information, watchPosition audiomonitor change in location Information, clearWatch close audiomonitor location information.
7, the primary interface of system
The primary interface of nativeUI management system can be used for the primary prompted dialog frame window of ejection system, Time of Day choosing Select dialog box, wait dialog box etc..The primary interface management object of system is obtained by plus.nativeUI, wherein plus is JavaScript object in HTML5plus, including method have:
ActionSheet ejection system select button frame, alert ejection system prompted dialog frame, confirm ejection system Confirming dialog box, closeWaiting closes system and waits dialog box, and showWaiting display system waits dialog box, The pickDate ejection system date selects dialog box, pickTime ejection system selection of time dialog box, prompt ejection system Input dialogue frame, toast show the prompting message etc. to disappear automatically.
8, scan interface
Barcode module management two dimensional code, provides two-dimensional code scanning identification function, equipment camera can be called to two dimension Code picture scanning carries out data input, obtains scan module by plus.barcode and manages object, wherein plus is JavaScript object in HTML5plus, including method have:
Scan passes through picture scanning two-dimensional code data.
9, interface is counted
Statistic module management statistical function, for providing statistics and analysis user property and user behavior to application The ability of data, wherein plus be HTML5plus in JavaScript object, including method have:
EventTrig triggers statistical phenomeon, and eventStart starts to continue event statistics, and eventEnd terminates to continue event Statistics, eventDuration accurately continue event statistics.
10, payment interface
Payment module management payment function is supported to carry out by web interface for providing safe web page ability to pay The operation of payment.Payment management object can be obtained by plus.payment, wherein plus is in HTML5plus JavaScript object, including method have:
GetChannels obtains payment channel, and request requests delivery operation.
11, login interface
The user of Oauth module management client authorizes login authentication function, allows the money of application access third-party platform Source is obtained by plus.oauth and logs in management object, and wherein plus is the JavaScript object in HTML5plus, including Method have:
GetServices obtains authorization login authentication service list.
12, interface is pushed
Online, offline message push may be implemented in Push module management PUSH message function, can by plus.push Obtain PUSH message manage object, wherein plus be HTML5plus in JavaScript object, including method have:
AddEventListener adds PUSH message event sniffer, and clear empties all PUSH messages, CreateMessage creates local message, and getAllMessage obtains all PUSH messages, and getClientInfo obtains client Whether end push identification information, setAutoNotification setting program show message in system message center, remove Delete PUSH message.
Above-mentioned functional interface is the JS API that JavaScript is realized, corresponding module is also by JavaScript reality It is existing.The functional interface writes direct the HTML5 page, when being resolved to required function interface, issues the request for calling the interface.
S12, response call the request of any functional interface, run the corresponding functional module of the functional interface;
When certain functional interface is called, which is made a response, corresponding module is found according to its interface, adjusted With method corresponding in module, and it is handled, realizes required function.
Wherein, the corresponding module of each functional interface is stored in cloud server.When stream application is opened, by cloud Server is pushed, and the 12 class functional interface will be downloaded to local in the form of plug-in unit, and the downloading process is only held Row is primary, the repeated downloads when application is opened again without types of functionality interface.According to the interface of calling, downloading is found To local corresponding module, corresponding method in the module is executed, realizes the corresponding function of application.It is possible thereby to realize various answer The consistency of general utility functions interface is conducive to the exploitation of stream application, so that the exploitation of application is easier, and due to general function Can interface it is disposably locally downloading, avoid it is existing it is locally applied be repeatedly written common interface module, save what application occupied Memory headroom.
For example, passing through the server or browser of parsing HTML page flow by stream application when user carries out delivery operation Kernel initiates request, and request call payment interface responds its call request, calls the corresponding function module to be handled, specially The method getChannels for obtaining payment channel is first called, when server or browser kernel are resolved to When plus.payment.getChannels (), start a thread, request call obtains the interface of payment channel;Work as reception To request call getChannels method request when, the corresponding functional module of this method is called in into memory, it is compiled It translates, executes the corresponding command, and payment channel information is returned into called side with html format, then server or browser kernel Close the calling interface thread.User is by the payment channel of interface display, such as wechat payment, Alipay payment, Unionpay's payment Deng, corresponding payment channel is selected, Alipay is such as selected, when user inputs Alipay account and password and clicks determining, clothes Business device or kernel parsing interface plus.payment.request () request the interface of delivery operation, while starting a line Journey, request call request the interface of delivery operation;When receiving the request of request call request method, by this method pair The functional module answered calls in memory, is compiled to it, executes the corresponding command, and return value is sent to called side, with judgement Whether delivery operation is successfully carried out.
S13, corresponding response results are returned to by the corresponding call back function of the functional module or return value.
The call request of response function interface, and after the completion of processing, by the corresponding call back function of its call method or return Value returns to corresponding result.
Such as the acquisition payment channel method getChannels of payment interface, method of calling are Plus.payment.getChannels (successCB, errorCB), obtaining the successful call back function of payment channel is ChannelsSuccessCallback, the call back function for obtaining payment channel list failure is PaymentErrorCallback. Corresponding return information can be obtained by the above call back function respectively, and submit to server or kernel in the form of html page It is parsed.
Payment channel success is such as obtained, then is got by the call back function ChannelsSuccessCallback write The payment channel list described in the form of html page is shown the payment page, including pay invoice content by parsing, paid The amount of money, selectable payment channel, such as wechat payment, Alipay payment, Unionpay's payment and other relevant informations.Wherein, If user's selection is paid by Alipay, needs to judge whether there is Alipay correlation module, mentioned if not The user that wakes up downloads installation.When user, which confirms, to be paid, calling plus.payment.request (channel, statement, SuccessCB, errorCB), delivery operation knot is returned to by paymentSuccessCallback (result) after paying successfully Fruit, wherein result is the successful information of delivery operation;If payment failure, passes through paymentErrorCallback (error) return error message, by error.code obtain error code, such as 62000, client do not install payment channel according to Bad service;62001, user cancels delivery operation;62002, this equipment is not supported to pay;62003, data formatting error; 62004, payment account status error;62005, order information mistake;62006, delivery operation internal error;62007, payment clothes Business device mistake;62008, mistake caused by network problem;62009, other undefined mistakes.According to different error codes to User provides corresponding prompting interface.
Referring to Fig. 2, the present invention also provides a kind of functional interface dissemination system of stream application realized based on HTML5, packet Include request module 11, engine modules 12, display module 13, wherein
Request module 11 is used for request call stream application required function interface.
It, should by the kernel parsing of resolution flow application HTML5 page flow when the user clicks when some function button of stream application Functional interface corresponding to function, and the request to the initiation calling of engine modules 12 interface.Wherein, the functional interface includes Sharing interface, image interface, audio interface, intelligence interface, facility information interface, geolocation interface, the primary interface of system connect Mouth, scan interface, statistics interface, payment interface, login interface and push interface.
Engine modules 12 are used to respond the calling of the functional interface and return to corresponding result.The engine modules are to upper The module for stating 12 class functional interfaces is packaged, including share module, Gallery module, Audio module, Speech module, Device module, Geolocation module, nativeUI module, Barcode module, Statistic module, Payment mould Block, Oauth, Push module.The corresponding interface of each module be respectively sharing interface, image interface, audio interface, intelligence interface, The primary interface of facility information interface, geolocation interface, system, scan interface, statistics interface, payment interface, login connect Mouth and push interface.When receiving stream application and calling the instruction of certain functional interface, engine modules 12 make a response it, tool Body method step are as follows:
Step1 provides the functional interface of several stream applications realized based on HTML5;
Engine modules 12 provide 12 class functional interfaces as described above for calling.
The request of any functional interface is called in Step2 response, runs the corresponding functional module of the functional interface;
When certain functional interface is called, which is made a response, corresponding module is found according to its interface, adjusted With method corresponding in module, and it is handled, realizes required function.
Wherein, the corresponding module of each functional interface is stored in cloud server.When stream application is opened, by cloud Server is pushed, and the 12 class functional interface will be downloaded to local in the form of plug-in unit, and the downloading process is only held Row is primary, the repeated downloads when application is opened again without types of functionality interface.According to the interface of calling, downloading is found To local corresponding module, corresponding method in the module is executed, realizes the corresponding function of application.It is possible thereby to realize various answer The consistency of general utility functions interface is conducive to the exploitation of stream application, so that the exploitation of application is easier, and due to general function Can interface it is disposably locally downloading, avoid it is existing it is locally applied be repeatedly written common interface module, save what application occupied Memory headroom.
For example, passing through the server or browser of parsing HTML page flow by stream application when user carries out delivery operation Kernel initiates request, and request call payment interface responds its call request, calls the corresponding function module to be handled, specially The method getChannels for obtaining payment channel is first called, when server or browser kernel are resolved to When plus.payment.getChannels (), start a thread, request call payment interface;When receiving request call When the request of getChannels, the corresponding functional module of this method is called in into memory, it is compiled, executes the corresponding command, And payment channel information is returned into called side with html format, then server or browser kernel close the calling interface Thread.User selects corresponding branch by the payment channel of interface display, such as wechat payment, Alipay payment, Unionpay's payment Channel is paid, Alipay is such as selected, when user inputs Alipay account and password and clicks determining, server or kernel parsing are connect Mouth plus.payment.request () requests the interface of delivery operation, while starting a thread, request call request The interface of delivery operation;When receiving the request of request call request method, the corresponding functional module of this method is called in Memory is compiled it, the corresponding command is executed, and return value is sent to called side, to judge whether successfully to be paid Operation.
The engine modules 12 are built in stream application, are called by the interface of stream application to its functional interface, by And it is executed by it corresponding functional module, complete corresponding function.The application and development mode is conducive to the developer of application, can be big Amplitude reduction development cost needs to develop originally multiple platform releases such as Android, IOS, passes through inboard engine module in the application 12, it is only necessary to a webpage version is developed, it can be across multiple platforms.
Step3 returns to corresponding response results by the corresponding call back function of the functional module or return value.
The call request of response function interface, and after the completion of processing, by the corresponding call back function of its call method or return Value returns to corresponding result.
Such as the acquisition payment channel method getChannels of payment interface, method of calling are Plus.payment.getChannels (successCB, errorCB), obtaining the successful call back function of payment channel is ChannelsSuccessCallback, the call back function for obtaining payment channel list failure is PaymentErrorCallback. Corresponding return information can be obtained by the above call back function respectively, and submit to server or kernel in the form of html page It is parsed.
Payment channel success is such as obtained, then is got by the call back function ChannelsSuccessCallback write The payment channel list described in the form of html page is shown the payment page, including pay invoice content by parsing, paid The amount of money, selectable payment channel, such as wechat payment, Alipay payment, Unionpay's payment and other relevant informations.Wherein, If user's selection is paid by Alipay, needs to judge whether there is Alipay correlation module, mentioned if not The user that wakes up downloads installation.When user, which confirms, to be paid, calling plus.payment.request (channel, statement, SuccessCB, errorCB), delivery operation knot is returned to by paymentSuccessCallback (result) after paying successfully Fruit, wherein result is the successful information of delivery operation;If payment failure, passes through paymentErrorCallback (error) return error message, by error.code obtain error code, such as 62000, client do not install payment channel according to Bad service;62001, user cancels delivery operation;62002, this equipment is not supported to pay;62003, data formatting error; 62004, payment account status error;62005, order information mistake;62006, delivery operation internal error;62007, payment clothes Business device mistake;62008, mistake caused by network problem;62009, other undefined mistakes.According to different error codes to User provides corresponding prompting interface.
Display module 13 is for showing the corresponding interface of the functional interface.
Since the application developed based on HTML5 is cut in the presence of such as browser, a page white screen, blade-rotating animation be poor, floating element is trembled It moves, smooth can not pull down the problems such as refreshing.Especially for low side machine, the performance in terms of these is worse.In addition, the control of default Pattern and negligible amounts in many cases, are unable to satisfy the demand of application and development so that the beautiful interface of production is very troublesome. And MUI is as a frame that can be used for developing high-performance App, is one of the frame at present closest to primary App effect, it can be with Effectively solve the above problems.Therefore it can be shown and the immediate performance of primary App and effect using the stream application of MUI Development of Framework Fruit.
When stream application operation, HTML page flow is parsed by browser kernel, corresponding interface is shown, works as parsing To when needing to call certain functional interface, the acquisition payment channel method of payment interface is such as called, HTML page ought be specially resolved to The plus.payment.getChannels (successCB, errorCB) being written in face is initiated to call and is somebody's turn to do to engine modules 12 The request of interface, by the response of engine modules 12, it is requested and handles accordingly.Pass through if obtaining payment channel success SuccessCB readjustment returns to all channel lists supported, is adjusted back and is returned by errorCB if failure.
Since the primary interface of the system can be with the primary API of calling mobile phone operating system, such as pop-up, when setting Between, return etc., when be resolved to need calling system native interface when, connect by the system that the primary interface of system calls bottom Mouthful, such as plus.nativeUI.actionSheet (actionsheetStyle, actionsheetCallback), it is for pop-up The method of system select button frame, parameter actionsheet Style are the pattern that select button frame is shown, ActionsheetCallback is the call back function after select button frame is closed.By calling in nativeUI module ActionSheet method realizes and calls to the interface of the select button frame of system, also therefore stream application can present with it is primary Interfacial effect similar in App is realized and native applications almost same experience effect.
Why the primary interface of system can be primary with the primary API of calling mobile phone operating system, basic reason API is encapsulated using Native.js technology, the primary interface of the system based on JS is called directly primary API.Wherein, Native.js technology, abbreviation NJS are a kind of primary object escapes by mobile phone operating system, are mapped as JS pairs As writing the technology of primary code in JS, JS being expanded to the primary world of mobile phone A pp, allow JS that can call 400,000 originals Raw API, significantly improves the ability of HTML5.Native.js breaches the function restriction of browser, and the code write can be with It is run in the browser for supporting NJS technology.
Below by taking a specific embodiment as an example, the invention will be further described.
In HBuilder editing machine, it is based on MUI Development of Framework stream application.An application interface, the boundary are developed first Face is stored in server in the form of HTML5 page flow;Then by wherein, the interface engine is the present invention built in interface engine The module for encapsulating 12 class common function interfaces, wherein application in personalized customization function then use JavaScript into Row is write;The application is finally submitted to 360 mobile phone assistant, it is audited by mobile phone assistant, detailed process are as follows:
Firstly, application to be submitted to the memory block of mobile phone assistant, whether which is audited by the review mechanism of mobile phone assistant It is legal;Secondly, being further submitted to next layer of review mechanism, it is applied to the interface that packet provides and is scanned, judge it Whether interface is consistent with the platform interface of mobile phone assistant;Finally, audit passes through then by this using online.
The online stream application is promoted by 360 mobile phone assistant, stream application using 360 mobile phone assistant as carrier, When user selects to open some stream application, by the HTML page flow of cloud server push application, the interior verification of mobile phone assistant Its HTML page flow is parsed, and shows main interface.Cloud server pushes interface engine simultaneously, under engine is in the form of plug-in unit It is downloaded to mobile phone local.User is when the main interface of application selects a certain general utility functions, such as login function, then mobile phone assistant kernel solution The plus.oauth.getServices () in HTML page flow is analysed, starts a thread and initiates to request to interface engine, by Interface engine makes a response it, the method for executing the Oauth module in the interface engine for downloading to mobile phone local GetServices () " obtains and authorizes login authentication service " method;When acquisition authorizes successfully, by call back function ServicesSuccessCallback is returned will authorize login authentication service list in mobile phone assistant in the form of html page Core, by interior verification, it is parsed and is shown on a user interface;When obtaining authorization failure, by call back function Error message is returned to mobile phone assistant's kernel, interior verification error message by AuthErrorCallback in the form of html page Parsing display is carried out to give prompt on a user interface.In addition, the stream application can pass through the system in calling interface engine Primary interface realizes the primary API Calls to cell phone system, realizes and such as calls camera, sets system time, pop-up Etc. functions.
In order to provide the ability of statistics and analysis user property and user behavior data to application, the interface engine is also mentioned Statistics interface is supplied, which is not interposing at front end use, is called by application by background server, the category of user is applied to this Property, behavioral data etc. are for statistical analysis, and upload the data to cloud server.Developer can also by push interface to User's PUSH message, such as push integral, discount coupon, preferential activity message.
The exploitation of stream application, which is used, is built in mode therein for interface engine of the present invention, passes through calling interface engine Function class interface realize common function, and the mode based on HTML page flow is realized.So that the development process of application is simpler Single, developer only needs to provide the interface based on HTML page flow, built-in interface engine of the present invention, calling interface The functional interface of engine.Furthermore the interface can also be presented in the form of template, developed without oneself, answered by 360 mobile phones With platform, selection is adapted to the interface template using theme, is filled according to the functional requirement of application to it.
Implementation of the smart home as household's IT application has become the important composition portion of social informatization development Point, it is seen as a kind of important application of Internet of Things, with Internet of Things, big data, cloud computing, wireless communication and artificial intelligence Etc. the continuous development of technologies and the application on smart home, continuous improvement of people's living standards and intelligent philosophy of life Universal, internet of things intelligent household has become the new trend of the following household development.
In conjunction with stream application of the present invention, great role can also be played in smart home.Every money smart home is all The application that oneself can be developed is developed the App of smart home by development scheme described above in a manner of stream application, more The App of kind smart home focuses on the unified management of the softwares such as mobile phone assistant, and user is corresponding without installing various smart homes App need to only be clicked by mobile phone assistant and be operated smart home using corresponding App, it is only necessary to mobile phone assistant's software is installed, It can use various using App.In addition, internet of things intelligent household generally passes through unified platform management smart home, such as intelligence The equipment such as energy switch, intelligent socket, intelligent lighting, intelligent door and window, can be using the control module of unified management platform as in Module is set, using two dimensional code as access interface, by scanning the two dimensional code, accesses the control module of management platform, thus It can be by carrying out unified management control to smart home.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (23)

1. a kind of functional interface distribution method for the stream application realized based on HTML5, which comprises the following steps:
The functional interface of several stream applications realized based on HTML5 is provided;
The request of any functional interface is called in response, the corresponding functional module of the functional interface is run, wherein the functional interface It is former including sharing interface, image interface, audio interface, intelligent sound interface, facility information interface, geolocation interface, system In raw interface, scan interface, statistics interface, payment interface, login interface and push interface any one or it is any It is a variety of;
Wherein, when the functional interface is called, call instruction is made a response, is found according to the functional interface corresponding Module is called corresponding method in the module, and is handled the method, realizes required function;
Corresponding response results are returned to by the corresponding call back function of the functional module or return value.
2. the method according to claim 1, wherein the corresponding module of the functional interface is stored in cloud service Device.
3. the method according to claim 1, wherein the functional interface is to be realized based on JavaScript JS API。
4. the method according to claim 1, wherein the statistics interface is used to provide statistics to stream application and divide Analyse the ability of user property and user behavior data.
5. the method according to claim 1, wherein the primary interface of the system is used for the original of calling system Raw API.
6. according to the method described in claim 5, it is characterized in that, the primary API of the system using Native.js technology into Row encapsulation.
7. the method according to claim 1, wherein the stream application refers to the mobile intelligence based on HTML5 exploitation The application software of energy terminal.
8. the method according to claim 1, wherein the ability that is standardized based on HTML5Plus of the stream application into Row exploitation.
9. the method according to claim 1, wherein the stream application is developed using MUI frame.
10. a kind of functional interface dissemination system for the stream application realized based on HTML5 characterized by comprising
Request module: it is used for request call stream application required function interface;
Engine modules: for responding the calling of the functional interface and returning corresponding as a result, wherein the functional interface includes Sharing interface, image interface, audio interface, intelligent sound interface, facility information interface, geolocation interface, system Protozoic In face interface, scan interface, statistics interface, payment interface, login interface and push interface any one or it is any a variety of;
Wherein, when the functional interface is called, call instruction is made a response, is found according to the functional interface corresponding Module is called corresponding method in the module, and is handled the method, realizes required function;
Display module: for showing the corresponding interface of the functional interface.
11. system according to claim 10, which is characterized in that the engine modules execute as described in claim 1 Method.
12. system according to claim 10, which is characterized in that the engine modules encapsulate the types of functionality interface Corresponding module.
13. system according to claim 10, which is characterized in that the engine modules are stored in cloud server.
14. system according to claim 10, which is characterized in that when any module encapsulated in the engine modules is corresponding Interface it is called when, engine modules are locally downloading with card format.
15. system according to claim 10, which is characterized in that the functional interface is to be realized based on JavaScript JS API.
16. system according to claim 10, which is characterized in that the statistics interface is used to provide statistics to mobile application With the ability of analysis user property and user behavior data.
17. system according to claim 10, which is characterized in that the primary interface of system is for calling system Primary API.
18. system according to claim 12, which is characterized in that the primary API of the system uses Native.js technology It is packaged.
19. system according to claim 10, which is characterized in that the stream application refers to the movement based on HTML5 exploitation The application software of intelligent terminal.
20. system according to claim 10, which is characterized in that the ability that the stream application is standardized based on HTML5Plus It is developed.
21. system according to claim 10, which is characterized in that the stream application is realized based on MUI frame.
22. a kind of terminal, characterized in that it comprises:
One or more processors;
Memory;
One or more application program, wherein one or more of application programs are stored in the memory and are configured To be executed by one or more of processors, one or more of application programs are configurable for executing such as claim The functional interface distribution method of 1~9 described in any item stream applications realized based on HTML5.
23. a kind of computer readable storage medium, which is characterized in that including one or more application program, the one or more Application program is configurable for executing the function of the stream application as described in any one of claims 1 to 9 realized based on HTML5 The step of interface distribution method.
CN201510222387.XA 2015-05-04 2015-05-04 Based on the HTML5 stream application functional interface distribution method realized and system Active CN104765617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510222387.XA CN104765617B (en) 2015-05-04 2015-05-04 Based on the HTML5 stream application functional interface distribution method realized and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510222387.XA CN104765617B (en) 2015-05-04 2015-05-04 Based on the HTML5 stream application functional interface distribution method realized and system

Publications (2)

Publication Number Publication Date
CN104765617A CN104765617A (en) 2015-07-08
CN104765617B true CN104765617B (en) 2019-02-19

Family

ID=53647469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510222387.XA Active CN104765617B (en) 2015-05-04 2015-05-04 Based on the HTML5 stream application functional interface distribution method realized and system

Country Status (1)

Country Link
CN (1) CN104765617B (en)

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867963A (en) * 2015-12-14 2016-08-17 乐视云计算有限公司 Application updating method and apparatus
CN105787043A (en) * 2016-02-26 2016-07-20 浪潮通信信息系统有限公司 Cross-platform commercial bank mobile application distribution and management mode
CN105843617B (en) * 2016-03-23 2018-11-13 深圳市茁壮网络股份有限公司 A kind of 2D special efficacys method for drafting
CN105955833B (en) * 2016-06-06 2021-09-21 腾讯科技(深圳)有限公司 Engine calling method and device
CN106126420B (en) * 2016-06-21 2018-12-18 北京小米移动软件有限公司 Application program adjustment method and device
CN106713119B (en) * 2016-12-13 2019-11-05 四川长虹电器股份有限公司 A kind of cross-platform mobile terminal real-time messages notice and methods of exhibiting
CN108228206A (en) * 2016-12-20 2018-06-29 北京智能管家科技有限公司 A kind of application management method and device
CN106919385B (en) * 2017-02-14 2019-06-21 百富计算机技术(深圳)有限公司 Information statistical method and device
CN106933623B (en) * 2017-02-22 2020-09-11 广州大学 Operation method, device and system of installation-free application
CN107277146B (en) * 2017-06-26 2021-01-08 苏州浪潮智能科技有限公司 Distributed storage service flow model generation method and system
CN107450928B (en) * 2017-08-02 2020-06-30 四川长虹电器股份有限公司 Hybrid development method based on cache technology
CN108170414A (en) * 2017-12-12 2018-06-15 广东广业开元科技有限公司 A kind of establishment can voice, collaboration and the artificial intelligence of analysis accounting system method
CN108255472B (en) * 2018-01-17 2021-06-01 北京皮尔布莱尼软件有限公司 Layered experiment frame system
CN108563517B (en) * 2018-03-30 2020-11-03 腾讯科技(深圳)有限公司 Calling method and device of system interface
CN108647165A (en) * 2018-04-17 2018-10-12 青岛海尔科技有限公司 A kind of apparatus control method, device, storage medium and computer equipment
CN109063202B (en) * 2018-09-13 2022-01-25 北京三快在线科技有限公司 Method and device for realizing popup in mixed interface application and computer equipment
CN109683990B (en) * 2018-12-27 2019-07-23 四川新网银行股份有限公司 H5 multiterminal cut-in method based on mixed mode mobile application
CN109658250B (en) * 2018-12-29 2021-11-12 深圳源中瑞科技有限公司 Stock transaction K-line processing method based on webpage and storage medium
CN110134429A (en) * 2019-04-02 2019-08-16 惠州学院 Network information browsing method, device, equipment, storage medium and system
CN111142858A (en) * 2019-12-30 2020-05-12 北京中网易企秀科技有限公司 Engine device
CN111932349B (en) * 2020-09-28 2021-01-26 支付宝(杭州)信息技术有限公司 Payment application recommendation method and device based on H5 payment
CN112953711B (en) * 2021-01-28 2022-12-02 杉德银卡通信息服务有限公司 Database security connection system and method
CN113867840B (en) * 2021-09-29 2023-06-13 四川长虹电器股份有限公司 Smart television WEB NATIVE plug-in frame and construction method
CN114422637B (en) * 2021-12-20 2023-12-29 阿里巴巴(中国)有限公司 Media request processing method and cross-platform engine system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103809857A (en) * 2014-02-24 2014-05-21 联想(北京)有限公司 Information processing method and electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9307031B2 (en) * 2013-02-04 2016-04-05 Oracle International Corporation Generic model for customizing protocol behavior through javascript
CN103886029B (en) * 2014-03-03 2017-10-27 百度在线网络技术(北京)有限公司 Implementation method, device, server and the system of web application

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103809857A (en) * 2014-02-24 2014-05-21 联想(北京)有限公司 Information processing method and electronic device

Also Published As

Publication number Publication date
CN104765617A (en) 2015-07-08

Similar Documents

Publication Publication Date Title
CN104765617B (en) Based on the HTML5 stream application functional interface distribution method realized and system
US8595186B1 (en) System and method for building and delivering mobile widgets
US10311877B2 (en) Performing tasks and returning audio and visual answers based on voice command
CN102955694B (en) The client realization method of sing on web Kit browser and client
US10362359B2 (en) Video player framework for a media distribution and management platform
CN104520816B (en) For adjusting method, equipment and storage media across expanding communication
TW201235072A (en) Method and apparatus for gaming based on mobile terminal
CN109992248A (en) Implementation method, device, equipment and the computer readable storage medium of voice application
CN113099399A (en) 5G financial message data processing method, financial institution and operator service device
CN104704468A (en) Cross system installation of WEB applications
CN103945284B (en) Information processing method and information processing unit
CN102625182A (en) Method and system for integrating and controlling video player in Connected TV
KR100749845B1 (en) Mobile system having features of mobile active page and method for mobile internet service thereof
US20130254806A1 (en) System and Method for Displaying a Media Program Stream on Mobile Devices
EP4246312A1 (en) Content display method and terminal device
KR102029167B1 (en) System and method for providing music based on user context
CN109492175A (en) The display methods and device of Application Program Interface, electronic equipment, storage medium
CN107770377A (en) A kind of method of the establishment interactive voice mobile phone news client based on HTML5
US8291004B2 (en) Remotely controlling playback of media content on a wireless communication device
CN111294368A (en) Cloud server, intelligent client and owner service method thereof
TWI641984B (en) Method for interaction between terminal device and web site, method for providng web service for terminal device, and computer program product for interaction between terminal device and web site
CN113010766B (en) Information searching method, device and storage medium
CA2600258C (en) Remotely controlling playback of media content on a wireless communication device
CN109299447A (en) Advertisement edit methods, terminal and computer readable storage medium
CN107770375A (en) A kind of method that mobile phone news client is created based on HTML5

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220728

Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.