Movatterモバイル変換


[0]ホーム

URL:


CN101887376A - Widget engine and method for uploading scripts or plugins by using same - Google Patents

Widget engine and method for uploading scripts or plugins by using same
Download PDF

Info

Publication number
CN101887376A
CN101887376ACN2010102233385ACN201010223338ACN101887376ACN 101887376 ACN101887376 ACN 101887376ACN 2010102233385 ACN2010102233385 ACN 2010102233385ACN 201010223338 ACN201010223338 ACN 201010223338ACN 101887376 ACN101887376 ACN 101887376A
Authority
CN
China
Prior art keywords
widget
script plug
plug
script
attribute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010102233385A
Other languages
Chinese (zh)
Other versions
CN101887376B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE CorpfiledCriticalZTE Corp
Priority to CN201010223338.5ApriorityCriticalpatent/CN101887376B/en
Publication of CN101887376ApublicationCriticalpatent/CN101887376A/en
Application grantedgrantedCritical
Publication of CN101887376BpublicationCriticalpatent/CN101887376B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Abstract

The invention discloses a Widget engine and a method for uploading scripts or plugins by using the same. The method comprises the following steps of: acquiring the preset attributes of scripts or plugins to be uploaded in a Widget packet by using the Widget engine; and uploading the scripts or the plugins to a browser engine according to the preset attributes of the scripts or the plugins. In the Widget engine and the method for uploading scripts or plugins by using the same, plugin interfaces can be directly invoked through the Widget engine so that the scripts or the plugins can be uploaded in advance, thereby improving user experience without making declaration in the scripts.

Description

Method for loading script plug-in by Widget engine and Widget engine
Technical Field
The invention relates to a technology for loading a script plug-in by a browser, in particular to a method for loading the script plug-in by a Widget engine and the Widget engine.
Background
Widget is a Web applet based on the internet, and can generally realize a certain function; the presentation may be in the form of a video, map, news or mini-game, etc. The mobile Widget runs on the mobile terminal, has the characteristics of small size, portability, openness, interactivity and the like, and is very suitable for mobile internet application.
The loading method of the script plug-in of the hypertext language is plug-and-play, and the plug-in needing to be loaded can be determined by executing keywords (< object > or < embed >) in the hypertext file or the script file through a browser engine. Referring to fig. 1, the process of loading the plug-in by the browser includes:
step S10, when opening a URL, the browser engine executes a Web Resource corresponding to the URL (Uniform Resource Locator); firstly, starting and initializing a browser engine by a browser, and then calling the browser engine to open a URL (uniform resource locator);
step S11, checking whether the tag is an object tag or an embedded tag; the browser engine checks whether the keyword in the hypertext file or the script file is < object > or < embed >; if yes, go to step S12, otherwise end;
step S12, loading plug-ins required by < object > or < embed > tags; the browser engine loads the plug-ins required by the < object > or < embed > tags.
The browser plug-in loading mode is carried out during script running, and a user can be in a waiting state in the loading process, so that the user experience is influenced.
Disclosure of Invention
The invention mainly aims to provide a method for loading a script plug-in by a Widget engine and the Widget engine, which can improve user experience.
The invention provides a method for loading script plug-ins by a Widget engine, which comprises the following steps:
the method comprises the steps that a Widget engine obtains attributes which are pre-configured by script plug-ins needing to be loaded in a Widget package;
and loading the script plug-in into a browser engine according to the attribute preset by the script plug-in.
Preferably, the step of the Widget engine obtaining the attribute pre-configured by the script plug-in stored in the Widget package further includes the following steps:
and searching the needed script plug-in by the Widget engine, and storing the needed script plug-in the Widget package.
Preferably, the pre-configuring specifically includes:
and adding keywords in the configuration file of the Widget package, and identifying script plug-ins needing to be loaded through the attributes of the configuration keywords.
Preferably, the pre-configuring further specifically includes:
adding extension keywords in a configuration file of the Widget package, and setting the name and the path of the script plug-in the attribute; or,
and adding standard keywords in the configuration file of the Widget package, and setting the name of the script plug-in the attribute.
Preferably, the step of loading the script plug-in into the browser engine according to the attribute preconfigured by the script plug-in specifically includes:
the method comprises the steps that a Widget engine reads keywords of a configuration file of a Widget package to obtain attributes of script plug-ins needing to be loaded;
acquiring an interface function of the script plug-in according to the attribute, and calling the interface function to acquire an entry function operated by the script plug-in;
and calling the entry function, and loading the script plug-in into a browser engine.
The invention also provides a Widget engine, comprising:
the acquisition module is used for acquiring the attribute which is configured in advance by the script plug-in needing to be loaded in the Widget package;
and the loading module is used for loading the script plug-in into the browser engine according to the attribute preset by the script plug-in.
Preferably, the apparatus further comprises:
and the storage module is used for searching the needed script plug-in and storing the needed script plug-in the Widget package.
Preferably, the pre-configuring specifically includes:
and adding keywords in the configuration file of the Widget package, and identifying script plug-ins needing to be loaded through the attributes of the configuration keywords.
Preferably, the pre-configuring further specifically includes:
adding extension keywords in a configuration file of the Widget package, and setting the name and the path of the script plug-in the attribute; or,
and adding standard keywords in the configuration file of the Widget package, and setting the name of the script plug-in the attribute.
Preferably, the loading module is specifically configured to:
reading keywords of a configuration file of the Widget package to obtain the attribute of the script plug-in needing to be loaded;
acquiring an interface function of the script plug-in according to the attribute, and calling the interface function to acquire an entry function operated by the script plug-in;
and calling the entry function, and loading the script plug-in into a browser engine.
The method for loading the script plug-in by the Widget engine and the Widget engine can directly call the plug-in interface through the Widget engine, load the script plug-in advance, and do not need to declare in the script, thereby improving the user experience.
Drawings
FIG. 1 is a flowchart illustrating steps of loading a plug-in by a browser in the prior art;
FIG. 2 is a flowchart illustrating steps of an embodiment of a method for loading a script plug-in by a Widget engine according to the present invention;
FIG. 3 is a flowchart illustrating steps of another embodiment of a method for loading a script plug-in by a Widget engine according to the present invention;
FIG. 4 is a flowchart illustrating steps of loading a script plug-in according to another embodiment of the method for loading a script plug-in by a Widget engine of the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a Widget engine of the present invention;
fig. 6 is a schematic structural diagram of another embodiment of the Widget engine of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The invention can load the script plug-in advance, does not need to declare the loaded plug-in the script, directly uses the plug-in interface and can improve the user experience. The script plug-in may be a plug-in that does not require a window operation and conforms to the NETSCAPE plug-in specification.
The browser engine referred to below may be used to process Web hypertext on a mobile terminal; the Widget engine can be positioned above the browser engine and is used for operating the browser engine; NETSCAPE plug-in standard is Web hypertext plug-in specification proposed by network view company; < object >, which is a hypertext language keyword; < embed >, which is a hypertext language keyword; the Widget package can be a folder or a compressed package of a folder.
Referring to fig. 2, an embodiment of a method for loading a script plug-in by a Widget engine according to the present invention is provided, where the method includes:
step S20, the Widget engine acquires the attribute pre-configured by the script plug-in needing to be loaded in the Widget package;
and step S21, loading the script plug-in into the browser engine according to the attribute preset by the script plug-in.
As shown in step S20, the properties of the script plug-in can be pre-configured to determine the script plug-in that needs to be loaded. In this embodiment, the method may be applied to a mobile terminal, and the mobile terminal may provide services provided by the mobile terminal itself to the mobile Widget for access through a script plug-in mode. The mobile terminal classifies script plug-ins according to the types of services, such as multimedia playing plug-ins, hardware device plug-ins, network plug-ins, telephone plug-ins, file operation plug-ins, database service plug-ins, and the like. The mobile Widget can analyze the Widget package according to the requirement, extract the attribute of the script plug-in the configuration file and determine the plug-in needing to be loaded. In the Widget package, a corresponding script plug-in may be stored in advance. The attributes include the name, type, path, version number of the script plug-in, and/or the URL of the update plug-in, etc.
The mobile terminal may be a handheld intelligent electronic device such as a mobile phone and a Personal Digital Assistant (PDA).
As shown in step S21, the Widget engine may call a plug-in interface of the script plug-in according to the pre-configured attributes (such as name, path, etc.), and load the script plug-in to be loaded into the browser engine.
According to the method for loading the script plug-in by the Widget engine, the plug-in interface can be directly called by the Widget engine, the script plug-in is loaded in advance, and the statement in the script is not needed, so that the user experience is improved. Meanwhile, due to the fact that resources of the mobile terminal are limited, the method has a more remarkable effect when used in the mobile terminal.
Referring to fig. 3, another embodiment of the method for loading a script plug-in by a Widget engine according to the present invention is provided, where the method further includes, before step S20:
and S200, searching the needed script plug-in by the Widget engine, and storing the needed script plug-in the Widget package.
In step S200, in this embodiment, the Widget engine may search for a needed script plug-in from script plug-ins provided by the mobile terminal, and store the needed script plug-in into the Widget package as a standby. The searching can be to search for a needed (including version updating) script plug-in the mobile terminal, and save the attribute (including name, path, type and the like) of the script plug-in to the configuration file of the Widget package through pre-configuration; the searching may also be performed outside the mobile terminal, for example, by searching for a required script plug-in through a network, downloading and storing the script plug-in into the Widget package according to a network path (for example, a URL), and storing the attribute of the script plug-in into a configuration file of the Widget package through pre-configuration.
In this embodiment, the pre-configuring may specifically include:
and step A, adding keywords in the configuration file of the Widget package, and identifying script plug-ins to be loaded through the attributes of the configuration keywords. The keywords comprise standard keywords and extended keywords; and aiming at the standard keyword, the Widget engine has corresponding configuration in advance. And corresponding keywords can be selected and added for configuration according to the attribute (type attribute) of the script plug-in which needs to be loaded. The types of the script plug-ins comprise standard script plug-ins and extended script plug-ins; the standard script plug-in may be provided by a service operator of the mobile terminal and the extended script plug-in may be provided by a third party. The pre-configuration can be completed by a Widget system tool, or other tools other than Widget.
In this embodiment, the step a may specifically include:
step A1, adding extension keywords in the configuration file of the Widget package, and setting the name and path of the script plug-in the attribute; or,
step A2, adding standard keywords in the configuration file of the Widget package, and setting the name of the script plug-in the attribute.
The step a1 may specifically be: xml, adding keyword < NETSCAPELIB >, setting name of script plug-in name attribute of < lib > sub item, and setting path of script plug-in path attribute.
The step a2 may specifically be: xml, add keyword < standby > in the configuration file config of the Widget package, and set the name of the script plug-in the name attribute of the < lib > sub-item.
Referring to fig. 4, in this embodiment, the step S21 specifically includes:
step S210, the Widget engine reads the key words of the configuration file of the Widget package to obtain the attribute of the script plug-in needing to be loaded;
step S211, obtaining an interface function of the script plug-in according to the attribute, and calling the interface function to obtain an entry function operated by the script plug-in;
step S212, calling the entry function, and loading the script plug-in into the browser engine.
In step S210, in this embodiment, the Widget engine of the mobile terminal reads the configuration file config.xml of the mobile Widget, and obtains the corresponding attribute of the script plug-in to be loaded according to the keyword < NETSCAPELIB > and < standardliib >, so as to conveniently read the script plug-in to be loaded.
In step S211, in this embodiment, the Widget engine of the mobile terminal may find the script plug-in that needs to be loaded according to the attribute of the script plug-in that needs to be loaded, which is obtained in step S210, by using the interface function provided by the operating system of the mobile terminal. And opening the script plug-in to be loaded to obtain an interface function provided by the script plug-in to the outside. The interface function includes: initializing the interface function of the plug-in, obtaining the interface function of the plug-in entry function, closing the interface function of the plug-in, and the like. The interface function is an export interface function specified by the script plug-in.
The Widget engine constructs a data type variable defined by a browser engine, and calls the initialization plug-in interface function as a parameter to initialize the script plug-in; the Widget engine calls the interface function for obtaining the plug-in entry function to obtain the entry function operated by the script plug-in.
In step S212, in this embodiment, the Widget engine of the mobile terminal may call an entry function run by the script plug-in, and embed the plug-in the browser engine.
After receiving the mobile Widget closing message, the Widget engine can check whether an interface function of the closing plug-in of the script plug-in exists, and if so, the Widget engine calls the interface function of the closing plug-in to unload the plug-in; the Widget engine may then shut itself down.
Referring to fig. 5, an embodiment of theWidget engine 30 of the present invention is provided, which includes an obtainingmodule 31 and aloading module 32; the obtainingmodule 31 is configured to obtain an attribute preconfigured by a script plug-in to be loaded in the Widget package; theloading module 32 is configured to load the script plug-in into the browser engine according to the attribute preconfigured by the script plug-in.
The obtainingmodule 31 may obtain the configured attributes of the script plug-in advance, and determine the script plug-in to be loaded. Theloading module 32 may call a plug-in interface of the script plug-in according to the configured attributes (such as name, type, path, and the like), and load the script plug-in to be loaded into the browser engine.
TheWidget engine 30 of this embodiment may directly call a plug-in interface, load a script plug-in advance, and need not to make a statement in a script, thereby improving user experience. Meanwhile, because the resources of the mobile terminal are limited, theWidget engine 30 is used in the mobile terminal, which has a more significant effect.
Referring to fig. 6, another embodiment of theWidget engine 30 of the present invention is provided, where theWidget engine 30 further includes astorage module 33, which is configured to search for a needed script plug-in and store the needed script plug-in a Widget package. The searching can be to search for a needed (including version updating) script plug-in the mobile terminal, and save the attribute (including name, path, type and the like) of the script plug-in to the configuration file of the Widget package through pre-configuration; the searching may also be performed outside the mobile terminal, for example, by searching for a required script plug-in through a network, downloading and storing the script plug-in into the Widget package according to a network path (for example, a URL), and storing the attribute of the script plug-in into a configuration file of the Widget package through pre-configuration.
In this embodiment, the pre-configuring may specifically include adding a keyword to a configuration file of the Widget package, and identifying a script plug-in to be loaded by configuring an attribute of the keyword.
In this embodiment, the pre-configuring may further specifically include: adding extension keywords in a configuration file of the Widget package, and setting the name and the path of the script plug-in the attribute; or, adding a standard keyword in a configuration file of the Widget package, and setting the name of the script plug-in the attribute.
In this embodiment, theloading module 32 may be specifically configured to: reading keywords of a configuration file of the Widget package to obtain the attribute of the script plug-in needing to be loaded; acquiring an interface function of the script plug-in according to the attribute, and calling the interface function to acquire an entry function operated by the script plug-in; and calling the entry function, and loading the script plug-in into the browser engine.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

CN201010223338.5A2010-07-092010-07-09The method of Widget engine loading scripts plug-in unit and Widget engineActiveCN101887376B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201010223338.5ACN101887376B (en)2010-07-092010-07-09The method of Widget engine loading scripts plug-in unit and Widget engine

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201010223338.5ACN101887376B (en)2010-07-092010-07-09The method of Widget engine loading scripts plug-in unit and Widget engine

Publications (2)

Publication NumberPublication Date
CN101887376Atrue CN101887376A (en)2010-11-17
CN101887376B CN101887376B (en)2015-09-16

Family

ID=43073306

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201010223338.5AActiveCN101887376B (en)2010-07-092010-07-09The method of Widget engine loading scripts plug-in unit and Widget engine

Country Status (1)

CountryLink
CN (1)CN101887376B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102081633A (en)*2009-11-272011-06-01阿里巴巴集团控股有限公司JavaScript file management method, device and system
CN102207873A (en)*2011-06-152011-10-05中国联合网络通信集团有限公司Realizing method of JavaScript extended object based on Android platform, and binding interface structure
CN102546811A (en)*2012-01-172012-07-04百度在线网络技术(北京)有限公司Method and device for arranging browser plugin on mobile terminal
WO2012155698A1 (en)*2011-06-302012-11-22中兴通讯股份有限公司Browser engine based method for dynamically loading widget and mobile terminal
CN102880456A (en)*2012-07-312013-01-16北京奇虎科技有限公司Method and device for creating plug-in
CN103365907A (en)*2012-04-062013-10-23腾讯科技(深圳)有限公司Method, system and server for displaying payment page
CN103839156A (en)*2014-03-202014-06-04上海讯联数据服务有限公司Method for displaying checkout counter page based on page skip payment in online payment
CN104049986A (en)*2013-03-142014-09-17腾讯科技(深圳)有限公司Plugin loading method and device
CN104423986A (en)*2013-09-022015-03-18北京亿阳信通科技有限公司Method and device for embedding script into application system
CN105446709A (en)*2014-07-292016-03-30阿里巴巴集团控股有限公司Method and device for processing Java application
WO2017020459A1 (en)*2015-07-312017-02-09百度在线网络技术(北京)有限公司Method and apparatus for configuring plugin package for host

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101505409A (en)*2009-03-132009-08-12中兴通讯股份有限公司Method for playing mobile multimedia broadcast program through browser and terminal thereof
CN101667115A (en)*2008-09-022010-03-10中国移动通信集团公司Terminal, system and method for deploying client application

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101667115A (en)*2008-09-022010-03-10中国移动通信集团公司Terminal, system and method for deploying client application
CN101505409A (en)*2009-03-132009-08-12中兴通讯股份有限公司Method for playing mobile multimedia broadcast program through browser and terminal thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
黄金雪: "《Widget引擎编程应用》", 《电脑知识与技术》*
黎莹等: "《基于XML_Glue的Widget的开发与研究》", 《计算机技术与发展》*

Cited By (18)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102081633A (en)*2009-11-272011-06-01阿里巴巴集团控股有限公司JavaScript file management method, device and system
CN102207873A (en)*2011-06-152011-10-05中国联合网络通信集团有限公司Realizing method of JavaScript extended object based on Android platform, and binding interface structure
CN102207873B (en)*2011-06-152013-10-23中国联合网络通信集团有限公司 JavaScript extension object implementation method and binding interface structure based on Android platform
CN102323887B (en)*2011-06-302017-02-08中兴通讯股份有限公司Browser engine-based method for dynamically loading Widget and mobile terminal
WO2012155698A1 (en)*2011-06-302012-11-22中兴通讯股份有限公司Browser engine based method for dynamically loading widget and mobile terminal
CN102546811A (en)*2012-01-172012-07-04百度在线网络技术(北京)有限公司Method and device for arranging browser plugin on mobile terminal
CN103365907A (en)*2012-04-062013-10-23腾讯科技(深圳)有限公司Method, system and server for displaying payment page
CN103365907B (en)*2012-04-062017-06-30腾讯科技(深圳)有限公司Display pays method, system and the server of the page
CN102880456A (en)*2012-07-312013-01-16北京奇虎科技有限公司Method and device for creating plug-in
CN102880456B (en)*2012-07-312016-08-31北京奇虎科技有限公司Plug-in loading method and system
CN104049986A (en)*2013-03-142014-09-17腾讯科技(深圳)有限公司Plugin loading method and device
CN104049986B (en)*2013-03-142018-12-18腾讯科技(深圳)有限公司plug-in loading method and device
CN104423986A (en)*2013-09-022015-03-18北京亿阳信通科技有限公司Method and device for embedding script into application system
CN104423986B (en)*2013-09-022018-12-14山东亿阳信通信息技术有限公司A kind of method and apparatus that application system embeds script
CN103839156A (en)*2014-03-202014-06-04上海讯联数据服务有限公司Method for displaying checkout counter page based on page skip payment in online payment
CN105446709A (en)*2014-07-292016-03-30阿里巴巴集团控股有限公司Method and device for processing Java application
CN105446709B (en)*2014-07-292019-06-21阿里巴巴集团控股有限公司A kind of Java application processing method and device
WO2017020459A1 (en)*2015-07-312017-02-09百度在线网络技术(北京)有限公司Method and apparatus for configuring plugin package for host

Also Published As

Publication numberPublication date
CN101887376B (en)2015-09-16

Similar Documents

PublicationPublication DateTitle
CN101887376B (en)The method of Widget engine loading scripts plug-in unit and Widget engine
US8620995B2 (en)Method, computer program, transcoding server and computer system for modifying a digital document
US9262311B1 (en)Network page test system and methods
CN107864173A (en)Terminal page caching method, system and readable storage medium storing program for executing
CN102662703A (en) Application plug-in loading method and device
US10284686B2 (en)Server, client, system and method for preloading browsed page in browser
CN108319662A (en)Page processing method, device, electronic equipment and readable storage medium storing program for executing
CN105260318A (en)Automatic testing method and device based on web pages
US10452730B2 (en)Methods for analyzing web sites using web services and devices thereof
CN110390043A (en) Method, device, terminal and storage medium for crawling web mailbox data
CN105094777B (en)Realize the method and device for applying screenshotss
CN113064685A (en)H5 page loading method and device
KR20050076719A (en)System and method for dynamically adding features to software applications
CN106201610A (en)Web application accesses the method and device of the primary function of terminal
CN109492144A (en)Association relationship analysis method, device and the storage medium of software systems
CN111949491A (en)SQL extraction method and device for MyBatis application program
CN104363237B (en) Method and system for processing metadata of Internet media resources
CN108920246B (en)Form draft component sharing method and device, terminal device and readable storage medium
CN104217021B (en)Reading server, terminal device and its method for showing reading content
CN113377674B (en)Log code adding method and device
KR20200114486A (en)Method, apparatus and computer program for collecting URL in web page
CN106469048A (en)A kind of method and apparatus calling content in attribute configuration file
CN112149033B (en)Method and device for acquiring H5 page control, electronic equipment and storage medium
WO2023092981A1 (en)Streaming data processing method, rule plug-in, and streaming data processing module and system
US9189633B2 (en)Download management method and device based on android browser

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp