CN104750548B - Asynchronous Request method based on mixed mode cross-platform - Google Patents

Asynchronous Request method based on mixed mode cross-platform Download PDF

Info

Publication number
CN104750548B
CN104750548B CN201510150915.5A CN201510150915A CN104750548B CN 104750548 B CN104750548 B CN 104750548B CN 201510150915 A CN201510150915 A CN 201510150915A CN 104750548 B CN104750548 B CN 104750548B
Authority
CN
China
Prior art keywords
application layer
remote pages
libraries
mobile
platform
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
CN201510150915.5A
Other languages
Chinese (zh)
Other versions
CN104750548A (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.)
GUIZHOU GUANGSI INFORMATION NETWORK CO., LTD.
Information Center of Guizhou Power Grid Co Ltd
Original Assignee
GUIZHOU GUANGSI INFORMATION NETWORK CO Ltd
Information Center of Guizhou Power Grid 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 GUIZHOU GUANGSI INFORMATION NETWORK CO Ltd, Information Center of Guizhou Power Grid Co Ltd filed Critical GUIZHOU GUANGSI INFORMATION NETWORK CO Ltd
Priority to CN201510150915.5A priority Critical patent/CN104750548B/en
Publication of CN104750548A publication Critical patent/CN104750548A/en
Application granted granted Critical
Publication of CN104750548B publication Critical patent/CN104750548B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of Asynchronous Request methods based on mixed mode cross-platform,When mobile application layer obtains remote pages information by different mobile platforms,Using one library JS of setting between mobile application layer and mobile platform,Realize that the page is interacted with mobile application layer,Specific implementation asynchronous method is that application layer sends out request instruction and then application layer continues other operations,The request instruction is required remote pages information,The libraries JS receive the page structure of the required remote pages information of formation after instruction,And the data of required remote pages information are formed into parameter,The ID of remote pages information callback method and holding needed for generating,The correspondence of callback method ID is generated simultaneously,Remote pages are split as page structure and data by the invention,So that mobile application layer is when obtaining remote pages information,Data need to only be obtained without obtaining page structure,Realize the asynchronous call between application layer and remote pages,Improve the operational efficiency of application layer.

Description

Asynchronous Request method based on mixed mode cross-platform
Technical field
The present invention relates to a kind of Asynchronous Request methods based on mixed mode cross-platform, belong to virtualization technology neck Domain.
Background technology
With the development of mobile Internet, the intelligent mobile terminals such as mobile phone, tablet computer become the important carrier of information, Under the trend of mobile, traditional business starts gradually to extend to mobile service, the demand of enterprise application system mobile also with It is growing.
Currently, one-to-one Development control area pattern is located in electrical network business mobile application and development, results in an enterprise and deposit Small, more, the miscellaneous present situation of mobile platform.
One-to-one Development control area pattern results in Technical Architecture and the complete disunity of standard, concentration due to producer's difference Management and control difficulty is big, and there are greater risks for information security, and can so that the development cycle is long, there are problems that serious overlapping development, Cause construction investment waste very big.
Each unified management and control means of operation system mobile application construction missing, information security and managing risk are high.
Meanwhile in the prior art, it is synchronized relation information to be obtained between application layer and remote pages resource, i.e., in application layer After sending out request instruction, application layer cannot carry out other operations between returning to information needed from remote pages, occupy significantly Application layer actual effect.
Invention content
The purpose of the present invention is:A kind of Asynchronous Request method based on mixed mode cross-platform is provided, can be realized Resource between different mobile platforms and mobile application layer interacts, while can greatly improve the operational efficiency of application layer again, with solution Certainly technical problem existing at present.
Technical scheme of the present invention
A kind of Asynchronous Request method based on mixed mode cross-platform passes through different mobile platforms in mobile application layer When obtaining remote pages information, using a library JS is arranged between mobile application layer and mobile platform, realize that the page is answered with movement It is interacted with layer, specific implementation process is:Remote pages are split as data and page structure, page structure provides the page by the libraries JS Component needed for structure and layout method, and the ability of data is accessed, then setting and movement between the libraries JS and mobile platform The corresponding engine of platform, engine is interior to be equipped with browser corresponding with mobile platform and public function module, thinks in mobile application layer When obtaining remote pages information, the libraries JS, which receive, to be instructed and instruction is passed in engine, and mobile platform corresponding with engine only obtains The data of long-range page are taken, and data are pressed in backtracking to the libraries JS and together with page structure corresponding with data in the libraries JS, Shown in mobile application layer, implement Asynchronous Request the step of be:
One, application layer sends out request instruction and then application layer continues other operations, which is required long-range Page info;
Two, the libraries JS receive formed after instruction needed for remote pages information page structure, and by required remote pages information Data form parameter, generate needed for remote pages information callback methods ID and holding, while generating callback method ID's Correspondence;
Three, parameter and id information are imparted to engine;
Four, engine obtains required parameter, i.e. data by the mobile platform asynchronous call remote pages that are corresponding to it;
Five, engine returns to the parameter of acquisition and ID in the libraries JS, due to having generated the correspondence of ID in the libraries JS, that is, realizes Parameter is combined to form required remote pages information with page structure in the libraries JS, and layer to be applied is completed after other are operated needed for realization The display of remote pages information.
Asynchronous Request method based on mixed mode cross-platform, mobile platform include IOS, Androld and Windows Phone。
By adopting the above-described technical solution, compared with prior art, remote pages are split as by the invention Page structure and data, and the libraries JS provide the component and layout method needed for page structure so that mobile application layer is obtaining far When journey page info, data need to be only obtained without obtaining page structure, greatly reduce data volume needed for system operation, then lead to It crosses setting and is directed to the corresponding engine of different mobile platforms, realize that mobile application layer is moved by different platform and obtain remote pages Ability, while realizing the asynchronous call between application layer and remote pages, the operational efficiency of application layer is substantially increased, the present invention is former Reason is simple, greatly reduces the running frequency of internal system and required data.
Description of the drawings
Attached drawing 1 is principle schematic diagram of the present invention.
Specific implementation mode
The embodiment of the present invention:A kind of Asynchronous Request method based on mixed mode cross-platform, as shown in the picture, When mobile application layer obtains remote pages information by different mobile platforms, it is arranged using between mobile application layer and mobile platform One library JS realizes that the page is interacted with mobile application layer, and specific implementation process is:Remote pages are split as data and page knot Structure, page structure is provided the component and layout method needed for page structure by the libraries JS, and accesses the ability of data, then in JS Engine corresponding with mobile platform is set between library and mobile platform, and engine is interior equipped with browser corresponding with mobile platform and public Function module, when mobile application layer is wanted to obtain remote pages information, the libraries JS, which receive, to be instructed and instruction is passed in engine, with The corresponding mobile platform of engine only obtains the data of long-range page, and by data by backtracking to the libraries JS and in the libraries JS with number Together according to corresponding page structure, shown in mobile application layer, implement Asynchronous Request the step of be:
One, application layer sends out request instruction and then application layer continues other operations, which is required long-range Page info;
Two, the libraries JS receive formed after instruction needed for remote pages information page structure, and by required remote pages information Data form parameter, generate needed for remote pages information callback methods ID and holding, while generating callback method ID's Correspondence;
Three, parameter and id information are imparted to engine;
Four, engine obtains required parameter, i.e. data by the mobile platform asynchronous call remote pages that are corresponding to it;
Five, engine returns to the parameter of acquisition and ID in the libraries JS, due to having generated the correspondence of ID in the libraries JS, that is, realizes Parameter is combined to form required remote pages information with page structure in the libraries JS, and layer to be applied is completed after other are operated needed for realization The display of remote pages information.
Wherein mobile platform includes IOS, Androld and Windows Phone.
It is noted that mobile application layer is the mixed mode applications layer based on HTML5 JS CSS3 in the present embodiment;
The libraries JS provide component and layout method needed for page structure for the libraries JS, and access the ability of data, wherein group Part is the basic configuration module of remote pages(That is page structure), accessing the libraries this JS of data capability itself has ability, this field Technical staff can complete the exploitation in the libraries JS after thinking through this embodiment by the prior art.
Engine corresponding from different mobile platforms, the browser for including in engine are the corresponding browsing of different mobile platforms Device, this is the prior art, and general module corresponding from different mobile platforms is also the prior art, and the present embodiment is that its is above-mentioned The two organic unity gets up to realize the maintenance that manpower and later stage are greatlyd save in later stage programming.
The present embodiment specific implementation process first will if mobile application layer needs to obtain personal information by remote pages Personal information is divided into personal information structure and personal information data, and as shown in fig. 1 by means of arrows, mobile application layer sends out instruction In the incoming libraries JS, the component of personal information structure is extracted in the libraries JS(Such as name, height, age data exist i.e. in personal information Arrangement mode in the page and the universal coding of itself), while personal information request of data is formed into parameter, generate required people The ID of member's information callback method is kept, while generating the correspondence of callback method ID, and by personal information callback method ID and parameter are passed to and different mobile platforms(Mobile platform may include IOS, Androld and Windows in the present embodiment Phone)In corresponding engine, it is arranged to the corresponding browser of different mobile platforms and general module in engine, if obtaining people Member's information data(That is parameter)When be by the IOS mobile platforms obtain remote pages information, then pass through engine corresponding with IOS (Setting browser corresponding with IOS mobile platforms and general module in the engine, command signal be first passed through by JS systems it is clear It lookes at device, then passes to general module), subsequently into IOS mobile platforms, then IOS mobile platforms completion obtains people from remote pages Member's information data(That is parameter)And enter in engine corresponding with IOS mobile platforms by backtracking, due to being formed in the libraries JS With the correspondence of callback method ID so that engine intrinsic parameter enters in the libraries JS can personal information structure group corresponding with the libraries JS At, and shown in mobile application layer, same principle, mobile application layer can be moved by Androld and Windows Phone Platform completes same operation, to complete the cross-platform mobile application of mobile application layer.
Same principle, the present embodiment can also realize that mobile application layer obtains local resource by different mobile solution platforms Ability, principle with obtain remote pages information it is consistent.

Claims (2)

1. a kind of Asynchronous Request method based on mixed mode cross-platform, it is characterised in that:Pass through not in mobile application layer When obtaining remote pages information with mobile platform, using a library JS is arranged between mobile application layer and mobile platform, page is realized Face is interacted with mobile application layer, and specific implementation process is:Remote pages are split as data and page structure, page structure is by JS Library provides the component and layout method needed for page structure, and accesses the ability of data, then between the libraries JS and mobile platform Setting engine corresponding with mobile platform, engine is interior to be equipped with browser corresponding with mobile platform and public function module, is moving When dynamic application layer is wanted to obtain remote pages information, the libraries JS, which receive, to be instructed and instruction is passed in engine movement corresponding with engine Platform only obtains the data of remote pages, and by data by backtracking to the libraries JS and and the libraries JS in page corresponding with data Face structure together, shows in mobile application layer, and the step of implementing Asynchronous Request is:
One, application layer sends out request instruction and then application layer continues other operations, which is required remote pages Information;
Two, the libraries JS receive formed after instruction needed for remote pages information page structure, and by the number of required remote pages information According to parameter is formed, the ID of required remote pages information callback method and holding are generated, while generating callback method ID's Correspondence;
Three, parameter and ID information are imparted to engine;
Four, engine obtains required parameter, i.e. data by the mobile platform asynchronous call remote pages that are corresponding to it;
Five, engine returns to the parameter of acquisition and ID in the libraries JS, due to having generated the correspondence of ID in the libraries JS, i.e., Realize that parameter is combined to form required remote pages information with page structure in the libraries JS, layer to be applied is completed real after other are operated The display of remote pages information needed for existing.
2. according to the Asynchronous Request method based on mixed mode cross-platform described in claim 1, it is characterised in that:It moves Moving platform includes IOS, Android and Windows Phone.
CN201510150915.5A 2015-04-01 2015-04-01 Asynchronous Request method based on mixed mode cross-platform Active CN104750548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510150915.5A CN104750548B (en) 2015-04-01 2015-04-01 Asynchronous Request method based on mixed mode cross-platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510150915.5A CN104750548B (en) 2015-04-01 2015-04-01 Asynchronous Request method based on mixed mode cross-platform

Publications (2)

Publication Number Publication Date
CN104750548A CN104750548A (en) 2015-07-01
CN104750548B true CN104750548B (en) 2018-09-28

Family

ID=53590291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510150915.5A Active CN104750548B (en) 2015-04-01 2015-04-01 Asynchronous Request method based on mixed mode cross-platform

Country Status (1)

Country Link
CN (1) CN104750548B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447072B (en) * 2015-09-07 2020-08-11 华青融天(北京)软件股份有限公司 Configurable interface framework and searching method and system using same
CN108399120B (en) * 2017-02-06 2021-01-29 腾讯科技(深圳)有限公司 Asynchronous message monitoring method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064958A (en) * 2012-12-31 2013-04-24 乐视致新电子科技(天津)有限公司 Method for automatic recognition and analysis of browser and based on hyper text makeup language (HTML) 5 video label
CN103744652A (en) * 2013-12-19 2014-04-23 深圳市迈桥科技有限公司 Hybrid APP development method and device across mobile terminals

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7418665B2 (en) * 2002-10-16 2008-08-26 Shaun Savage Portable cross platform database accessing method and system
US20040205068A1 (en) * 2002-11-05 2004-10-14 Everypath, Inc. Unified platform for building and operating connected and disconnected mobile applications

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103064958A (en) * 2012-12-31 2013-04-24 乐视致新电子科技(天津)有限公司 Method for automatic recognition and analysis of browser and based on hyper text makeup language (HTML) 5 video label
CN103744652A (en) * 2013-12-19 2014-04-23 深圳市迈桥科技有限公司 Hybrid APP development method and device across mobile terminals

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于HTML5跨平台移动应用的研究与实践;潘志宏等;《电脑知识技术》;20130630;第19卷(第17期);第3992-3995页 *

Also Published As

Publication number Publication date
CN104750548A (en) 2015-07-01

Similar Documents

Publication Publication Date Title
EP3855312A1 (en) Information processing method, device, storage medium, electronic device and system
CN102819451B (en) A kind of browser plug-in call method and system
CN107957911B (en) Method and apparatus, the method and apparatus of module data processing of component call
CN104426967B (en) A kind of cross-platform and striding equipment mobile application development system
Juan et al. Cloud and open BIM-based building information interoperability research
CN105306861A (en) Online teaching recording and playing method and system
CN111526425B (en) Video playing method and device, readable medium and electronic equipment
CN103699635B (en) Information processing method and device
CN110399578A (en) Page access method and device
CN104750548B (en) Asynchronous Request method based on mixed mode cross-platform
CN104267957A (en) Mobile application unified service framework system
CN108108460A (en) A kind of standardized work flows intelligent management system framework and system
CN109976736A (en) Reduce the unified platform application framework of system business model complexity
CN103914500A (en) Configuration on-line display method based on time series data
CN107396186B (en) Linux equipment WebOS system application management method
CN104020849A (en) Multi-program simultaneous display method and system based on windows CE
CN102761718A (en) Television program browsing method and system
CN107508912A (en) Industrial Internet of things system and method based on data cloud platform
CN103414749A (en) System and method for web visual editing of iOS client application
CN103617034A (en) Intelligent course website generating system on basis of access of multiple terminals
Wei The Design and Implementation of a Mobile Learning Platform Based on Android
CN114598936B (en) Subtitle batch generation and management method, system, device and storage medium
Shen et al. Standardizing the Internet of Things in an evolutionary way
CN106406889A (en) A heterogeneous application system content intelligent conversion engine suitable for mobile clients
CN103970513A (en) Source data information access method and platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160714

Address after: 550002 Guizhou Province, Guiyang city Nanming District Xinhua Road grand Vista C building 703

Applicant after: INFORMATION CENTER, GUIZHOU POWER GRID CO., LTD.

Applicant after: GUIZHOU GUANGSI INFORMATION NETWORK CO., LTD.

Address before: 550001 No. 38 South Ruijin Road, Yunyan District, Guizhou, Guiyang

Applicant before: INFORMATION & COMMUNICATION BRANCH OF GUIZHOU GRID COMPANY

GR01 Patent grant
GR01 Patent grant