WO2014043864A1 - Application invocation method, operating system and browser - Google Patents

Application invocation method, operating system and browser Download PDF

Info

Publication number
WO2014043864A1
WO2014043864A1 PCT/CN2012/081600 CN2012081600W WO2014043864A1 WO 2014043864 A1 WO2014043864 A1 WO 2014043864A1 CN 2012081600 W CN2012081600 W CN 2012081600W WO 2014043864 A1 WO2014043864 A1 WO 2014043864A1
Authority
WO
WIPO (PCT)
Prior art keywords
web application
application
server
operating system
native
Prior art date
Application number
PCT/CN2012/081600
Other languages
French (fr)
Chinese (zh)
Inventor
胡立新
李德旭
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2012/081600 priority Critical patent/WO2014043864A1/en
Priority to CN201280001733.6A priority patent/CN103917951B/en
Publication of WO2014043864A1 publication Critical patent/WO2014043864A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Definitions

  • the present invention relates to communication technologies, and in particular, to a method, an operating system, and a browser for application calling. Background technique
  • the native application is the native application (Native application), which refers to the local application developed for the development interface of the specific operating system and the supported development language.
  • the specific operating system can be the Android operating system.
  • Native applications are attached to the platform layer of the operating system, providing excellent performance and user experience, such as providing a high-quality and gorgeous user interface and smooth interaction. Native applications can flexibly invoke terminal device capabilities and access local resources, thus enabling more For complex application functions; since the Native application itself and the running data are mostly local, it is easy to support online and offline functions, saving traffic.
  • Native applications have the following disadvantages: Different platforms have different development standards and interfaces, and need to be developed for specific platforms. Native application platform migration and maintenance of multiple platform versions require a lot of manpower and time cost; different platform functions and Implementations vary widely, and user experiences may vary across platforms; feature upgrades can result in frequent downloads and installations, increased traffic, and impact on the user experience.
  • a web application is an application developed in a language supported by a browser (such as Internet Explorer) that runs on a standard browser and network to perform one or more specific functions for the user.
  • a browser such as Internet Explorer
  • Web applications have the following advantages: Outstanding cross-platform, cross-terminal and cross-browser features, one code running everywhere, greatly reducing development and maintenance costs; running in the browser, no need to install
  • the client program is easy to upgrade; the data is mainly stored on the server, which is more secure and reliable.
  • web applications also have the following disadvantages: Due to browser and development language, current performance and user experience still need to be improved; insufficient support for offline functions, applications may not be available when network is interrupted; or ability to call hardware resources Insufficient, resulting in limited application functionality.
  • the present invention provides a method for invoking an application, an operating system, and a browser, which are used to solve the problem that a Native application cannot invoke a Web application in the prior art.
  • an embodiment of the present invention provides a method for applying an application, including:
  • the operating system receives the service discovery request sent by the requesting party's native application, searches for the servant native application and the servant web application capable of processing the service discovery request according to the service discovery request, and presents the found servant native application and service.
  • Square web application
  • the browser When determining that the application selected by the user according to the presented servant native application and the servant web application is a servant web application, sending an application call request to the browser, where the application call request includes an address of the selected web application,
  • the browser is configured to open the web application corresponding to the address of the selected web application according to the address of the selected web application.
  • the service discovery request includes: a service category
  • the finding, by the service discovery request, the servant's native application and the servant web application that can process the service discovery request include:
  • a service provider native application and a servant web application capable of processing the service discovery request are found according to the service category.
  • the service discovery request includes: a service category and a data type
  • the finding, by the service discovery request, the servant's native application and the servant web application that can process the service discovery request include:
  • a service provider native application and a service web application capable of processing the service discovery request are found according to the service category and data type.
  • the service discovery request includes: a service category, a data type, and data to be processed;
  • the finding, by the service discovery request, the servant's native application and the servant web application that can process the service discovery request include: Finding a service provider native application and a service party web application capable of processing the to-be-processed data according to the service category and the data type;
  • the application call request includes the address of the selected web application, so that the browser opens the servant web application corresponding to the address of the selected web application according to the address of the selected web application, and specifically includes:
  • the application call request includes an address of the selected web application and the data to be processed, so that the browser opens a server web application corresponding to the address of the selected web application according to the address of the selected web application. And sending the to-be-processed data to the opened servant web application for processing.
  • the method for applying the call before the operating system receives the service discovery request sent by the requesting party's native application, the method for applying the call further includes:
  • the operating system receives a registration request of a server web application sent by the browser, where the registration request includes: information of a service provider web application;
  • the operating system edits the registration information of the browser in the operating system according to the information of the web application, so that the server web application can be searched by the operating system.
  • the method for applying the call before the operating system receives the service discovery request sent by the requesting party's native application, the method for applying the call further includes:
  • the operating system receives a registration request of a server web application sent by the browser, where the registration request includes: information of a service provider web application;
  • the operating system generates an installation file of the web application association program corresponding to the server web application according to the information of the server web application, and executes the installation file to obtain a web application association program registered in the operating system.
  • the searching for the service provider local application and the service provider web application that can process the service discovery request according to the service discovery request includes:
  • the application when it is determined that the user selects, according to the presented servant native application and the servant web application, the application is a servant web application, sending an application call request to the browser, where the application call request includes the selected web application
  • the address specifically includes: when it is determined that the application selected by the user according to the presented servant native application and the web application association program corresponding to the servant web application is a web application association program corresponding to the servant web application, a web application association program corresponding to the servant web application, where the web application association program corresponding to the servant web application sends the application call request to a browser, where the application call request includes a web corresponding to the servant web application
  • the operating system generates, according to the information of the service provider web application, the installation of the web application association program corresponding to the service provider web application.
  • Documents including:
  • the bytecode is packaged into an installation file of the web application association program, and the installation file is executed to obtain a web application association program corresponding to the service provider web application registered in the operating system.
  • the operating system before the operating system receives the service discovery request sent by the requesting party, the operating system further includes:
  • the operating system receives a registration request of a server web application sent by the browser, where the registration request includes: information of a service provider web application;
  • the operating system sends the information of the servant web application to the network side server, so that the network side server generates a web application association program corresponding to the servant web application according to the information of the servant web application.
  • the operating system receives an installation file of the web application association program sent by the network side server, executes an installation file of the web application association program, and obtains a web application association program registered in an operating system; or the operation System from the network side server Downloading the installation file of the web application association program, executing the installation file of the downloaded web application association program, and obtaining a web application association program registered in the operating system.
  • an embodiment of the present invention provides an operating system, including:
  • a native application invoking module configured to receive a service discovery request sent by the requesting party's native application, find a service provider native application and a server web application capable of processing the service discovery request according to the service discovery request, and present the found service Fangyuan application and server web application;
  • the native application calling module is specifically used to
  • a service provider native application and a service web application capable of processing the service discovery request are found according to the service category and data type.
  • the operating system further includes:
  • a web application registration module configured to receive a registration request of a servant web application sent by the browser, where the registration request includes: information of a servant web application;
  • the operating system further includes:
  • a web application registration module configured to receive a registration request of a servant web application sent by the browser, where the registration request includes: information of a servant web application;
  • the installation file of the web application and executing the installation file, obtains the web application association program registered by the service provider web application in the operating system.
  • an embodiment of the present invention provides a browser, including: a web application calling module, configured to receive an operating system when the user selects, according to the presented servant native application and the servant web application, the web application in the servant web application to process the service discovery request sent by the requestor native application Sending an application call request, where the application call request includes: an address of the selected web application;
  • the address of the web application selected by the residence opens the service web application corresponding to the address of the selected web application.
  • the browser further includes: a web application installation module, configured to send a registration request of the servant web application to the operating system, where the registration request includes: the servant web application The information, so that the operating system edits the registration information of the browser in the operating system according to the information of the service provider web application, or generates a web that can be installed in the operating system according to the web application information. Apply the associated program.
  • the terminal provided by the embodiment of the present invention includes the operating system of any of the foregoing, and any one of the browsers, wherein the operating system communicates with the browser.
  • the application calling method, the operating system, and the browser of the present invention receive the service discovery request sent by the requesting party's native application through the operating system, and then search for the service provider's native application and the server Web that can process the service discovery request. Applying, and presenting the found servant native application and the servant web application, when determining that the user selects the application selected according to the presented servant native application and the ⁇ ⁇ web application as the ⁇ ⁇ Web web application Sending an application call request including an address of the selected web application to the browser, so that the browser selects an address of the selected web application to open a service web application corresponding to the address of the selected web application, so that the request can be implemented
  • the native application of the party is the call of the Native application to the web application.
  • FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present invention
  • 2A is a schematic flowchart of a method for calling an application according to an embodiment of the present invention
  • FIG. 2B is a schematic flowchart of a method for calling an application according to another embodiment of the present invention
  • FIG. 2C is a schematic diagram of an application according to another embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for calling an application according to another embodiment of the present invention
  • FIG. 4 is a schematic flowchart of a method for calling an application according to another embodiment of the present invention
  • FIG. 6 is a schematic flowchart of a method for invoking an application according to another embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of an operating system according to another embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of an operating system according to another embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a browser according to another embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a browser according to another embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a terminal according to another embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a terminal according to another embodiment of the present invention. detailed description
  • Android applications mainly include four types of components: Activity component (active component), Broadcast component (broadcast component), Service component (monthly component), Content Provider component (content provider component); The components themselves are independent, and components and components can call each other, coordinate work, and ultimately form a complete Android application. Communication between components and components of Android applications is primarily done through Android Intents, which provide late binding between various component codes of the same or different Android applications. Mechanisms.
  • Android Intents is a message object, through which the message object is applied to the Android app. The operation of the secondary operation and the data related to the action of one operation are described.
  • the Android operating system finds the message object according to the attribute information of the message object and delivers the message object to one or more capable of processing the message object.
  • Android application components to complete the call of Android application components.
  • Android Intents actually acts as a communication intermediary, providing information about the components calling each other, and decoupling between the caller and the callee.
  • Android Intents can be passed and different types of Android application components can be called.
  • Android Intents can be thrown to the Android operating system via the Content. startActivity() method or the Activity. startActivityForResult() method to trigger the running of Android application components or to call an already running Android application component.
  • the result parameter can be set in the Activity component of the startup by calling the Activity.setResult() method.
  • the result parameter can be received by the onActivityResult() method in the trigger activity.
  • a Service component can be started or passed to the running Service component via the Context.startService() method. You can also bind a Service component through the Context.bindService() method to establish a connection between the calling component and the target Service component.
  • Web Intents provides a client-side web application integration mechanism that enables web applications to interact with complex types of data, such as binary files.
  • the entire life cycle of Web Intents includes five phases of registration, invocation, selection, submission, and response. Each step is executed asynchronously, and the response result is obtained through asynchronous callback.
  • Web applications can register for Web Intents as follows: ⁇ intent
  • the “action” indicates the type of processing behavior of the web application.
  • the currently defined standard actions include Discover, Share, Edit, View, Pick, Subscribe, and Save, etc., the user can also customize the behavior of the Web Intent;
  • type indicates the type of data the web application supports;
  • href which specifies the specific location of the "action” page to allow the same service provider to provide more Web application month service;
  • disposition is used to specify how the web application is called.
  • Var intent new Intent( " htt : //web intents . or g/share " ,
  • the caller web page passes the Web Intents object to the web application through the browser through the start Activity() method.
  • the web application can write the processing result by calling the object's postResult() and postFailure() methods, and the caller web page can pass onSuccess( And the onFailureO callback function to get the response of the web application.
  • the embodiment of the present invention can provide a mechanism for the Native application to communicate with the Web application, so that the Native application can discover and invoke the Web application, so that the user can obtain the Web application by using the Native application during the process of using the Native application.
  • the features that are not available in the Native app can provide a mechanism for the Native application to communicate with the Web application, so that the Native application can discover and invoke the Web application, so that the user can obtain the Web application by using the Native application during the process of using the Native application.
  • a Native application has image browsing but does not have image editing function. If the user needs to process the image during the process of using the above Native application, the service discovery process can be triggered by clicking the button provided by the Native application to find and select.
  • a suitable servant web application processes the image and obtains the edited image from the selected servant web application.
  • the user can use the Native application to not only call other Native applications, but also call the service provider web application to process various types of requirements, and invoke the service through the Native application used.
  • Square web application This approach can make full use of the wide variety of feature-rich Web applications in the network. Developers can also focus on the development of the core functions of the Native application when developing the Native applications used by the above users, by calling other Native applications and services.
  • the native application refers to a development interface for the operating system of the terminal and a local application developed by the development language, and is generally installed in the operating system of the terminal, and the installed native application needs to be registered in the operating system.
  • Information such as service categories and data types that support processing. There may be multiple service categories and data types supported by each native application.
  • the service categories can be shared, viewed, edited, sent, and dialed.
  • the data type can be arbitrary.
  • MIME Multipurpose Internet Mail Extensions Multipurpose Internet Mail Extensions file type.
  • multiple native applications can be installed in the operating system for the user to use.
  • Browser is one of the native apps.
  • the service provider web application can be any website that provides specific information or services
  • the current terminal includes an operating system and a browser.
  • the browser is generally installed in the operating system, and the web application can be discovered and invoked through the browser.
  • the operating system generally runs on the terminal, and the terminal and the website are connected through the network.
  • the communication system in this embodiment includes a terminal and a server, and the terminal communicates with a server on the network side through a communication network.
  • the terminal in FIG. 1 may include a browser and an operating system, and a requestor native application and a servant native application connected to the operating system.
  • the terminal further includes a processor not shown in Fig. 1, which is connected to the browser and the operating system. Both the browser and the operating system are running on the processor.
  • the server in Fig. 1 includes a server web application, and the above communication network may be a wired communication network or a wireless communication network.
  • the network side may include multiple independent servers, all of which include multi-month server applications.
  • the terminal can invoke the service discovery request of the requesting party's native application in the service provider web application processing terminal through the communication network, thereby solving the problem that the native application cannot invoke the web application in the prior art, so that the user is using the Native application.
  • the Native application can be obtained by using the Native application to obtain the Native application.
  • FIG. 2A is a schematic flowchart of a method for calling an application according to an embodiment of the present invention. As shown in FIG. 1 and FIG. 2A, the method for calling an application in this embodiment is as follows.
  • the operating system receives a service discovery request sent by a requesting party's native application (ie, a Native application), and searches for a service-side native application and a server-side web application capable of processing the service discovery request according to the service discovery request, and presents the found service.
  • a requesting party's native application ie, a Native application
  • searches for a service-side native application and a server-side web application capable of processing the service discovery request according to the service discovery request and presents the found service.
  • Fang native application and server web application ie, a Native application
  • the application As the servant web application, sending an application call request to the browser, where the application call request includes an address of the selected web application, In order for the browser to open the web application corresponding to the address of the selected web application according to the address of the selected web application.
  • step 201 may include: a service category, and correspondingly, step 201 may be a step 20 not shown in the following figure. :
  • the operating system receives the service discovery request sent by the requesting party's native application, and the service discovery request includes: a service category, searching for a service provider native application and a server web application capable of processing the service discovery request according to the service category, and presenting the finding The servant native application and the servant web application.
  • the service discovery request in the foregoing step 201 may include: a service category and a data type, and the step 201 may be the following 201" (not shown):
  • the operating system receives a service discovery request sent by the requesting party's native application, the service discovery request includes: a service category and a data type; and a service provider native application and a service party capable of processing the service discovery request according to the service category and the data type a web application, and presenting the found servant native application and servant web application.
  • the service discovery request in the foregoing step 201 may further include: data to be processed.
  • the step 202 may specifically include:
  • the method invoked by the application in this embodiment implements communication between the native application and the Web application.
  • the operating system may not only be in the process of service discovery.
  • the servant native application that finds the service discovery request that satisfies the requestor's native application can also find the servant web application that can process the service discovery request of the requestor's native application, so that the user can have more application choices.
  • the service discovery request in the foregoing step 201 may further include: a service category, a data type, and data to be processed.
  • the foregoing step 201 may be as follows. Step 201a:
  • the operating system receives a service discovery request sent by the requesting party's native application, where the service discovery request includes: a service category, a data type, and data to be processed, and searches for a service capable of processing the to-be-processed data according to the service category and the data type.
  • the native application and the servant web application and present the found servant native application and servant web application.
  • step 202a may be as follows: Step 202a:
  • the application is a servant web application, sending an application call request to the browser, where the application call request includes the address and the to-be of the selected web application. Processing the data, so that the browser opens the web application corresponding to the address of the selected web application according to the address of the selected web application, and sends the to-be-processed data to the open server web
  • the application processes.
  • the foregoing service categories may include: sharing, viewing, editing, and the like.
  • the data type can be any MIME multimedia file type.
  • the service discovery request may further include: a service category, a data type, a data storage identifier to be processed, and the like.
  • the data corresponding to the data storage identifier to be processed may be complex data such as a binary file, a picture, and the like.
  • step 202 or 202a if the application selected by the user is the service provider's native application, the existing method is used for processing, for example, the selected service party's native application can be directly opened, and Reason.
  • step 202a if the user selects the servant web application registered in the operating system, the operating system sends the address of the servant web application and the data to be processed to the browser, and the browser according to the above
  • the address of the servant web application opens the corresponding servant web application, and sends the above-mentioned pending data to the servant web application.
  • the requesting party's native application can send the data to be processed to the operating system, and the operating system sends the data to be processed to the browser, so that the browser sends the data to be processed to the user-selected registration in the operating system.
  • the servant web application which in turn enables the open servant web application to process.
  • the requesting native application can send data to the browser using the following methods:
  • Intent intent new Intent(this, dest.calss);
  • the response of the service provider web application is received by the onActivityResult(int requestCode, int resultCode, Intent data) callback function, and the processing result data is included in the data object.
  • the foregoing application calling method further includes the following step 203.
  • the operating system receives a processing result of the server web application sent by the browser, and sends the processing result to the requesting party native application.
  • FIG. 2A and FIG. 2B can each include the step 203 at this point, and the embodiment is merely an example.
  • the processing result of the web application sent by the browser is received.
  • the browser can return the processing result by the following method:
  • Intent data new Intent()
  • the method invoked by the application in this embodiment implements the communication between the native application and the web application.
  • the operating system can not only find the service provider's native application that satisfies the service discovery request of the requesting party's native application, but also find out the service discovery process.
  • a servant web application that can handle the service discovery request of the requestor's native application, allowing the user to have more application choices.
  • native application developers can implement rich functionality by flexibly calling installed native applications or existing servant Web applications on the network, thereby reducing developer workload and shortening development cycles.
  • FIG. 3 is a schematic flowchart of an application calling method according to an embodiment of the present invention. As shown in FIG. 3, the application calling method in the embodiment of the present invention is as follows.
  • the operating system receives a registration request of a service provider web application sent by a browser, where the registration request includes: information of a service provider web application.
  • the service provider web application information includes: an address of the service provider web application; or, the information of the service provider web application includes: an address of the service provider web application, and further includes one or more of the following information: The service category of the web application, the type of data processed by the servant web application, the name of the servant web application, and the icon of the servant web application.
  • the operating system edits the registration information of the browser in the operating system according to the information of the servant web application, so that the servant web application can be searched by the operating system.
  • the operating system performs an application search according to the service discovery request
  • the service category and the data type carried by the service provider web application in the browser registration information match the service type and data type in the service discovery request, Then, it can be considered that the above service discovery request can be processed, and the browser will respond to the above service discovery request.
  • the operating system when the operating system performs an application search according to the service discovery request, if the service category carried by the service provider web application in the browser registration information matches the service category in the service discovery request. Then, it can be considered that the above service discovery request can be processed, and the browser will respond to the above service discovery request.
  • the registration information of the browser carries the information of the service provider web application, such as the service provider web application address.
  • the registration information of the browser may also carry information of the service provider web application, such as one or more of the address of the service provider web application and the following information: service category of the service provider web application, service party Web application The type of data being processed and the name of the server, the name of the application, etc.
  • the operating system receives the service discovery request sent by the requesting party's native application, searches for the servant native application and the servant web application capable of processing the service discovery request according to the service discovery request, and presents the found servant native application and service. Square web application.
  • the registration information of the browser carries the information of the service web application.
  • the operating system searches in the registration module/registry including all the registration information of the native application and the registration information of the browser, and can find the original application and the service of the service that can handle the service discovery request. Square web application.
  • the service discovery request in the above step 303 may include a service category, or may include: a service category and a data type, or may include: a service category and data to be processed, or may include a service category, a data type, and data to be processed, and the like. This embodiment does not limit it.
  • the operating system may serve The party's native application and server web application are presented to the user for user selection. For example, the operating system presents a list to the user, where the found servant native application and the servant web application are displayed; optionally, the icon of the found servant native application and the icon of the servant web application are displayed in the list Etc., this embodiment does not limit the content displayed in the above list.
  • the application is a servant web application, sending an application call request to the browser, where the application call request includes an address of the selected web application, So that the browser opens the servant web application corresponding to the address of the selected web application according to the address of the selected web application.
  • the step 304 may be specifically:
  • the application calling method in this embodiment solves the native application discovery and invokes the web application.
  • the problem is that users can have more choices in the process of using the native application, such as freely selecting the appropriate servant native application or servant web application to process the service discovery request, thereby making full use of the wide variety of networks. , a feature-rich servant web application.
  • FIG. 4 is a schematic flow chart of an application calling method according to another embodiment of the present invention. As shown in FIG. 4, the application calling method in the embodiment of the present invention is as follows.
  • the operating system receives a registration request of the servant web application sent by the browser, where the registration request includes: information of the servant web application.
  • the operating system generates an installation file of the web application association program corresponding to the server web application according to the information of the server web application, and executes the installation file to obtain a web application association registered by the service web application in the operating system. program.
  • the web application association program can be run to open the server web application through the browser, and the operating system can pass the running The web application association program invokes the servant web application.
  • the operating system may use the browser to send the to-be-processed data to the web application association program.
  • the web application association program may invoke the browser to open the web application.
  • the servant web application corresponding to the associated program, and the operating system sends the to-be-processed data to the servant web application through the browser.
  • the installation file of the web application association program corresponding to the service provider web application according to the information of the service provider web application in step 402 may specifically include:
  • the installation file of the web application association program executes the installation file to obtain a web application association program corresponding to the service provider web application registered in the operating system.
  • the operating system dynamically generates the source file of the web application association program according to the information of the web application of the service side, compiles the source file, and converts the compiled source file code into bytecodes that can be executed in the operating system. , and package the bytecode into an installation file of a web application associated program similar to the native application, execute the installation file, and get the operating system A web application association program corresponding to the web application of the service provider registered in the system.
  • the manner of obtaining the web application association program may be as follows: a) the operating system receives a registration request of the web application of the service provider sent by the browser, where the registration request includes: information of the web application of the service party;
  • the operating system sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
  • the operating system receives the installation file of the web application association program sent by the network side server, executes the installation file of the web application association program, and obtains the web application association program corresponding to the service provider web application registered in the operating system.
  • the network side server may dynamically generate a source file of the web application association program according to information of the service provider web application, compile the source file, and convert the compiled source file encoding into an operating system. Executing the bytecode, and packaging the bytecode into an installation file of the web application association program, executing the installation file, and obtaining a web application association program corresponding to the service provider web application registered in the operating system.
  • the operation process of the operating system can be simplified, and the calculation and storage capacity requirements of the user terminal can be reduced, and the power consumption of the mobile terminal is saved.
  • the operating system receives a registration request of the web application of the server sent by the browser, and the registration request includes: information of the web application of the service party;
  • the operating system sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
  • the operating system downloads the installation file of the web application association program from the network side server, and executes the installation file of the downloaded web application association program, and obtains the web application association program corresponding to the service provider web application registered in the operating system.
  • the network side server may send the download address of the generated installation file of the web application association program to the operating system, so that the operating system downloads the installation file of the web application association program generated by the network side server according to the download address.
  • the web application association program may not display the desktop image after being installed in the operating system.
  • the user interface may not be displayed at runtime, but may be managed by an application management function of the operating system, such as deleting the web application associated program.
  • the operating system receives a service discovery request sent by the requesting party's native application.
  • the service discovery request may include: a service category, or may include: a service category and a data type, or may include: a service category and data to be processed, or may include a service category, a data type, and data to be processed, and the like. This embodiment does not limit it.
  • step 404 may be to find, in the operating system, a registration service category that matches the service category and the data type according to the service category and data type in the service discovery request.
  • the registration data type obtains the service provider native application and the web application association program corresponding to the registration service category and the registration data type, and presents the found service party native application and the web application association program.
  • both the servant native application and the servant web application are registered with the registration service category and the registration data type in the operating system.
  • the web corresponding to the servant web application is executed.
  • the application association program, the web application association program corresponding to the service provider web application sends an application call request to the browser, where the application call request includes an address of the service provider web application corresponding to the web application association program corresponding to the service provider web application.
  • the browser opens the servant web application according to the address of the servant web application.
  • the above application calling method solves the problem that the native application is used for discovering and calling the servant web application, so that the user can have more options in the process of using the native application, such as being free to select a suitable servant native application or
  • the servant web application handles the response request, which in turn can take advantage of the wide variety of feature-rich servant web applications on the network.
  • the browser sends a registration request of the servant web application to the operating system to trigger the operating system to register the servant web application, wherein the registrant web application registration request
  • the information of the service provider web application includes: the address of the service provider web application, and may also include one or more of the following information: a service category of the service provider web application, and a service provider web application office. The type of data being processed, the name of the servant web application, the icon of the servant web application, and so on.
  • the browser may provide an interface for the user to select whether to trigger the operating system to register the servant web application, and if the user agrees to register the servant web application, the browser Sending a registration request of the servant web application to the operating system to trigger the operating system to register the servant web application, otherwise the browser terminates the above process, and does not send a registration request of the servant web application to the operating system.
  • FIG. 5 is a schematic flowchart of an application calling method according to an embodiment of the present invention, as shown in FIG.
  • the application calling method in the embodiment of the present invention is as follows.
  • the browser receives the application call request sent by the operating system, and the application The call request includes: The address of the selected web application.
  • the browser opens the web application corresponding to the address of the selected web application according to the address of the selected web application.
  • the application invocation request may further include: an address of the web application and data to be processed, where the to-be-processed data may be data to be processed in a service discovery request sent by the requesting party's native application to the operating system.
  • step 502 can be a step 502 not shown in the following figure:
  • the browser opens the servant web application according to the address of the servant web application, and sends the to-be-processed data to the servant web application, so that the servant web application processes the to-be-processed data.
  • step 500 the application calling method in this embodiment also included is the following step 500:
  • the browser sends a registration request of the servant web application to the operating system, and the registration request of the servant web application includes: information of the servant web application, so that the operating system edits the browsing in the operating system according to the information of the servant web application.
  • the above application calling method further includes a step 503 not shown in the following figure:
  • the browser obtains a processing result of the servant web application, and sends the processing result to the operating system. Specifically, the processing result is sent by the operating system to the requestor native application.
  • the application calling method receives the application calling request for opening the servant web application through the browser, and solves the problem that the native application is used for discovering and calling the servant web application, so that the user can have more in the process of using the native application.
  • the option such as the ability to freely select the appropriate servant native application or servant web application to process the response request, and then take advantage of the wide variety of feature-rich servant web applications on the network.
  • FIG. 7 is a schematic structural diagram of an operating system according to an embodiment of the present invention.
  • the operating system 12 in the embodiment of the present invention includes: a native application calling module 122, where a native application invokes a module, specifically Receiving the service discovery request sent by the requestor native application 13, searching for the service provider native application 14 and the monthly service web application 21 capable of processing the service discovery request according to the service discovery request, and presenting the discovered good service local application 14 and ⁇ Web Application 21;
  • the native application invoking module 122 sends an application call request to the browser when determining that the user selects the application selected by the service provider native application and the server web application as the server web application, where the application call request includes The address of the selected web application is such that the browser opens the web application corresponding to the address of the selected web application according to the address of the selected web application.
  • the foregoing service discovery request may include a service category.
  • the native application invoking module 122 may be specifically configured to receive a service discovery request sent by the requesting party's native application, according to the service category in the service discovery request. Find the ability to process the service discovery request a service provider native application and a server web application, and presenting the found service party native application and server web application, and determining an application selected by the user according to the presented service party native application and the server web application.
  • the servant web application sends an application call request to the browser, the application call request includes an address of the selected web application, so that the browser opens the address of the selected web application according to the address of the selected web application. Corresponding web application.
  • the foregoing service discovery request may include a service category and a data type.
  • the native application invoking module 122 may be specifically configured to receive a service discovery request sent by the requesting party's native application, according to the service discovery request.
  • the service category and data type described in the service provider native application and the servant web application capable of processing the service discovery request, and presenting the found servant native application and servant web application, and determining that the user is
  • the presented service provider native application and the server selected by the server web application are the server web application, sending an application call request to the browser, where the application call request includes an address of the selected web application, so that the browser Open the web application corresponding to the address of the selected web application according to the address of the selected web application
  • the service discovery request may further include: data to be processed.
  • the native application invoking module 122 is specifically configured to:
  • the service discovery request may include: a service category and data to be processed, or the service discovery request may include a service category, a data type, and data to be processed.
  • the native application call module is specifically used to:
  • the native application invoking module sends an application call request to the browser 11 when determining that the user selects the application selected by the service provider native application 14 and the server web application as the server web application, and the application call request includes the selected The address of the web application and the data to be processed, so that the browser opens the server web application corresponding to the address of the selected web application according to the address of the selected web application, and the data to be processed is Sent to the open servant web application for processing.
  • the native application invoking module 122 in the actual application is also used to receive the processing result of the server web application sent by the browser 11.
  • the native application invoking module 122 is configured to provide a user interface, and display to the user a list of applications that can be used as a server-side native application and a server-side web application, and the list may include an application name, an application address, an application icon, and the like of each application. .
  • the native application invoking module 122 receives the selection result of the user, such as the servant native application, opens the corresponding servant native application 14 according to the address of the application selected by the user, and sends the data to be processed from the service discovery request. Apply the service to the servant 14 natively.
  • the native application invoking module 122 sends the address of the servant web application and the data to be processed to the browser 11 through the operating system 12.
  • the requesting native application can send data to the browser or other servant native application using the following methods:
  • Intent intent new Intent(this, dest.calss);
  • the response is received by the onActivityResult(int requestCode, int resultCode, Intent data) callback function, and the processing result data is included in the data object.
  • Browser or other service party Native applications can return processing results by:
  • Intent data new Intent()
  • the operating system in this embodiment receives the service discovery request of the requesting party's native application through the native application invoking module 122, and then searches for the servant's native application and the servant's web application, and solves the problem that the native application is used to discover and invoke the servant's web application.
  • the user can have more options, such as freely selecting the appropriate servant native application or the servant web application to process the response request, thereby making full use of the wide variety of functions and functions in the network. Rich servant web application.
  • the operating system in this embodiment further includes a web application registration module 121, and the web application registration module 121 is configured to receive the web application of the server sent by the browser 11.
  • Registration request includes: information of the service provider web application;
  • the web application registration module 121 edits the registration information of the browser 11 in the operating system according to the information of the web application of the server, so that the registration information of the browser 11 carries part/all information of the web application of the server, and then the service party The web application can be looked up by the operating system.
  • the information of the servant web application includes: an address of the servant web application; or the servant web application information includes: an address of the servant web application, and one or more of the following information:
  • the service category of the service provider web application the data type processed by the service provider web application, the name of the service provider web application, and so on.
  • the web application registration module 121 dynamically modifies the registration information of the browser 11 according to the received address, service category, and data type of the servant web application, so that the registration information of the browser 11 carries the web application of the servant.
  • the service category, or service category and data type can in turn respond to the service discovery request sent by the requestor native application.
  • the web application registration module 121 is further configured to receive a registration request of the servant web application sent by the browser, where the registration request includes: a servant web application Information (such as the address of the service provider web application);
  • the information of the web application of the resident party generates the installation file of the web application associated program corresponding to the web application of the web, and executes the installation file to obtain the web application associated program registered by the web application in the operating system. (As shown in Figure 12).
  • the web application registration module 121 is specifically configured to generate a source file of the web application association program according to the information of the service provider web application, compile the source file, and convert the compiled source file encoding into a bytecode executable in the operating system, the bytecode is packaged into an installation file of a web application association program, and the installation file is executed to obtain a registration corresponding to the service provider web application registered in an operating system.
  • Web application association program ;
  • the source file of the web application association program is dynamically generated according to the information of the web application, and the source file is compiled, the compiled source file encoding is converted into a bytecode executable in the operating system, and the bytecode is The installation file is packaged into a web application, and the installation file is executed to obtain a web application association program corresponding to the service provider web application registered in the operating system.
  • the web application registration module 121 is a part of an operating system, and the web application registration module 121 dynamically generates a web application association according to a service category, a data type, an application address, an application icon, and the like of the received web application.
  • Various source files of the program compile the project through the built-in compilation environment, convert the compiled web application association program into bytecode executable in the operating system, and package the bytecode into a web application association.
  • the installation file of the program is a part of an operating system, and the web application registration module 121 dynamically generates a web application association according to a service category, a data type, an application address, an application icon, and the like of the received web application.
  • the native application invocation module 122 is specifically used to:
  • the native application invoking module 122 determines that the application selected by the user according to the presented servant native application and the web application association program corresponding to the servant web application is the web application association program corresponding to the servant web application.
  • Running the service web application Corresponding web application association program, the web application association program corresponding to the server web application sends the application call request to the browser, where the application call request includes the service party, the service discovery request may include a service category, or a service
  • the category and the data type, or the service category and the data to be processed, or the service category, the data type, and the data to be processed, etc., are not limited in this embodiment.
  • the web application registration module 121 is further configured to receive a registration request of the server web application sent by the browser, where the registration request includes: information of the service provider web application;
  • the web application registration module 121 sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
  • the web application registration module 121 receives an installation file of the web application association program sent by the network side server, executes an installation file of the web application association program, and obtains a web application association program registered in the operating system; or The operating system downloads an installation file of the web application association program from the network side server, executes an installation file of the downloaded web application association program, and obtains a web application association program registered in the operating system.
  • the foregoing web application registration module 121 is further configured to receive a registration request of the service provider web application sent by the browser, where the registration request includes: information of the service provider web application;
  • the web application registration module 121 sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
  • the web application registration module 121 receives an installation file of the web application association program sent by the network side server, and executes the installation file to obtain a webpage corresponding to the service provider web application registered by the service provider web application in the operating system. Applying the associated program; or, the web application registration module 121 downloads the installation file of the web application association program from the network side server, and installs the installation file of the downloaded web application association program to obtain the monthly service web.
  • the web application association program 15 corresponding to the Yueliangfang web application registered in the operating system is applied, as shown in FIG. In this scheme, generation, compilation, executable program conversion, and packaging of various source files corresponding to the web application association program 15 (shown in FIG. 12) are performed on the network side server.
  • the above manner can make the operating system 12 not have to provide functions and environments for generating, compiling, executing program conversion and packaging of various source files, and reducing the occupation of computing and storage resources in the terminal, especially for the mobile terminal. Save power.
  • the operating system in this embodiment uses the web application registration module 121 to register the servant web application in the operating system, and the native application invoking module 122 receives the service discovery request of the requesting party's native application, and looks up the servant's native application and servant.
  • the web application solves the problem that the native application is used to discover and invoke the servant web application, so that the user can have more options in the process of using the native application, such as freely selecting the appropriate servant native application or servant.
  • the web application handles the response request, which in turn can make full use of the wide variety of feature-rich service-side web applications in the network.
  • the web application registration module itself is a native application installed in the operating system.
  • the web application registration module may have a higher system authority to implement the generation of the web application installation file. , signature and packaging.
  • the application itself is a system application that naturally has the necessary permissions to generate, sign, and package the installation files for the web application.
  • FIG. 9 is a schematic structural diagram of a browser in an embodiment of the present invention.
  • the browser in this embodiment includes: a web application invoking module 112, configured to be used by a user according to a presented service provider.
  • the application selected by the servant web application is a service application sent by the operating system when the web application in the servant web application processes the service discovery request sent by the requesting party's native application, where the application call request includes: the selected The address of the web application; the web application corresponding to the address of the selected web application is opened according to the address of the selected web application.
  • the application call request may include the address of the servant web application and the data to be processed.
  • the web application invoking module 112 opens the service corresponding to the address of the servant web application according to the address of the servant web application. The web application, so that the servant web application processes the above data, and sends the to-be-processed data to the opened servant web application for processing. It can be understood that the web application invoking module 112 in FIG.
  • the browser in this embodiment further includes: a web application installation module 111, configured to send a registration request of the service provider web application to the operating system, where the registration request includes:
  • the web application registration module in the operating system edits the registration information of the browser in the operating system according to the information of the web application of the server, so that the web application of the server can be searched by the operating system. .
  • the browser in this embodiment further includes: a web application installation module 1 11, configured to send a registration request of the service provider web application to the operating system, where the registration request includes: information of the service provider web application, in the operating system
  • the web application registration module generates an installation file of the web application association program corresponding to the server web application according to the information of the server web application, and executes the installation file to obtain a web application association program registered in the operating system. (As shown in Figure 12).
  • the web application registration module 121 of the operating system receives the service category, the data type, and the address of the server web application of the installed web application from the web application installation module 111 of the browser, and dynamically according to the above parameters and data.
  • the installation file of the web application association program corresponding to the servant web application is generated and installed, and the installation file is executed to obtain a web application association program registered by the servant web application in the operating system.
  • the web application association program 15 may not display the desktop icon after installation, and may not display the user interface at runtime, but may be managed by the application management function of the operating system, such as deleting the web application association program.
  • the web application association program 15 generated by the web application registration module 121 should include an AndroidManifest.xml declaration file, and declare a broadcast receiver containing parameters such as a service category and a data type supported by the web application of the service provider. , for example ⁇ below:
  • the web application association program of the above broadcast receiver responds to the service discovery request of the native application of the requester playing the mpeg format music, and after the web application association program is triggered, the web application association program may be sent to the corresponding web application as follows: Data:
  • Intent intent new Intent(Intent.ACTION_VIEW, uri);
  • the storage identifier of the data object such as a contact name
  • the web application webpage may pass the Device API of HTML5. Or the File API to obtain specific data content.
  • the advantage of this embodiment is that dynamic modification of the browser registration information in the operating system is not required, and the change of the operating system function can be simplified.
  • the present invention provides a terminal, comprising the operating system of any of the above, and the browser, the operating system and the browser communication of any of the above.
  • FIG. 11 and FIG. 12 respectively show a schematic structural diagram of a terminal, and the terminals in FIG. 12 and FIG. 12 each include: a browser 11, an operating system 12, and a requestor native application 13 connected to the operating system 12,
  • the servant native application 14; the requestor native application 13 and the servant native application 14 in this embodiment are both applications registered in the operating system.
  • FIG. 11 further includes a web application association program 15 registered in the operating system, where the web application association program and the native application registered in the operating system (requester native application, service party native) Application) is consistent.
  • the registration information of the servant web application in the operating system is carried in the registration information of the browser.
  • the above terminal can achieve the purpose of the Native application calling the Web application.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the above method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

The present invention provides an application invocation method, an operating system and a browser, wherein, the method comprises: an operating system receiving a service discovery request sent from a requester native application, searching, according to the service discovery request, for a server native application and a server Web application that can process the service discovery request, and presenting the searched server native application and server Web application; when it is determined that the application selected by a user according to the presented server native application and server Web application is a Web application in the server Web application, sending a application invocation request to a browser, the application invocation request comprising the address of the selected Web application, so that the browser opens the server Web application corresponding to the address of the selected Web application according to the address of the selected Web application. The method is used to solve the problem that a native application cannot invoke a Web application in the existing technology.

Description

应用调用的方法及操作系统、 浏览器  Application calling method and operating system, browser
技术领域 Technical field
本发明涉及通信技术, 尤其涉及一种应用调用的方法及操作系统、 浏 览器。 背景技术  The present invention relates to communication technologies, and in particular, to a method, an operating system, and a browser for application calling. Background technique
原生应用即本地应用 (Native应用) , 指的是针对特定操作系统的开 发接口和所支持的开发语言开发的本地应用, 其中, 特定操作系统可以是 Android操作系统。 Native应用依附于操作系统的平台层, 能够提供极佳 的性能和用户体验,如可以提供优质华丽的用户界面和流畅的交互; Native 应用可以灵活调用终端设备能力和访问本地资源, 因此可以实现更为复杂 的应用功能; 由于 Native应用程序本身和运行数据大部分在本地, 因此可 以方便地支持在线和离线功能, 节省流量。  The native application is the native application (Native application), which refers to the local application developed for the development interface of the specific operating system and the supported development language. The specific operating system can be the Android operating system. Native applications are attached to the platform layer of the operating system, providing excellent performance and user experience, such as providing a high-quality and gorgeous user interface and smooth interaction. Native applications can flexibly invoke terminal device capabilities and access local resources, thus enabling more For complex application functions; since the Native application itself and the running data are mostly local, it is easy to support online and offline functions, saving traffic.
然而, Native应用存在如下缺点: 不同平台的开发标准和接口不同, 需要针对具体平台进行开发, Native应用的平台移植和多个平台版本的维 护需要花费大量的人力和时间成本; 不同平台的功能和实现方式迥异, 在 不同平台中的用户体验可能存在差异; 功能升级可导致频繁的下载和安 装, 增加流量并影响用户体验。  However, Native applications have the following disadvantages: Different platforms have different development standards and interfaces, and need to be developed for specific platforms. Native application platform migration and maintenance of multiple platform versions require a lot of manpower and time cost; different platform functions and Implementations vary widely, and user experiences may vary across platforms; feature upgrades can result in frequent downloads and installations, increased traffic, and impact on the user experience.
Web应用是指使用浏览器 (如 IE浏览器) 支持的语言开发的、 运行 于标准浏览器和网络之上的、 为用户完成一个或多个特定功能的应用。 随 着互联网 Web技术的发展, Web应用的种类和数量越来越多。 与上述的 Native应用相比, Web应用具有如下的优点: 突出的跨平台、 跨终端和跨 浏览器特性, 一次编码到处运行, 极大地降低开发和维护成本; 运行在浏 览器中, 不需要安装客户端程序, 功能升级方便; 数据主要保存在服务器, 更为安全可靠。  A web application is an application developed in a language supported by a browser (such as Internet Explorer) that runs on a standard browser and network to perform one or more specific functions for the user. With the development of Internet Web technologies, the number and variety of Web applications are increasing. Compared with the above Native applications, Web applications have the following advantages: Outstanding cross-platform, cross-terminal and cross-browser features, one code running everywhere, greatly reducing development and maintenance costs; running in the browser, no need to install The client program is easy to upgrade; the data is mainly stored on the server, which is more secure and reliable.
但是, Web应用也存在如下缺点: 受限于浏览器和开发语言, 目前的 性能和用户体验尚有待提升; 对离线功能的支持不足, 网络中断时应用可 能无法使用; 或者对硬件资源的调用能力不足, 导致应用功能受限等。  However, web applications also have the following disadvantages: Due to browser and development language, current performance and user experience still need to be improved; insufficient support for offline functions, applications may not be available when network is interrupted; or ability to call hardware resources Insufficient, resulting in limited application functionality.
综上, Native应用和 Web应用各有优缺点, 两者都支持各自应用间的 类型丰富的数据交互, 但是目前两者不能互相兼容, 使得 Native应用无法 调用 Web应用。 发明内容 In summary, Native applications and Web applications have their own advantages and disadvantages, both of which support their respective applications. Type-rich data interaction, but the two are currently not compatible with each other, making Native applications unable to invoke web applications. Summary of the invention
有鉴于此, 本发明提供一种应用调用的方法及操作系统、 浏览器, 用于 解决现有技术中 Native应用无法调用 Web应用的问题。  In view of the above, the present invention provides a method for invoking an application, an operating system, and a browser, which are used to solve the problem that a Native application cannot invoke a Web application in the prior art.
第一方面, 本发明实施例提供一种应用调用的方法, 包括:  In a first aspect, an embodiment of the present invention provides a method for applying an application, including:
操作系统接收请求方原生应用发送的服务发现请求, 根据所述服务发 现请求查找能够处理该服务发现请求的服务方原生应用和服务方 Web 应 用, 并呈现所述查找到的服务方原生应用和服务方 Web应用;  The operating system receives the service discovery request sent by the requesting party's native application, searches for the servant native application and the servant web application capable of processing the service discovery request according to the service discovery request, and presents the found servant native application and service. Square web application;
在确定用户根据所述呈现的服务方原生应用和服务方 Web 应用所选 择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所述应用 调用请求包括所选择的 Web应用的地址, 以使所述浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应的 Λ良务方 Web应用。  When determining that the application selected by the user according to the presented servant native application and the servant web application is a servant web application, sending an application call request to the browser, where the application call request includes an address of the selected web application, The browser is configured to open the web application corresponding to the address of the selected web application according to the address of the selected web application.
结合第一方面,在第一种可能的实现方式中,所述服务发现请求包括: 服务类别;  With reference to the first aspect, in a first possible implementation manner, the service discovery request includes: a service category;
所述根据所述服务发现请求查找能够处理该服务发现请求的服务方 原生应用和服务方 Web应用, 具体包括:  The finding, by the service discovery request, the servant's native application and the servant web application that can process the service discovery request include:
根据所述服务类别查找能够处理该服务发现请求的服务方原生应用 和服务方 Web应用。  A service provider native application and a servant web application capable of processing the service discovery request are found according to the service category.
结合第一方面以及上述可能的实现方式, 在第二种可能的实现方式 中, 所述服务发现请求包括: 服务类别和数据类型;  With reference to the first aspect and the foregoing possible implementation manner, in a second possible implementation manner, the service discovery request includes: a service category and a data type;
所述根据所述服务发现请求查找能够处理该服务发现请求的服务方 原生应用和服务方 Web应用, 具体包括:  The finding, by the service discovery request, the servant's native application and the servant web application that can process the service discovery request include:
根据所述服务类别和数据类型查找能够处理该服务发现请求的服务 方原生应用和 Λ良务方 Web应用。  A service provider native application and a service web application capable of processing the service discovery request are found according to the service category and data type.
结合第一方面以及上述可能的实现方式, 在第三种可能的实现方式 中, 所述服务发现请求包括: 服务类别、 数据类型和待处理的数据;  With reference to the first aspect and the foregoing possible implementation manner, in a third possible implementation, the service discovery request includes: a service category, a data type, and data to be processed;
所述根据所述服务发现请求查找能够处理该服务发现请求的服务方 原生应用和服务方 Web应用, 具体包括: 根据所述服务类别和数据类型查找能够处理所述待处理的数据的服 务方原生应用和 Λ良务方 Web应用; The finding, by the service discovery request, the servant's native application and the servant web application that can process the service discovery request include: Finding a service provider native application and a service party web application capable of processing the to-be-processed data according to the service category and the data type;
其中, 所述应用调用请求包括所选择的 Web 应用的地址, 以使所述 浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应 的服务方 Web应用, 具体包括:  The application call request includes the address of the selected web application, so that the browser opens the servant web application corresponding to the address of the selected web application according to the address of the selected web application, and specifically includes:
所述应用调用请求包括所选择的 Web 应用的地址和所述待处理的数 据, 以使所述浏览器根据所选择的 Web应用的地址打开所选择的 Web应 用的地址对应的服务方 Web应用, 并将所述待处理的数据发送给所打开 的服务方 Web应用进行处理。  The application call request includes an address of the selected web application and the data to be processed, so that the browser opens a server web application corresponding to the address of the selected web application according to the address of the selected web application. And sending the to-be-processed data to the opened servant web application for processing.
结合第一方面以及上述可能的实现方式, 在第四种可能的实现方式 中, 所述操作系统接收请求方原生应用发送的服务发现请求之前, 应用调 用的方法进一步包括:  With reference to the first aspect and the foregoing possible implementation manner, in a fourth possible implementation manner, before the operating system receives the service discovery request sent by the requesting party's native application, the method for applying the call further includes:
所述操作系统接收所述浏览器发送的服务方 Web 应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息;  The operating system receives a registration request of a server web application sent by the browser, where the registration request includes: information of a service provider web application;
所述操作系统根据所述 Web 应用的信息编辑所述操作系统中所述浏 览器的注册信息, 以使所述服务方 Web应用能够被所述操作系统查找。  The operating system edits the registration information of the browser in the operating system according to the information of the web application, so that the server web application can be searched by the operating system.
结合第一方面以及上述可能的实现方式, 在第五种可能的实现方式 中, 所述操作系统接收请求方原生应用发送的服务发现请求之前, 应用调 用的方法进一步包括:  With reference to the first aspect and the foregoing possible implementation manner, in a fifth possible implementation manner, before the operating system receives the service discovery request sent by the requesting party's native application, the method for applying the call further includes:
所述操作系统接收所述浏览器发送的服务方 Web 应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息;  The operating system receives a registration request of a server web application sent by the browser, where the registration request includes: information of a service provider web application;
所述操作系统根据所述服务方 Web 应用的信息生成与所述服务方 Web应用对应的 Web应用关联程序的安装文件, 并执行所述安装文件, 得到在操作系统中注册的 Web应用关联程序。  The operating system generates an installation file of the web application association program corresponding to the server web application according to the information of the server web application, and executes the installation file to obtain a web application association program registered in the operating system.
结合第一方面以及上述可能的实现方式, 在第六种可能的实现方式 中, 所述根据所述服务发现请求查找能够处理该服务发现请求的服务方原 生应用和服务方 Web应用, 具体包括:  With reference to the first aspect and the foregoing possible implementation manners, in a sixth possible implementation manner, the searching for the service provider local application and the service provider web application that can process the service discovery request according to the service discovery request includes:
根据所述服务发现请求在所述操作系统中查找能够处理该服务发现 请求的服务方原生应用和所述服务方 Web应用对应的 Web应用关联程序; 其中, 呈现所查找到的服务方原生应用和服务方 Web 应用, 具体包 括: 呈现所查找到的服务方原生应用和所述服务方 Web应用对应的 Web 应用关联程序; Determining, in the operating system, a servant-original application capable of processing the service discovery request and a web application association program corresponding to the servant web application according to the service discovery request; wherein, the found servant native application and Servant web application, specific package Include: presenting the found servant native application and the web application association program corresponding to the servant web application;
其中, 在确定用户根据所述呈现的服务方原生应用和服务方 Web 应 用所选择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所 述应用调用请求包括所选择的 Web 应用的地址, 具体包括: 在确定用户 根据所述呈现的服务方原生应用和所述服务方 Web应用对应的 Web应用 关联程序所选择的应用为所述服务方 Web应用对应的 Web应用关联程序 时, 运行所述服务方 Web 应用对应的 Web 应用关联程序, 所述服务方 Web应用对应的 Web应用关联程序向浏览器发送所述应用调用请求, 所 述应用调用请求包括所述服务方 Web应用对应的 Web应用关联程序对应 的所述服务方 Web应用的地址。  Wherein, when it is determined that the user selects, according to the presented servant native application and the servant web application, the application is a servant web application, sending an application call request to the browser, where the application call request includes the selected web application The address specifically includes: when it is determined that the application selected by the user according to the presented servant native application and the web application association program corresponding to the servant web application is a web application association program corresponding to the servant web application, a web application association program corresponding to the servant web application, where the web application association program corresponding to the servant web application sends the application call request to a browser, where the application call request includes a web corresponding to the servant web application The address of the servant web application corresponding to the application association program.
结合第一方面以及上述可能的实现方式, 在第七种可能的实现方式 中,所述操作系统根据所述服务方 Web应用的信息生成与所述服务方 Web 应用对应的 Web应用关联程序的安装文件, 包括:  With reference to the first aspect and the foregoing possible implementation manner, in a seventh possible implementation manner, the operating system generates, according to the information of the service provider web application, the installation of the web application association program corresponding to the service provider web application. Documents, including:
根据所述服务方 Web应用的信息生成所述 Web应用关联程序的源文 件, 对所述源文件进行编译, 将编译后的源文件编码转换成在所述操作系 统中能够执行的字节码, 将所述字节码打包成 Web 应用关联程序的安装 文件, 执行所述安装文件, 得到在操作系统中注册的与所述服务方 Web 应用对应的 Web应用关联程序。  Generating a source file of the web application association program according to the information of the service provider web application, compiling the source file, and converting the compiled source file encoding into a bytecode executable in the operating system, The bytecode is packaged into an installation file of the web application association program, and the installation file is executed to obtain a web application association program corresponding to the service provider web application registered in the operating system.
结合第一方面以及上述可能的实现方式, 在第八种可能的实现方式 中, 所述操作系统接收请求方原生应用发送的服务发现请求之前, 进一步 包括:  With reference to the first aspect and the foregoing possible implementation manner, in an eighth possible implementation manner, before the operating system receives the service discovery request sent by the requesting party, the operating system further includes:
所述操作系统接收所述浏览器发送的服务方 Web 应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息;  The operating system receives a registration request of a server web application sent by the browser, where the registration request includes: information of a service provider web application;
所述操作系统将所述服务方 Web 应用的信息发送至网络侧服务器, 以使所述网络侧服务器根据所述服务方 Web 应用的信息生成与所述服务 方 Web应用对应的 Web应用关联程序的安装文件;  The operating system sends the information of the servant web application to the network side server, so that the network side server generates a web application association program corresponding to the servant web application according to the information of the servant web application. Installation file
所述操作系统接收所述网络侧服务器发送的所述 Web 应用关联程序 的安装文件, 执行所述 Web应用关联程序的安装文件, 得到在操作系统 中注册的 Web 应用关联程序; 或者, 所述操作系统从所述网络侧服务器 下载所述 Web应用关联程序的安装文件, 执行所述下载的 Web应用关联 程序的安装文件, 得到在操作系统中注册的 Web应用关联程序。 The operating system receives an installation file of the web application association program sent by the network side server, executes an installation file of the web application association program, and obtains a web application association program registered in an operating system; or the operation System from the network side server Downloading the installation file of the web application association program, executing the installation file of the downloaded web application association program, and obtaining a web application association program registered in the operating system.
第二方面, 本发明实施例提供一种操作系统, 包括:  In a second aspect, an embodiment of the present invention provides an operating system, including:
原生应用调用模块, 用于接收请求方原生应用发送的服务发现请求, 根据所述服务发现请求查找能够处理该服务发现请求的服务方原生应用 和服务方 Web应用, 并呈现所述查找到的服务方原生应用和服务方 Web 应用;  a native application invoking module, configured to receive a service discovery request sent by the requesting party's native application, find a service provider native application and a server web application capable of processing the service discovery request according to the service discovery request, and present the found service Fangyuan application and server web application;
在确定用户根据所述呈现的服务方原生应用和服务方 Web 应用所选 择的应用为服务方 Web应用中的 Web应用时, 向浏览器发送应用调用请 求, 所述应用调用请求包括所选择的 Web 应用的地址, 以使所述浏览器 居所选择的 Web应用的地址打开所选择的 Web应用的地址对应的 Web 应用。  When determining that the user selects the application selected by the servant native application and the servant web application as the web application in the servant web application, sending an application call request to the browser, where the application call request includes the selected web The address of the application is such that the browser selects the address of the selected web application to open the web application corresponding to the address of the selected web application.
结合第二方面,在第一种可能的实现方式中,所述服务发现请求包括: 服务类别和数据类型时, 所述原生应用调用模块具体用于  With reference to the second aspect, in a first possible implementation, when the service discovery request includes: a service category and a data type, the native application calling module is specifically used to
根据所述服务类别和数据类型查找能够处理该服务发现请求的服务 方原生应用和 Λ良务方 Web应用。  A service provider native application and a service web application capable of processing the service discovery request are found according to the service category and data type.
结合第二方面及上述可能的实现方式中, 在第二种可能的实现方式 中, 操作系统进一步包括:  In combination with the second aspect and the foregoing possible implementation manner, in a second possible implementation manner, the operating system further includes:
Web应用注册模块, 用于接收所述浏览器发送的服务方 Web应用的 注册请求, 所述注册请求包括: 服务方 Web应用的信息;  a web application registration module, configured to receive a registration request of a servant web application sent by the browser, where the registration request includes: information of a servant web application;
根据所述服务方 Web应用的信息编辑操作系统中所述浏览器的注册 信息, 以使所述服务方 Web应用能够被所述操作系统查找。  Editing the registration information of the browser in the operating system according to the information of the servant web application to enable the servant web application to be searched by the operating system.
结合第二方面及上述可能的实现方式中, 在第三种可能的实现方式 中, 操作系统进一步包括:  In combination with the second aspect and the foregoing possible implementation manners, in a third possible implementation manner, the operating system further includes:
Web应用注册模块, 用于接收所述浏览器发送的服务方 Web应用的 注册请求, 所述注册请求包括: 服务方 Web应用的信息;  a web application registration module, configured to receive a registration request of a servant web application sent by the browser, where the registration request includes: information of a servant web application;
根据所述服务方 Web应用的信息生成与所述服务方 Web应用对应的 Generating a corresponding to the server web application according to the information of the server web application
Web应用程序的安装文件, 并执行所述安装文件, 得到服务方 Web应用 在操作系统中注册的 Web应用关联程序。 The installation file of the web application, and executing the installation file, obtains the web application association program registered by the service provider web application in the operating system.
第三方面, 本发明实施例提供一种浏览器, 包括: Web应用调用模块,用于在用户根据呈现的服务方原生应用和服务方 Web应用所选择的应用为服务方 Web应用中的 Web应用以处理请求方原 生应用发送的服务发现请求时, 接收操作系统发送的应用调用请求, 所述 应用调用请求包括: 所选择的 Web应用的地址; In a third aspect, an embodiment of the present invention provides a browser, including: a web application calling module, configured to receive an operating system when the user selects, according to the presented servant native application and the servant web application, the web application in the servant web application to process the service discovery request sent by the requestor native application Sending an application call request, where the application call request includes: an address of the selected web application;
居所选择的 Web应用的地址打开所选择的 Web应用的地址对应的 服务方 Web应用。  The address of the web application selected by the residence opens the service web application corresponding to the address of the selected web application.
结合第三方面, 在第一种可能的实现方式中, 浏览器还包括: Web应 用安装模块, 用于向操作系统发送服务方 Web 应用的注册请求, 所述注 册请求包括: 服务方 Web 应用的信息, 以使所述操作系统根据所述服务 方 Web 应用的信息编辑所述操作系统中的所述浏览器的注册信息, 或者 根据所述 Web应用信息生成能够安装于所述操作系统中的 Web应用关联 程序。  In conjunction with the third aspect, in a first possible implementation, the browser further includes: a web application installation module, configured to send a registration request of the servant web application to the operating system, where the registration request includes: the servant web application The information, so that the operating system edits the registration information of the browser in the operating system according to the information of the service provider web application, or generates a web that can be installed in the operating system according to the web application information. Apply the associated program.
第四方面, 本发明实施例提供的终端, 包括, 上述任一所述的操作系 统和任一所述的浏览器, 所述操作系统和所述浏览器通信。  According to a fourth aspect, the terminal provided by the embodiment of the present invention includes the operating system of any of the foregoing, and any one of the browsers, wherein the operating system communicates with the browser.
由上述技术方案可知,本发明的应用调用的方法及操作系统、浏览器, 通过操作系统接收请求方原生应用发送的服务发现请求, 进而查找能够处 理服务发现请求的服务方原生应用和服务方 Web 应用, 并呈现所述查找 到的服务方原生应用和服务方 Web 应用, 在确定用户根据所述呈现的服 务方原生应用和 Λ良务方 Web应用所选择的应用为 Λ良务方 Web应用时, 向 浏览器发送包括所选择的 Web 应用的地址的应用调用请求, 以使所述浏 览器 居所选择的 Web应用的地址打开所选择的 Web应用的地址对应的 服务方 Web应用, 从而可以实现请求方的原生应用即 Native应用对 Web 应用的调用。 附图说明 为了更清楚地说明本发明的技术方案, 下面将对实施例中所需要使用的 附图作一简单地介绍, 显而易见地: 下面附图只是本发明的一些实施例的附 图, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可 以根据这些附图获得同样能实现本发明技术方案的其它附图。  According to the above technical solution, the application calling method, the operating system, and the browser of the present invention receive the service discovery request sent by the requesting party's native application through the operating system, and then search for the service provider's native application and the server Web that can process the service discovery request. Applying, and presenting the found servant native application and the servant web application, when determining that the user selects the application selected according to the presented servant native application and the Λ 务 web application as the Λ 务 Web web application Sending an application call request including an address of the selected web application to the browser, so that the browser selects an address of the selected web application to open a service web application corresponding to the address of the selected web application, so that the request can be implemented The native application of the party is the call of the Native application to the web application. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solution of the present invention, a brief description of the drawings to be used in the embodiments will be briefly described below. It is obvious that the following drawings are only drawings of some embodiments of the present invention, Those skilled in the art can obtain other drawings which can also implement the technical solutions of the present invention according to the drawings without any creative labor.
图 1为本发明一实施例提供的通信系统的结构示意图; 图 2A为本发明一实施例提供的应用调用的方法的流程示意图; 图 2B为本发明另一实施例提供的应用调用的方法的流程示意图; 图 2C为本发明另一实施例提供的应用调用的方法的流程示意图; 图 3为本发明另一实施例提供的应用调用的方法的流程示意图; 图 4为本发明另一实施例提供的应用调用的方法的流程示意图; 图 5为本发明另一实施例提供的应用调用的方法的流程示意图; 图 6为本发明另一实施例提供的应用调用的方法的流程示意图; 图 7为本发明另一实施例提供的操作系统的结构示意图; FIG. 1 is a schematic structural diagram of a communication system according to an embodiment of the present invention; 2A is a schematic flowchart of a method for calling an application according to an embodiment of the present invention; FIG. 2B is a schematic flowchart of a method for calling an application according to another embodiment of the present invention; FIG. 2C is a schematic diagram of an application according to another embodiment of the present invention; FIG. 3 is a schematic flowchart of a method for calling an application according to another embodiment of the present invention; FIG. 4 is a schematic flowchart of a method for calling an application according to another embodiment of the present invention; FIG. 6 is a schematic flowchart of a method for invoking an application according to another embodiment of the present invention; FIG. 7 is a schematic structural diagram of an operating system according to another embodiment of the present invention;
图 8为本发明另一实施例提供的操作系统的结构示意图;  FIG. 8 is a schematic structural diagram of an operating system according to another embodiment of the present disclosure;
图 9为本发明另一实施例提供的浏览器的结构示意图;  FIG. 9 is a schematic structural diagram of a browser according to another embodiment of the present disclosure;
图 10为本发明另一实施例提供的浏览器的结构示意图;  FIG. 10 is a schematic structural diagram of a browser according to another embodiment of the present disclosure;
图 11为本发明另一实施例提供的终端的结构示意图;  FIG. 11 is a schematic structural diagram of a terminal according to another embodiment of the present disclosure;
图 12为本发明另一实施例提供的终端的结构示意图。 具体实施方式  FIG. 12 is a schematic structural diagram of a terminal according to another embodiment of the present invention. detailed description
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合本发明实 施例中的附图, 对本发明的技术方案进行清楚、 完整地描述。 显然, 下述 的各个实施例都只是本发明一部分的实施例。 基于本发明下述的各个实施 例, 本领域普通技术人员即使没有作出创造性劳动, 也可以通过等效变换 部分甚至全部的技术特征, 而获得能够解决本发明技术问题, 实现本发明 技术效果的其它实施例, 而这些变换而来的各个实施例显然并不脱离本发 明所公开的范围。  The technical solutions of the present invention will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the various embodiments described below are merely exemplary embodiments of the invention. Based on the following various embodiments of the present invention, those skilled in the art can obtain other technical features that can solve the technical problems of the present invention and achieve the technical effects of the present invention by equivalently transforming some or even all of the technical features without creative work. The various embodiments of the invention are apparent from the scope of the invention as disclosed.
当前, Android应用 (安卓应用) 主要包括四种类型的组件: Activity 组件 (活动组件) 、 Broadcast组件 (广播组件) 、 Service组件 (月良务组 件) 、 Content Provider组件(内容提供方组件 ) ; 这些组件自身具有独立 性, 组件和组件之间可以互相调用, 协调工作, 最终组成完整的 Android 应用。 Android应用的组件和组件之间的通信主要是通过 Android Intents (安卓 "意图" )完成, Android Intents提供了一种在相同或不同 Android 应用的各类组件代码之间进行晚绑定 ( Late Binding ) 的机制。  Currently, Android applications (Android applications) mainly include four types of components: Activity component (active component), Broadcast component (broadcast component), Service component (monthly component), Content Provider component (content provider component); The components themselves are independent, and components and components can call each other, coordinate work, and ultimately form a complete Android application. Communication between components and components of Android applications is primarily done through Android Intents, which provide late binding between various component codes of the same or different Android applications. Mechanisms.
Android Intents是一消息对象, 通过该消息对象对 Android应用的一 次操作的动作和一次操作的动作涉及的数据等进行描述, Android操作系 统将根据此消息对象的属性信息, 找到该消息对象并将该消息对象传递给 能够对该消息对象进行处理的一个或多个 Android 应用组件, 以完成 Android应用组件的调用。 Android Intents is a message object, through which the message object is applied to the Android app. The operation of the secondary operation and the data related to the action of one operation are described. The Android operating system finds the message object according to the attribute information of the message object and delivers the message object to one or more capable of processing the message object. Android application components to complete the call of Android application components.
因此, Android Intents实际起着通信中介的作用, 专门提供组件互相 调用的相关信息, 实现调用方与被调用方之间的解耦。  Therefore, Android Intents actually acts as a communication intermediary, providing information about the components calling each other, and decoupling between the caller and the callee.
针对 Android 应用, 在应用开发过程中, 可以通过如下方式传递 Android Intents和调用不同类型的 Android应用组件。  For Android applications, during the application development process, Android Intents can be passed and different types of Android application components can be called.
具 体 地 , 可 以 通 过 Content. startActivity() 方 法 或 Activity. startActivityForResult()方法向 Android 操作系统抛出 Android Intents, 以触发运行 Android应用组件或调用已在运行的 Android应用组 件。  Specifically, Android Intents can be thrown to the Android operating system via the Content. startActivity() method or the Activity. startActivityForResult() method to trigger the running of Android application components or to call an already running Android application component.
特另' J地, ¾。果通过 Activity.startActivityForResult()方法启动 Activity 组件, 可以在启动的 Activity组件中通过调用 Activity. setResult()方法设置 结果参数, 该结果参数可以在触发方 Activity中通过 onActivityResult()方 法接收。  Special 'J ground, 3⁄4. If the Activity component is started by the Activity.startActivityForResult() method, the result parameter can be set in the Activity component of the startup by calling the Activity.setResult() method. The result parameter can be received by the onActivityResult() method in the trigger activity.
通过 Context.startService()方法可以启动一个 Service组件或者向运行 中的 Service组件传递新的指令。 还可以通过 Context.bindService()方法绑 定一个 Service组件,以在调用组件和目标 Service组件之间建立一个连接。  A Service component can be started or passed to the running Service component via the Context.startService() method. You can also bind a Service component through the Context.bindService() method to establish a connection between the calling component and the target Service component.
通过 Context. sendBroadcast()方法、 Context. sendOrderedBroadcast ()方 法和 Context. sendStickyBroadcast()方法中的任何一种抛出的 Android Intents广播, 将会被所有注册了相应 Android Intents的广播接收器的应用 接收。  Android Intents broadcasts thrown by any of the Context.sendBroadcast() method, Context.sendOrderedBroadcast() method, and Context.sendStickyBroadcast() method will be received by all applications that have registered broadcast receivers for the corresponding Android Intents.
Web Intents提供了一种客户端侧的 Web应用集成的机制, 支持 Web 应用之间进行类型复杂的数据 (如二进制文件 )交互。 Web Intents的整个 生命周期包括注册、 调用、 选择、 提交和响应五个阶段, 各步骤异步执行, 响应结果通过异步回调获取。 Web应用可以按如下方式注册 Web Intents: <intent  Web Intents provides a client-side web application integration mechanism that enables web applications to interact with complex types of data, such as binary files. The entire life cycle of Web Intents includes five phases of registration, invocation, selection, submission, and response. Each step is executed asynchronously, and the response result is obtained through asynchronous callback. Web applications can register for Web Intents as follows: <intent
action= " http:〃 web intents . org/share "  Action= " http:〃 web intents . org/share "
type="text/uri-list" href=" share, html" Type="text/uri-list" Href=" share, html"
disposition="window|inline"  Disposition="window|inline"
/>  />
其中, "action"表明该 Web应用的处理行为类型, 目前定义的标准动 作包括 Discover (发现 ) 、 Share (分享 ) 、 Edit (编辑) 、 View (查找 ) 、 Pick (选择) 、 Subscribe (订阅)和 Save (保存) 等, 用户也可以自定义 Web Intent的行为; "type"表明 Web应用支持处理的数据类型; "href,用来 指定" action"网页的具体位置, 以允许同一服务提供方提供多个 Web应用 月良务; "disposition"用于指定 Web应用的调用方式。  The "action" indicates the type of processing behavior of the web application. The currently defined standard actions include Discover, Share, Edit, View, Pick, Subscribe, and Save, etc., the user can also customize the behavior of the Web Intent; "type" indicates the type of data the web application supports; "href, which specifies the specific location of the "action" page to allow the same service provider to provide more Web application month service; "disposition" is used to specify how the web application is called.
在网页中, 可以通过如下方法调用注册了上述 Web Intents的 Web应 用:  In the web page, you can call the web application that registered the above Web Intents by the following method:
var intent = new Intent( " htt : //web intents . or g/share " ,  Var intent = new Intent( " htt : //web intents . or g/share " ,
"text/uri-list",  "text/uri-list",
"http://news.bbc.co.uk");  "http://news.bbc.co.uk");
window. navigator. startActivity(intent);  Window. navigator. startActivity(intent);
调用方网页通过 start Activity()方法将 Web Intents对象通过浏览器传 递给上述 Web 应用, Web 应用可以通过调用对象的 postResult()和 postFailure()方法写入处理结果, 调用方网页则可通过 onSuccess()和 onFailureO回调函数获取 Web应用的响应。  The caller web page passes the Web Intents object to the web application through the browser through the start Activity() method. The web application can write the processing result by calling the object's postResult() and postFailure() methods, and the caller web page can pass onSuccess( And the onFailureO callback function to get the response of the web application.
本发明实施例可通过提供 Native应用和 Web应用相互通信的机制, 使得 Native应用能够发现和调用 Web应用, 使得用户在使用 Native应用 的过程中, 可以通过所使用 Native应用调用 Web应用的方式, 获得所使 用的 Native应用不具备的功能。  The embodiment of the present invention can provide a mechanism for the Native application to communicate with the Web application, so that the Native application can discover and invoke the Web application, so that the user can obtain the Web application by using the Native application during the process of using the Native application. The features that are not available in the Native app.
例如: 某 Native应用具备图像浏览功能但不具备图像编辑功能, 如果 用户在使用上述 Native应用的过程中需要对图片进行处理,则可以通过点 击上述 Native应用提供的按钮触发服务发现过程,查找并选择适合的服务 方 Web应用对图片进行处理, 并从所选择的服务方 Web应用获取编辑后 的图片。通过本发明实施例提供的通信机制,用户可以通过所使用的 Native 应用, 不仅可以调用其它 Native应用, 还可以调用服务方 Web应用对各 类的需求进行处理, 通过所使用的 Native应用来调用服务方 Web应用的 这种方式可以充分利用网络中种类繁多、 功能丰富的 Web 应用, 开发者 在开发上述用户所使用的 Native应用时, 也可以聚焦 Native应用自身的 核心功能开发, 而通过调用其它 Native应用和服务方 Web应用的方式获 取其它应用功能, 以降低开发的工作量和缩短开发周期。 在本发明实施例 中, 原生应用指的是针对终端的操作系统的开发接口和开发语言开发的本 地应用, 一般安装在终端的操作系统中, 安装的原生应用需要在操作系统 中注册所提供的服务类别和支持处理的数据类型等信息, 每个原生应用支 持的服务类别和数据类型可能有多种, 其中,服务类别可以是分享、查看、 编辑、发送和拨号等,数据类型可以是任意的 MIME, Multipurpose Internet Mail Extensions多用途互联网邮件扩展文件类型。 For example: A Native application has image browsing but does not have image editing function. If the user needs to process the image during the process of using the above Native application, the service discovery process can be triggered by clicking the button provided by the Native application to find and select. A suitable servant web application processes the image and obtains the edited image from the selected servant web application. Through the communication mechanism provided by the embodiment of the present invention, the user can use the Native application to not only call other Native applications, but also call the service provider web application to process various types of requirements, and invoke the service through the Native application used. Square web application This approach can make full use of the wide variety of feature-rich Web applications in the network. Developers can also focus on the development of the core functions of the Native application when developing the Native applications used by the above users, by calling other Native applications and services. The way Web applications access other application functions to reduce development effort and shorten development cycles. In the embodiment of the present invention, the native application refers to a development interface for the operating system of the terminal and a local application developed by the development language, and is generally installed in the operating system of the terminal, and the installed native application needs to be registered in the operating system. Information such as service categories and data types that support processing. There may be multiple service categories and data types supported by each native application. The service categories can be shared, viewed, edited, sent, and dialed. The data type can be arbitrary. MIME, Multipurpose Internet Mail Extensions Multipurpose Internet Mail Extensions file type.
特别地, 操作系统中可以安装多个原生应用, 以供用户使用。 浏览器 属于原生应用中的一种。  In particular, multiple native applications can be installed in the operating system for the user to use. Browser is one of the native apps.
服务方 Web应用可以是任意的提供特定信息或服务的网站;  The service provider web application can be any website that provides specific information or services;
当前的终端包括:操作系统和浏览器,浏览器一般安装在操作系统中, 通过浏览器可以发现和调用 Web 应用; 操作系统一般运行于终端上, 终 端和网站通过网络相连。  The current terminal includes an operating system and a browser. The browser is generally installed in the operating system, and the web application can be discovered and invoked through the browser. The operating system generally runs on the terminal, and the terminal and the website are connected through the network.
图 1示出了本发明一实施例提供的通信系统的结构示意图, 如图 1所 示, 本实施例中的通信系统包括终端和服务器, 终端通过通信网络与网络 侧的服务器进行通信。 其中, 图 1中的终端可包括浏览器和操作系统, 以 及连接操作系统的请求方原生应用和服务方原生应用。 另外, 终端还包括 图 1中未示出的处理器, 该处理器连接浏览器和操作系统。 该处的浏览器 和操作系统均运行于处理器中。  1 is a schematic structural diagram of a communication system according to an embodiment of the present invention. As shown in FIG. 1, the communication system in this embodiment includes a terminal and a server, and the terminal communicates with a server on the network side through a communication network. The terminal in FIG. 1 may include a browser and an operating system, and a requestor native application and a servant native application connected to the operating system. In addition, the terminal further includes a processor not shown in Fig. 1, which is connected to the browser and the operating system. Both the browser and the operating system are running on the processor.
图 1 中的服务器包括服务方 Web应用, 上述的通信网络可以是有线 通信网络, 也可以是无线通信网络。 图 1中网络侧仅示出一个服务器, 在 实际应用中, 网络侧可以包括多个独立的服务器, 这些服务器中均包括多 个月良务方 Web应用。  The server in Fig. 1 includes a server web application, and the above communication network may be a wired communication network or a wireless communication network. In Figure 1, only one server is shown on the network side. In practical applications, the network side may include multiple independent servers, all of which include multi-month server applications.
在本实施例中终端可以通过通信网络调用服务方 Web 应用处理终端 内请求方原生应用的服务发现请求,进而解决了现有技术中 Native应用无 法调用 Web应用的问题, 使得用户在使用 Native应用的过程中, 可以通 过所使用 Native应用调用 Web应用的方式, 获得所使用的 Native应用不 具备的功能。 In this embodiment, the terminal can invoke the service discovery request of the requesting party's native application in the service provider web application processing terminal through the communication network, thereby solving the problem that the native application cannot invoke the web application in the prior art, so that the user is using the Native application. In the process, the Native application can be obtained by using the Native application to obtain the Native application. Features available.
图 2A示出了本发明一实施例提供的应用调用的方法的流程示意图; 结合图 1和图 2A所示, 本实施例中的应用调用的方法如下文所述。  FIG. 2A is a schematic flowchart of a method for calling an application according to an embodiment of the present invention. As shown in FIG. 1 and FIG. 2A, the method for calling an application in this embodiment is as follows.
201、 操作系统接收请求方原生应用 (即 Native应用)发送的服务发 现请求, 根据服务发现请求查找能够处理该服务发现请求的服务方原生应 用和服务方 Web应用 ,并呈现所述查找到的服务方原生应用和服务方 Web 应用。  201. The operating system receives a service discovery request sent by a requesting party's native application (ie, a Native application), and searches for a service-side native application and a server-side web application capable of processing the service discovery request according to the service discovery request, and presents the found service. Fang native application and server web application.
202、 在确定用户根据呈现的服务方原生应用和服务方 Web应用所选 择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所述应用 调用请求包括所选择的 Web应用的地址, 以使浏览器根据所选择的 Web 应用的地址打开所选择的 Web应用的地址对应的 Λ良务方 Web应用。  202. When determining that the user selects, according to the presented servant native application and the servant web application, the application as the servant web application, sending an application call request to the browser, where the application call request includes an address of the selected web application, In order for the browser to open the web application corresponding to the address of the selected web application according to the address of the selected web application.
由上述实施例可知, 本实施例的应用调用的方法, 解决了现有技术中 Native应用无法调用 Web应用的问题。  It can be seen from the foregoing embodiment that the method invoked by the application in this embodiment solves the problem that the Native application cannot invoke the Web application in the prior art.
举例来说, 当前的 Android操作系统中, 一种可选的应用场景为, 步 骤 201中的服务发现请求可包括: 服务类别, 相应地, 步骤 201可为如下 的图中未示出的步骤 20Γ :  For example, in the current Android operating system, an optional application scenario is that the service discovery request in step 201 may include: a service category, and correspondingly, step 201 may be a step 20 not shown in the following figure. :
操作系统接收请求方原生应用发送的服务发现请求, 服务发现请求包 括: 服务类别, 根据所述服务类别查找能够处理该服务发现请求的服务方 原生应用和服务方 Web 应用, 并呈现所述查找到的服务方原生应用和服 务方 Web应用。  The operating system receives the service discovery request sent by the requesting party's native application, and the service discovery request includes: a service category, searching for a service provider native application and a server web application capable of processing the service discovery request according to the service category, and presenting the finding The servant native application and the servant web application.
另一种可选的应用场景为: 上述步骤 201中的服务发现请求可包括: 服务类别和数据类型, 此时步骤 201可为如下的 201" (图中未示出) : Another optional application scenario is as follows: The service discovery request in the foregoing step 201 may include: a service category and a data type, and the step 201 may be the following 201" (not shown):
201"、 操作系统接收请求方原生应用发送的服务发现请求, 所述服务 发现请求包括: 服务类别和数据类型; 根据服务类别和数据类型查找能够 处理该服务发现请求的服务方原生应用和服务方 Web 应用, 并呈现所述 查找到的服务方原生应用和服务方 Web应用。 201", the operating system receives a service discovery request sent by the requesting party's native application, the service discovery request includes: a service category and a data type; and a service provider native application and a service party capable of processing the service discovery request according to the service category and the data type a web application, and presenting the found servant native application and servant web application.
在第三种可选的应用场景中,上述步骤 201,中的服务发现请求也可进 一步包括: 待处理的数据, 此时, 所述步骤 202可具体包括:  In the third optional application scenario, the service discovery request in the foregoing step 201 may further include: data to be processed. In this case, the step 202 may specifically include:
在确定用户根据呈现的服务方原生应用和服务方 Web 应用所选择的 应用为服务方 Web应用时, 向浏览器发送应用调用请求, 所述应用调用 请求包括所选择的 Web 应用的地址和所述待处理的数据, 以使浏览器根 据所选择的 Web应用的地址打开所选择的 Web应用的地址对应的 Λ良务方 Web应用, 并将所述待处理的数据发送给所打开的服务方 Web应用进行 处理。 When it is determined that the user selects the application selected by the servant native application and the servant web application as the servant web application, sending an application call request to the browser, where the application invokes The request includes the address of the selected web application and the data to be processed, so that the browser opens the web application corresponding to the address of the selected web application according to the address of the selected web application, and the The data to be processed is sent to the opened servant web application for processing.
本实施例中的应用调用的方法,实现了原生应用和 W eb应用之间的通 信, 当操作系统接收到请求方原生应用发出的服务发现请求后, 操作系统 在服务发现的过程中, 不仅可以找出满足请求方原生应用的服务发现请求 的服务方原生应用, 还可以找出能够处理请求方原生应用的服务发现请求 的服务方 Web应用, 让用户可以有更多的应用选择。  The method invoked by the application in this embodiment implements communication between the native application and the Web application. When the operating system receives the service discovery request sent by the requesting party's native application, the operating system may not only be in the process of service discovery. The servant native application that finds the service discovery request that satisfies the requestor's native application can also find the servant web application that can process the service discovery request of the requestor's native application, so that the user can have more application choices.
当然, 在另一优选实施例中, 上述步骤 201中的服务发现请求还可包 括: 服务类别、 数据类型和待处理的数据, 此时, 如图 2B所示, 上述的 步骤 201可为如下的步骤 201a:  Of course, in another preferred embodiment, the service discovery request in the foregoing step 201 may further include: a service category, a data type, and data to be processed. In this case, as shown in FIG. 2B, the foregoing step 201 may be as follows. Step 201a:
201a, 操作系统接收请求方原生应用发送的服务发现请求, 所述服务 发现请求包括: 服务类别、 数据类型和待处理的数据, 根据服务类别和数 据类型查找能够处理所述待处理的数据的服务方原生应用和服务方 Web 应用, 并呈现所述查找到的服务方原生应用和服务方 Web应用。  201a. The operating system receives a service discovery request sent by the requesting party's native application, where the service discovery request includes: a service category, a data type, and data to be processed, and searches for a service capable of processing the to-be-processed data according to the service category and the data type. The native application and the servant web application, and present the found servant native application and servant web application.
相应地, 上述的步骤 202可为如下步骤 202a:  Correspondingly, the foregoing step 202 may be as follows: Step 202a:
202a,在确定用户根据所述呈现的服务方原生应用和服务方 Web应用 所选择的应用为服务方 Web应用时, 向浏览器发送应用调用请求, 应用 调用请求包括选择的 Web 应用的地址和待处理的数据, 以使浏览器根据 所选择的 Web 应用的地址打开所选择的 Web 应用的地址对应的 Λ良务方 Web应用, 并将所述待处理的数据发送给所述打开的服务方 Web应用进 行处理。  202a. When it is determined that the user selects, according to the presented servant native application and the servant web application, the application is a servant web application, sending an application call request to the browser, where the application call request includes the address and the to-be of the selected web application. Processing the data, so that the browser opens the web application corresponding to the address of the selected web application according to the address of the selected web application, and sends the to-be-processed data to the open server web The application processes.
在本实施例中, 上述的服务类别可以包括: 分享、 查看和编辑等。 数 据类型可为任意的 MIME多媒体文件类型。  In this embodiment, the foregoing service categories may include: sharing, viewing, editing, and the like. The data type can be any MIME multimedia file type.
当然, 在其他实施例中, 服务发现请求还可以包括: 服务类别、 数据 类型和待处理的数据存储标识等。 此时, 待处理的数据存储标识对应的数 据可以是复杂数据, 如二进制文件, 图片等。  Of course, in other embodiments, the service discovery request may further include: a service category, a data type, a data storage identifier to be processed, and the like. At this time, the data corresponding to the data storage identifier to be processed may be complex data such as a binary file, a picture, and the like.
在上述步骤 202或者 202a中, 若用户选择的应用是服务方原生应用 , 则釆用现有的方式进行处理, 如可直接打开所选择的服务方原生应用, 进 理。 In the above step 202 or 202a, if the application selected by the user is the service provider's native application, the existing method is used for processing, for example, the selected service party's native application can be directly opened, and Reason.
可以理解的是, 在步骤 202a 中, 如果用户选择的是在操作系统中注 册的服务方 Web应用, 则操作系统将服务方 Web应用的地址和需要处理 的数据发送给浏览器, 浏览器根据上述服务方 Web 应用的地址打开对应 的服务方 Web应用, 并将上述待处理的数据发送给服务方 Web应用。 举 例来说, 请求方原生应用可以将待处理的数据发送至操作系统, 操作系统 将待处理的数据发送至浏览器, 以使浏览器将待处理的数据发送至用户选 择的在操作系统中注册的服务方 Web 应用, 进而可以使得打开的服务方 Web应用进行处理。  It can be understood that, in step 202a, if the user selects the servant web application registered in the operating system, the operating system sends the address of the servant web application and the data to be processed to the browser, and the browser according to the above The address of the servant web application opens the corresponding servant web application, and sends the above-mentioned pending data to the servant web application. For example, the requesting party's native application can send the data to be processed to the operating system, and the operating system sends the data to be processed to the browser, so that the browser sends the data to be processed to the user-selected registration in the operating system. The servant web application, which in turn enables the open servant web application to process.
以 Android系统为例, 通过操作系统, 请求方原生应用可以使用如下 方法向浏览器发送数据:  Taking the Android system as an example, through the operating system, the requesting native application can send data to the browser using the following methods:
Intent intent = new Intent(this, dest.calss);  Intent intent = new Intent(this, dest.calss);
intent.putExtra(payload);  intent.putExtra(payload);
startActivityFor esult(intent, equestCode);  startActivityFor esult(intent, equestCode);
并通过 onActivityResult(int requestCode, int resultCode, Intent data)回 调函数接收服务方 Web应用的响应, 处理结果数据包含在 data对象中。  The response of the service provider web application is received by the onActivityResult(int requestCode, int resultCode, Intent data) callback function, and the processing result data is included in the data object.
在实际应用中, 如图 2C所示, 上述的应用调用方法还包括如下的步 骤 203。  In an actual application, as shown in FIG. 2C, the foregoing application calling method further includes the following step 203.
203、 操作系统接收浏览器发送的服务方 Web应用的处理结果, 并将 所述处理结果发送给所述请求方原生应用。  203. The operating system receives a processing result of the server web application sent by the browser, and sends the processing result to the requesting party native application.
需要说明的是, 上述的图 2A和图 2B均可包括该处的步骤 203 , 本实 施例仅为举例说明。 当然, 任一实施例中釆用服务方 Web 应用进行相关 数据的处理之后, 均需接收浏览器发送的服务方 Web应用的处理结果。  It should be noted that the above-mentioned FIG. 2A and FIG. 2B can each include the step 203 at this point, and the embodiment is merely an example. Of course, in any of the embodiments, after processing the related data by the server web application, the processing result of the web application sent by the browser is received.
在具体实施过程中, 在浏览器中打开的服务方 Web 应用处理完成之 后, 浏览器则可以通过如下方法将处理结果返回:  In the specific implementation process, after the processing of the servant web application opened in the browser is completed, the browser can return the processing result by the following method:
Intent data = new Intent();  Intent data = new Intent();
data.putExtra(payload);  data.putExtra(payload);
set esult( esultCode, data);  Set esult( esultCode, data);
本实施例中的应用调用的方法,实现了原生应用和 Web应用之间的通 信, 当操作系统接收到请求方原生应用发出的服务发现请求后, 操作系统 在服务发现的过程中, 不仅可以找出满足请求方原生应用的服务发现请求 的服务方原生应用, 还可以找出能够处理请求方原生应用的服务发现请求 的服务方 Web应用, 让用户可以有更多的应用选择。 The method invoked by the application in this embodiment implements the communication between the native application and the web application. After the operating system receives the service discovery request from the requesting party's native application, the operating system can not only find the service provider's native application that satisfies the service discovery request of the requesting party's native application, but also find out the service discovery process. A servant web application that can handle the service discovery request of the requestor's native application, allowing the user to have more application choices.
进一步地, 原生应用开发者可以通过灵活调用已安装的原生应用或网 络上已存在的服务方 Web 应用实现丰富的功能, 从而降低开发者的工作 量, 缩短开发周期。  Further, native application developers can implement rich functionality by flexibly calling installed native applications or existing servant Web applications on the network, thereby reducing developer workload and shortening development cycles.
图 3示出了本发明一实施例提供的应用调用方法的流程示意图, 如图 3所示, 本发明实施例中的应用调用方法如下所述。  FIG. 3 is a schematic flowchart of an application calling method according to an embodiment of the present invention. As shown in FIG. 3, the application calling method in the embodiment of the present invention is as follows.
301、 操作系统接收浏览器发送的服务方 Web应用的注册请求, 所述 注册请求包括: 服务方 Web应用的信息。  301. The operating system receives a registration request of a service provider web application sent by a browser, where the registration request includes: information of a service provider web application.
举例来说, 服务方 Web应用信息包括: 服务方 Web应用的地址; 或 者, 服务方 Web应用的信息包括: 服务方 Web应用的地址, 以及还包括 如下信息中的一种或多种: 服务方 Web应用的服务类别、 服务方 Web应 用所处理的数据类型、 服务方 Web应用的名称和服务方 Web应用的图标 等。  For example, the service provider web application information includes: an address of the service provider web application; or, the information of the service provider web application includes: an address of the service provider web application, and further includes one or more of the following information: The service category of the web application, the type of data processed by the servant web application, the name of the servant web application, and the icon of the servant web application.
302、 操作系统根据服务方 Web应用的信息编辑操作系统中浏览器的 注册信息, 以使服务方 Web应用能够被操作系统查找。  302. The operating system edits the registration information of the browser in the operating system according to the information of the servant web application, so that the servant web application can be searched by the operating system.
举例来说, 操作系统在根据服务发现请求进行应用查找时, 如果上述 服务方 Web 应用在浏览器的注册信息中携带的服务类别和数据类型与上 述服务发现请求中的服务类型和数据类型匹配, 则可认为能够对上述服务 发现请求进行处理, 则浏览器将对上述的服务发现请求进行响应。  For example, when the operating system performs an application search according to the service discovery request, if the service category and the data type carried by the service provider web application in the browser registration information match the service type and data type in the service discovery request, Then, it can be considered that the above service discovery request can be processed, and the browser will respond to the above service discovery request.
或者, 在一种可能的实现方式中, 操作系统在根据服务发现请求进行 应用查找时, 如果上述服务方 Web 应用在浏览器的注册信息中携带的服 务类别与上述服务发现请求中的服务类别匹配, 则可认为能够对上述服务 发现请求进行处理, 则浏览器将对上述的服务发现请求进行响应。  Or, in a possible implementation manner, when the operating system performs an application search according to the service discovery request, if the service category carried by the service provider web application in the browser registration information matches the service category in the service discovery request. Then, it can be considered that the above service discovery request can be processed, and the browser will respond to the above service discovery request.
在本实施例中, 可以理解的是, 浏览器的注册信息中携带服务方 Web 应用的信息, 如服务方 Web应用地址。 在其他实施例中, 浏览器的注册 信息中还可携带服务方 Web应用的信息, 如服务方 Web应用的地址及以 下信息中的一种或多种: 服务方 Web应用的服务类别、 服务方 Web应用 处理的数据类型和服务方 W eb应用的名称等。 In this embodiment, it can be understood that the registration information of the browser carries the information of the service provider web application, such as the service provider web application address. In other embodiments, the registration information of the browser may also carry information of the service provider web application, such as one or more of the address of the service provider web application and the following information: service category of the service provider web application, service party Web application The type of data being processed and the name of the server, the name of the application, etc.
303、 操作系统接收请求方原生应用发送的服务发现请求, 根据服务 发现请求查找能够处理该服务发现请求的服务方原生应用和服务方 Web 应用, 并呈现所述查找到的服务方原生应用和服务方 Web应用。  303. The operating system receives the service discovery request sent by the requesting party's native application, searches for the servant native application and the servant web application capable of processing the service discovery request according to the service discovery request, and presents the found servant native application and service. Square web application.
需要说明的是, 由于浏览器的注册信息携带有服务方 Web 应用的信 息。 由此, 操作系统在内部包括所有原生应用的注册信息和浏览器的注册 信息的注册模块 /注册表中进行查找 ,进而可以查找能够处理该服务发现请 求的 Λ良务方原生应用和 Λ良务方 Web应用。  It should be noted that the registration information of the browser carries the information of the service web application. Thus, the operating system searches in the registration module/registry including all the registration information of the native application and the registration information of the browser, and can find the original application and the service of the service that can handle the service discovery request. Square web application.
上述步骤 303中的服务发现请求可以包括服务类别, 或者可以包括: 服务类别和数据类型, 或者可以包括: 服务类别和待处理的数据, 或者可 以包括服务类别、数据类型和待处理的数据等,本实施例不对其进行限定。  The service discovery request in the above step 303 may include a service category, or may include: a service category and a data type, or may include: a service category and data to be processed, or may include a service category, a data type, and data to be processed, and the like. This embodiment does not limit it.
进一步地, 在查找到两个或两个以上的能够处理请求方原生应用的服 务发现请求的应用时, 即查找到多个服务方原生应用和多个服务方 Web 应用时, 操作系统可以将服务方原生应用和服务方 Web应用呈现给用户 , 供用户选择。 例如, 操作系统向用户呈现一列表, 该列表中显示查找到的 服务方原生应用和服务方 Web 应用; 可选地, 列表中显示查找到的服务 方原生应用的图标和服务方 Web 应用的图标等, 本实施例不对上述列表 中显示内容进行限定。  Further, when two or more applications capable of processing the service discovery request of the requesting party's native application are found, that is, when multiple servant native applications and multiple servant web applications are found, the operating system may serve The party's native application and server web application are presented to the user for user selection. For example, the operating system presents a list to the user, where the found servant native application and the servant web application are displayed; optionally, the icon of the found servant native application and the icon of the servant web application are displayed in the list Etc., this embodiment does not limit the content displayed in the above list.
304、 在确定用户根据所述呈现的服务方原生应用和服务方 Web应用 所选择的应用为服务方 Web应用时, 向浏览器发送应用调用请求, 应用 调用请求包括所选择的 Web应用的地址, 以使浏览器根据选择的 Web应 用的地址打开所选择的 Web应用的地址对应的服务方 Web应用。  304. When it is determined that the user selects, according to the presented servant native application and the servant web application, the application is a servant web application, sending an application call request to the browser, where the application call request includes an address of the selected web application, So that the browser opens the servant web application corresponding to the address of the selected web application according to the address of the selected web application.
或者, 在上述步骤 303中的服务发现请求中包括待处理的数据时, 该 步骤 304可具体为:  Alternatively, when the service discovery request in the foregoing step 303 includes the data to be processed, the step 304 may be specifically:
在确定用户根据所述呈现的服务方原生应用和服务方 Web 应用所选 择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 应用调用 请求包括选择的 Web 应用的地址和待处理的数据, 以使浏览器根据所选 择的 Web应用的地址打开所选择的 Web应用的地址对应的服务方 Web应 用, 并将所述待处理的数据发送给所述打开的服务方 Web应用进行处理。  When determining that the user selects the application selected by the servant native application and the servant web application as the servant web application, sending an application call request to the browser, where the application call request includes the address of the selected web application and the to-be-processed And causing the browser to open the servant web application corresponding to the address of the selected web application according to the address of the selected web application, and send the to-be-processed data to the open servant web application for processing.
本实施例中的应用调用方法, 解决了原生应用发现和调用 Web 应用 的问题, 使得用户在使用原生应用的过程中, 可以有更多的选择权, 如可 以自由选择合适的服务方原生应用或服务方 Web 应用来处理服务发现请 求, 进而可以充分利用网络中种类繁多、 功能丰富的服务方 Web应用。 The application calling method in this embodiment solves the native application discovery and invokes the web application. The problem is that users can have more choices in the process of using the native application, such as freely selecting the appropriate servant native application or servant web application to process the service discovery request, thereby making full use of the wide variety of networks. , a feature-rich servant web application.
图 4示出了本发明另一实施例提供的应用调用方法的流程示意图, 如 图 4所示, 本发明实施例中的应用调用方法如下文所述。  FIG. 4 is a schematic flow chart of an application calling method according to another embodiment of the present invention. As shown in FIG. 4, the application calling method in the embodiment of the present invention is as follows.
401、 操作系统接收所述浏览器发送的服务方 Web应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息。  401. The operating system receives a registration request of the servant web application sent by the browser, where the registration request includes: information of the servant web application.
402、 操作系统根据所述服务方 Web 应用的信息生成与服务方 Web 应用对应的 Web 应用关联程序的安装文件, 并执行所述安装文件, 得到 服务方 Web应用在操作系统中注册的 Web应用关联程序。  402. The operating system generates an installation file of the web application association program corresponding to the server web application according to the information of the server web application, and executes the installation file to obtain a web application association registered by the service web application in the operating system. program.
可以理解的是, 在操作系统中注册有 Web 应用关联程序时, 可以运 行所述 Web应用关联程序以通过所述浏览器打开所述服务方 Web应用, 所述操作系统可以通过所述运行中的 Web 应用关联程序调用所述服务方 Web应用。  It can be understood that, when a web application association program is registered in the operating system, the web application association program can be run to open the server web application through the browser, and the operating system can pass the running The web application association program invokes the servant web application.
在本实施例中, 用户若选择 Web 应用关联程序处理服务发现请求, 则操作系统可用过浏览器将待处理数据发送给 Web应用关联程序, 例如, Web应用关联程序可调用浏览器打开该 Web应用关联程序所对应的服务 方 Web 应用, 进而操作系统通过浏览器将上述待处理数据发送给服务方 Web应用。  In this embodiment, if the user selects the web application association program to process the service discovery request, the operating system may use the browser to send the to-be-processed data to the web application association program. For example, the web application association program may invoke the browser to open the web application. The servant web application corresponding to the associated program, and the operating system sends the to-be-processed data to the servant web application through the browser.
举例来说, 步骤 402 中的根据服务方 Web应用的信息生成与所述服 务方 Web应用对应的 Web应用关联程序的安装文件, 可具体包括:  For example, the installation file of the web application association program corresponding to the service provider web application according to the information of the service provider web application in step 402 may specifically include:
根据服务方 Web应用的信息生成所述 Web应用关联程序的源文件, 对源文件进行编译, 将编译后的源文件编码转换成在操作系统中能够执行 的字节码, 将字节码打包成 Web 应用关联程序的安装文件, 执行所述安 装文件, 得到在操作系统中注册的与所述服务方 Web应用对应的 Web应 用关联程序。  Generating the source file of the web application association program according to the information of the web application of the server, compiling the source file, converting the compiled source file into a bytecode executable in the operating system, and packaging the bytecode into The installation file of the web application association program executes the installation file to obtain a web application association program corresponding to the service provider web application registered in the operating system.
当然,实际应用中操作系统根据服务方 Web应用的信息动态生成 Web 应用关联程序的源文件, 并对源文件进行编译, 将编译后的源文件编码转 化成在操作系统中能够执行的字节码, 并将字节码打包成类似原生应用程 序的 Web 应用关联程序的安装文件, 执行所述安装文件, 得到在操作系 统中注册的与所述服务方 Web应用对应的 Web应用关联程序。 在其他实施例中, 上述获取 Web应用关联程序的方式可以如下所述: a) 操作系统接收浏览器发送的服务方 Web应用的注册请求, 注册请 求包括: 服务方 Web应用的信息; Of course, in the actual application, the operating system dynamically generates the source file of the web application association program according to the information of the web application of the service side, compiles the source file, and converts the compiled source file code into bytecodes that can be executed in the operating system. , and package the bytecode into an installation file of a web application associated program similar to the native application, execute the installation file, and get the operating system A web application association program corresponding to the web application of the service provider registered in the system. In other embodiments, the manner of obtaining the web application association program may be as follows: a) the operating system receives a registration request of the web application of the service provider sent by the browser, where the registration request includes: information of the web application of the service party;
操作系统将服务方 Web 应用的信息发送至网络侧服务器, 以使网络 侧服务器根据服务方 Web应用的信息生成与服务方 Web应用对应的 Web 应用关联程序的安装文件;  The operating system sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
以及操作系统接收网络侧服务器发送的 Web 应用关联程序的安装文 件, 执行 Web 应用关联程序的安装文件, 得到在操作系统中注册的与所 述服务方 Web应用对应的 Web应用关联程序。  And the operating system receives the installation file of the web application association program sent by the network side server, executes the installation file of the web application association program, and obtains the web application association program corresponding to the service provider web application registered in the operating system.
在上述方式中, 网络侧服务器可以实现根据服务方 Web 应用的信息 动态生成 Web 应用关联程序的源文件, 并对所述源文件进行编译, 将编 译后的源文件编码转化成在操作系统中能够执行的字节码, 并将所述字节 码打包成 Web 应用关联程序的安装文件, 执行所述安装文件, 得到在操 作系统中注册的与所述服务方 Web应用对应的 Web应用关联程序。  In the above manner, the network side server may dynamically generate a source file of the web application association program according to information of the service provider web application, compile the source file, and convert the compiled source file encoding into an operating system. Executing the bytecode, and packaging the bytecode into an installation file of the web application association program, executing the installation file, and obtaining a web application association program corresponding to the service provider web application registered in the operating system.
通过将生成 Web 应用关联程序的过程从操作系统移至网络侧服务器 实现, 可以简化操作系统的操作过程, 并降低对用户终端的计算和存储能 力的要求, 节省了移动终端的耗电。  By moving the process of generating the Web application association program from the operating system to the network side server, the operation process of the operating system can be simplified, and the calculation and storage capacity requirements of the user terminal can be reduced, and the power consumption of the mobile terminal is saved.
b) 操作系统接收浏览器发送的服务方 Web应用的注册请求, 注册请 求包括: 服务方 Web应用的信息;  b) The operating system receives a registration request of the web application of the server sent by the browser, and the registration request includes: information of the web application of the service party;
操作系统将服务方 Web 应用的信息发送至网络侧服务器, 以使网络 侧服务器根据服务方 Web应用的信息生成与服务方 Web应用对应的 Web 应用关联程序的安装文件;  The operating system sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
以及操作系统从网络侧服务器下载 Web应用关联程序的安装文件, 并执行下载的 Web应用关联程序的安装文件, 得到在操作系统中注册的 与所述服务方 Web应用对应的 Web应用关联程序。  And the operating system downloads the installation file of the web application association program from the network side server, and executes the installation file of the downloaded web application association program, and obtains the web application association program corresponding to the service provider web application registered in the operating system.
举例来说, 网络侧服务器可以将生成的 Web 应用关联程序的安装文 件的下载地址发送至操作系统, 以使操作系统根据下载地址下载网络侧服 务器生成的 Web应用关联程序的安装文件。  For example, the network side server may send the download address of the generated installation file of the web application association program to the operating system, so that the operating system downloads the installation file of the web application association program generated by the network side server according to the download address.
举例来说, Web应用关联程序在操作系统中安装后可以不显示桌面图 标, 在运行时也可以不显示用户界面, 但可以通过操作系统的应用管理功 能进行管理, 如删除该 Web应用关联程序等。 For example, the web application association program may not display the desktop image after being installed in the operating system. The user interface may not be displayed at runtime, but may be managed by an application management function of the operating system, such as deleting the web application associated program.
403、 操作系统接收请求方原生应用发送的服务发现请求。  403. The operating system receives a service discovery request sent by the requesting party's native application.
举例来说, 服务发现请求可以包括: 服务类别, 或者可以包括: 服务 类别和数据类型, 或者可以包括: 服务类别和待处理的数据, 或者可以包 括服务类别、 数据类型和待处理的数据等, 本实施例不对其进行限定。  For example, the service discovery request may include: a service category, or may include: a service category and a data type, or may include: a service category and data to be processed, or may include a service category, a data type, and data to be processed, and the like. This embodiment does not limit it.
404、 根据所述服务发现请求在操作系统中查找能够处理该服务发现 请求的服务方原生应用和服务方 Web应用对应的 Web应用关联程序, 呈 现所查找到的服务方原生应用和服务方 Web应用对应的 Web应用关联程 序。  404. Search, according to the service discovery request, a web application association program corresponding to the service provider native application and the service provider web application that can process the service discovery request, and present the found service party native application and the service party web application. Corresponding web application association program.
举例来说, 若服务发现请求中包括服务类别和数据类型, 则步骤 404 可为根据服务发现请求中的服务类别和数据类型在操作系统中查找与服 务类别和数据类型相匹配的注册服务类别和注册数据类型, 获取注册服务 类别和注册数据类型对应的服务方原生应用和 Web 应用关联程序, 呈现 所查找到的服务方原生应用和 Web应用关联程序。  For example, if the service discovery request includes a service category and a data type, step 404 may be to find, in the operating system, a registration service category that matches the service category and the data type according to the service category and data type in the service discovery request. The registration data type obtains the service provider native application and the web application association program corresponding to the registration service category and the registration data type, and presents the found service party native application and the web application association program.
相应地, 所述服务方原生应用和服务方 Web 应用均在所述操作系统 中注册有注册服务类别和注册数据类型。  Correspondingly, both the servant native application and the servant web application are registered with the registration service category and the registration data type in the operating system.
405、 在确定用户根据所述呈现的服务方原生应用和服务方 Web应用 对应的 Web应用关联程序所选择的应用为服务方 Web应用对应的 Web应 用关联程序时, 运行服务方 Web应用对应的 Web应用关联程序, 服务方 Web应用对应的 Web应用关联程序向浏览器发送应用调用请求, 所述应 用调用请求包括服务方 Web应用对应的 Web应用关联程序对应的所述服 务方 Web应用的地址。  405. When it is determined that the application selected by the user of the web application associated program corresponding to the presented servant native application and the servant web application is a web application association program corresponding to the servant web application, the web corresponding to the servant web application is executed. The application association program, the web application association program corresponding to the service provider web application sends an application call request to the browser, where the application call request includes an address of the service provider web application corresponding to the web application association program corresponding to the service provider web application.
由此, 所述浏览器根据所述服务方 Web应用的地址打开所述服务方 Web应用。  Thereby, the browser opens the servant web application according to the address of the servant web application.
上述应用调用方法, 解决了原生应用用于发现、 调用服务方 Web 应 用的问题, 使得用户在使用原生应用的过程中, 可以有更多的选择权, 如 可以自由选择合适的服务方原生应用或服务方 Web 应用来处理响应的请 求, 进而可以充分利用网络中种类繁多、 功能丰富的服务方 Web应用。 当用户在浏览器中打开或安装任一服务方 Web应用之后 ,如用户使用 谷歌 Chrome浏览器从 Chrome Web应用商店上下载并安装任一服务方 Web应用后, 或者用户通过任一浏览器和任一服务方 Web应用的地址打 开对应的服务方 Web应用后,浏览器向操作系统发送服务方 Web应用的 注册请求, 以触发操作系统注册该服务方 Web应用, 其中, 服务方 Web 应用的注册请求中包含服务方 Web应用的信息,服务方 Web应用的信息 包括: 服务方 Web应用的地址, 还可以包括如下信息中的一种或多种: 服务方 Web应用的服务类别、服务方 Web应用所处理的数据类型、服务 方 Web应用的名称、 服务方 Web应用的图标等。 The above application calling method solves the problem that the native application is used for discovering and calling the servant web application, so that the user can have more options in the process of using the native application, such as being free to select a suitable servant native application or The servant web application handles the response request, which in turn can take advantage of the wide variety of feature-rich servant web applications on the network. After the user opens or installs any of the servant web applications in the browser, such as after the user downloads and installs any servant web application from the Chrome web application store using the Google Chrome browser, or the user passes any browser and any After the address of the servant web application opens the corresponding servant web application, the browser sends a registration request of the servant web application to the operating system to trigger the operating system to register the servant web application, wherein the registrant web application registration request The information of the service provider web application includes: the address of the service provider web application, and may also include one or more of the following information: a service category of the service provider web application, and a service provider web application office. The type of data being processed, the name of the servant web application, the icon of the servant web application, and so on.
可选地, 在服务方 Web 应用被打开或安装过程中, 浏览器可以提供 界面让用户选择是否触发操作系统注册上述的服务方 Web 应用, 如果确 认用户同意注册该服务方 Web应用 ,则浏览器向操作系统发送服务方 Web 应用的注册请求, 以触发操作系统注册该服务方 Web 应用, 否则浏览器 终止上述过程, 不对操作系统发送服务方 Web应用的注册请求。  Optionally, during the process of opening or installing the servant web application, the browser may provide an interface for the user to select whether to trigger the operating system to register the servant web application, and if the user agrees to register the servant web application, the browser Sending a registration request of the servant web application to the operating system to trigger the operating system to register the servant web application, otherwise the browser terminates the above process, and does not send a registration request of the servant web application to the operating system.
图 5示出了本发明一实施例提供的应用调用方法的流程示意图, 如图 FIG. 5 is a schematic flowchart of an application calling method according to an embodiment of the present invention, as shown in FIG.
5所示, 本发明实施例中的应用调用方法如下文所述。 As shown in FIG. 5, the application calling method in the embodiment of the present invention is as follows.
501、 在用户根据呈现的服务方原生应用和服务方 Web应用所选择的 应用为服务方 Web应用以处理请求方原生应用发送的服务发现请求时, 浏览器接收操作系统发送的应用调用请求, 应用调用请求包括: 所选择的 Web应用的地址。  501. When the user selects, according to the presented service provider native application and the server selected by the server web application, the service discovery web service application to process the service discovery request sent by the requestor native application, the browser receives the application call request sent by the operating system, and the application The call request includes: The address of the selected web application.
502、浏览器根据所选择的 Web应用的地址打开选择的 Web应用的地 址对应的 Λ良务方 Web应用。  502. The browser opens the web application corresponding to the address of the selected web application according to the address of the selected web application.
可选地, 应用调用请求还可包括: Web应用的地址和待处理的数据, 该处的待处理的数据可为请求方原生应用向操作系统发送的服务发现请 求中的待处理的数据。  Optionally, the application invocation request may further include: an address of the web application and data to be processed, where the to-be-processed data may be data to be processed in a service discovery request sent by the requesting party's native application to the operating system.
相应地, 上述的步骤 502可为如下图中未示出的步骤 502,:  Correspondingly, the above step 502 can be a step 502 not shown in the following figure:
502,、浏览器根据服务方 Web应用的地址打开所述服务方 Web应用 , 并将上述待处理数据发送给所述服务方 Web应用, 以使服务方 Web应用 处理所述待处理的数据。  502. The browser opens the servant web application according to the address of the servant web application, and sends the to-be-processed data to the servant web application, so that the servant web application processes the to-be-processed data.
优选地, 如图 6所示, 在步骤 501之前, 本实施例中的应用调用方法 还包括如下的步骤 500: Preferably, as shown in FIG. 6, before step 501, the application calling method in this embodiment Also included is the following step 500:
500、 浏览器向操作系统发送服务方 Web 应用的注册请求, 服务方 Web应用的注册请求包括: 服务方 Web应用的信息, 以使操作系统根据 服务方 Web 应用的相息编辑操作系统中的浏览器的注册信息, 或者根据 服务方 Web应用的信息生成能够安装于所述操作系统中的 Web应用关联 程序。  500. The browser sends a registration request of the servant web application to the operating system, and the registration request of the servant web application includes: information of the servant web application, so that the operating system edits the browsing in the operating system according to the information of the servant web application. The registration information of the device, or the web application association program that can be installed in the operating system according to the information of the service provider web application.
在另一种实施场景中, 上述应用调用方法还包括如下的图中未示出的 步骤 503 :  In another implementation scenario, the above application calling method further includes a step 503 not shown in the following figure:
503、 浏览器获取所述服务方 Web应用的处理结果, 并将处理结果发 送与操作系统, 具体地, 通过所述操作系统将处理结果发送给上述的请求 方原生应用。  503. The browser obtains a processing result of the servant web application, and sends the processing result to the operating system. Specifically, the processing result is sent by the operating system to the requestor native application.
上述应用调用方法, 通过浏览器接收打开服务方 Web 应用的应用调 用请求, 解决了原生应用用于发现、 调用服务方 Web 应用的问题, 使得 用户在使用原生应用的过程中, 可以有更多的选择权, 如可以自由选择合 适的服务方原生应用或服务方 Web 应用来处理响应的请求, 进而可以充 分利用网络中种类繁多、 功能丰富的服务方 Web应用。  The application calling method receives the application calling request for opening the servant web application through the browser, and solves the problem that the native application is used for discovering and calling the servant web application, so that the user can have more in the process of using the native application. The option, such as the ability to freely select the appropriate servant native application or servant web application to process the response request, and then take advantage of the wide variety of feature-rich servant web applications on the network.
图 7示出了本发明一实施例提供的操作系统的结构示意图, 如图 7所 示, 本发明实施例中的操作系统 12包括: 原生应用调用模块 122, 其中, 原生应用调用模块, 具体用于接收请求方原生应用 13发送的服务发现请 求,根据服务发现请求查找能够处理该服务发现请求的服务方原生应用 14 和月良务方 Web应用 21 ,并呈现查找到的 Λ良务方原生应用 14和 Λ良务方 Web 应用 21 ;  FIG. 7 is a schematic structural diagram of an operating system according to an embodiment of the present invention. As shown in FIG. 7, the operating system 12 in the embodiment of the present invention includes: a native application calling module 122, where a native application invokes a module, specifically Receiving the service discovery request sent by the requestor native application 13, searching for the service provider native application 14 and the monthly service web application 21 capable of processing the service discovery request according to the service discovery request, and presenting the discovered good service local application 14 and Λ良事方Web Application 21;
所述原生应用调用模块 122在确定用户根据所述呈现的服务方原生应 用和服务方 Web应用所选择的应用为服务方 Web应用时, 向浏览器发送 应用调用请求, 所述应用调用请求包括所选择的 Web 应用的地址, 以使 所述浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址 对应的 Web应用。  The native application invoking module 122 sends an application call request to the browser when determining that the user selects the application selected by the service provider native application and the server web application as the server web application, where the application call request includes The address of the selected web application is such that the browser opens the web application corresponding to the address of the selected web application according to the address of the selected web application.
在一种应用场景中, 上述的服务发现请求可包括服务类别, 此时, 原 生应用调用模块 122 可具体用于接收请求方原生应用发送的服务发现请 求, 根据所述服务发现请求中的服务类别查找能够处理该服务发现请求的 服务方原生应用和服务方 Web 应用, 并呈现所述查找到的服务方原生应 用和服务方 Web 应用, 以及在确定用户根据所述呈现的服务方原生应用 和服务方 Web应用所选择的应用为服务方 Web应用时, 向浏览器发送应 用调用请求, 所述应用调用请求包括所选择的 Web 应用的地址, 以使所 述浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对 应的 Web应用。 In an application scenario, the foregoing service discovery request may include a service category. In this case, the native application invoking module 122 may be specifically configured to receive a service discovery request sent by the requesting party's native application, according to the service category in the service discovery request. Find the ability to process the service discovery request a service provider native application and a server web application, and presenting the found service party native application and server web application, and determining an application selected by the user according to the presented service party native application and the server web application When the servant web application sends an application call request to the browser, the application call request includes an address of the selected web application, so that the browser opens the address of the selected web application according to the address of the selected web application. Corresponding web application.
在另一种应用场景中, 上述的服务发现请求可包括服务类别和数据类 型, 此时, 原生应用调用模块 122可具体用于接收请求方原生应用发送的 服务发现请求, 根据所述服务发现请求中所述服务类别和数据类型查找能 够处理该服务发现请求的服务方原生应用和服务方 Web 应用, 并呈现所 述查找到的服务方原生应用和服务方 Web 应用, 以及在确定用户根据所 述呈现的服务方原生应用和服务方 Web应用所选择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所述应用调用请求包括所选择的 Web应用的地址, 以使所述浏览器根据所选择的 Web应用的地址打开所 选择的 Web应用的地址对应的 Web应用  In another application scenario, the foregoing service discovery request may include a service category and a data type. In this case, the native application invoking module 122 may be specifically configured to receive a service discovery request sent by the requesting party's native application, according to the service discovery request. The service category and data type described in the service provider native application and the servant web application capable of processing the service discovery request, and presenting the found servant native application and servant web application, and determining that the user is When the presented service provider native application and the server selected by the server web application are the server web application, sending an application call request to the browser, where the application call request includes an address of the selected web application, so that the browser Open the web application corresponding to the address of the selected web application according to the address of the selected web application
在第三种应用场景中, 服务发现请求可进一步包括: 待处理的数据, 此时, 原生应用调用模块 122具体用于:  In a third application scenario, the service discovery request may further include: data to be processed. At this time, the native application invoking module 122 is specifically configured to:
接收请求方原生应用 13 发送的服务发现请求, 根据服务发现请求查 找能够处理该服务发现请求的服务方原生应用 14和服务方 Web应用, 并 呈现查找到的服务方原生应用 14和服务方 Web应用;  Receiving the service discovery request sent by the requesting party's native application 13, searching for the servant native application 14 and the servant web application capable of processing the service discovery request according to the service discovery request, and presenting the found servant native application 14 and the servant web application ;
在确定用户根据呈现的服务方原生应用 14和服务方 Web应用所选择 的应用为服务方 Web应用时, 向浏览器 11发送应用调用请求, 应用调用 请求包括所选择的 Web 应用的地址和所述待处理的数据, 以使所述浏览 器 居所选择的 Web 应用的地址打开所选择的 Web 应用的地址对应的 Web应用, 并将所述待处理的数据发送给所打开的服务方 Web应用进行 处理。  When determining that the user selects the application selected by the servant native application 14 and the servant web application as the servant web application, sending an application call request to the browser 11 , the application call request including the address of the selected web application and the Data to be processed, so that the address of the web application selected by the browser is opened to the web application corresponding to the address of the selected web application, and the data to be processed is sent to the opened web application for processing .
需要说明的是, 在第三种应用场景中, 服务发现请求可以包括: 服务 类别和待处理的数据, 或者, 服务发现请求可以包括服务类别、 数据类型 和待处理的数据等。  It should be noted that, in the third application scenario, the service discovery request may include: a service category and data to be processed, or the service discovery request may include a service category, a data type, and data to be processed.
以 Android操作系统为例, 原生应用调用模块所接收的服务发现请求 包括: 服务类别、 数据类型和待处理的数据, 则原生应用调用模块具体用 于: Taking the Android operating system as an example, the service discovery request received by the native application calling module Including: service category, data type and pending data, the native application call module is specifically used to:
接收请求方原生应用 13 发送的服务发现请求, 根据所述服务发现请 求中的服务类别和数据类型查找能够处理所述待处理的数据的服务方原 生应用和服务方 Web应用, 并呈现查找到的服务方原生应用 14和服务方 Web应用;  Receiving a service discovery request sent by the requesting party's native application 13, searching for a service provider's native application and the server's web application capable of processing the to-be-processed data according to the service category and data type in the service discovery request, and presenting the found The servant native application 14 and the servant web application;
所述原生应用调用模块在确定用户根据呈现的服务方原生应用 14和 服务方 Web应用所选择的应用为服务方 Web应用时,向浏览器 11发送应 用调用请求, 所述应用调用请求包括所选择的 Web 应用的地址和所述待 处理的数据, 以使所述浏览器根据所选择的 Web 应用的地址打开所选择 的 Web应用的地址对应的服务方 Web应用, 并将所述待处理的数据发送 给所打开的服务方 Web应用进行处理。  The native application invoking module sends an application call request to the browser 11 when determining that the user selects the application selected by the service provider native application 14 and the server web application as the server web application, and the application call request includes the selected The address of the web application and the data to be processed, so that the browser opens the server web application corresponding to the address of the selected web application according to the address of the selected web application, and the data to be processed is Sent to the open servant web application for processing.
当然, 实际应用中的原生应用调用模块 122还用于接收浏览器 11发 送的服务方 Web应用的处理结果。  Of course, the native application invoking module 122 in the actual application is also used to receive the processing result of the server web application sent by the browser 11.
举例来说, 原生应用调用模块 122用于提供用户界面, 向用户展示可 以作为服务方原生应用和服务方 Web 应用的应用列表, 列表中可以包含 每项应用的应用名称、 应用地址、 应用图标等。  For example, the native application invoking module 122 is configured to provide a user interface, and display to the user a list of applications that can be used as a server-side native application and a server-side web application, and the list may include an application name, an application address, an application icon, and the like of each application. .
相应地, 原生应用调用模块 122接收用户的选择结果, 如服务方原生 应用, 根据用户选择的应用的地址, 打开对应的服务方原生应用 14, 并将 从服务发现请求中的待处理的数据发送给服务方原生应用 14。  Correspondingly, the native application invoking module 122 receives the selection result of the user, such as the servant native application, opens the corresponding servant native application 14 according to the address of the application selected by the user, and sends the data to be processed from the service discovery request. Apply the service to the servant 14 natively.
如果用户选择的是在操作系统中注册的服务方 Web 应用, 则原生应 用调用模块 122将服务方 Web应用的地址和待处理的数据通过操作系统 12发送给浏览器 11。  If the user selects the servant web application registered in the operating system, the native application invoking module 122 sends the address of the servant web application and the data to be processed to the browser 11 through the operating system 12.
以 Android系统为例, 通过原生应用调用模块 122, 请求方原生应用 可以使用如下方法向浏览器或其它服务方原生应用发送数据:  Taking the Android system as an example, through the native application invoking module 122, the requesting native application can send data to the browser or other servant native application using the following methods:
Intent intent = new Intent(this, dest.calss);  Intent intent = new Intent(this, dest.calss);
intent.putExtra(payload);  intent.putExtra(payload);
startActivityForResult(intent, RequestCode);  startActivityForResult(intent, RequestCode);
并通过 onActivityResult(int requestCode, int resultCode, Intent data)回 调函数接收响应, 处理结果数据包含在 data对象中。 浏览器或其它服务方 原生应用则可以通过如下方法将处理结果返回: The response is received by the onActivityResult(int requestCode, int resultCode, Intent data) callback function, and the processing result data is included in the data object. Browser or other service party Native applications can return processing results by:
Intent data = new Intent();  Intent data = new Intent();
data.putExtra(payload);  data.putExtra(payload);
set esult( esultCode, data);  Set esult( esultCode, data);
本实施例中的操作系统通过原生应用调用模块 122接收请求方原生应 用的服务发现请求, 进而查找服务方原生应用和服务方 Web 应用, 解决 了原生应用用于发现、 调用服务方 Web 应用的问题, 使得用户在使用原 生应用的过程中, 可以有更多的选择权, 如可以自由选择合适的服务方原 生应用或服务方 Web 应用来处理响应的请求, 进而可以充分利用网络中 种类繁多、 功能丰富的服务方 Web应用。  The operating system in this embodiment receives the service discovery request of the requesting party's native application through the native application invoking module 122, and then searches for the servant's native application and the servant's web application, and solves the problem that the native application is used to discover and invoke the servant's web application. In the process of using the native application, the user can have more options, such as freely selecting the appropriate servant native application or the servant web application to process the response request, thereby making full use of the wide variety of functions and functions in the network. Rich servant web application.
在另一可选的实施例中, 如图 8所示, 本实施例中的操作系统进一步 包括 Web应用注册模块 121 , 该 Web应用注册模块 121用于接收浏览器 1 1发送的服务方 Web应用的注册请求, 所述注册请求包括: 服务方 Web 应用的信息;  In another optional embodiment, as shown in FIG. 8, the operating system in this embodiment further includes a web application registration module 121, and the web application registration module 121 is configured to receive the web application of the server sent by the browser 11. Registration request, the registration request includes: information of the service provider web application;
所述 Web应用注册模块 121根据服务方 Web应用的信息编辑操作系 统中浏览器 11的注册信息, 以使所述浏览器 11的注册信息中携带服务方 Web应用的部分 /全部信息, 进而服务方 Web应用能够被所述操作系统查 找。  The web application registration module 121 edits the registration information of the browser 11 in the operating system according to the information of the web application of the server, so that the registration information of the browser 11 carries part/all information of the web application of the server, and then the service party The web application can be looked up by the operating system.
上述的服务方 Web应用的信息包括: 服务方 Web应用的地址; 或者, 服务方 Web应用的信息包括: 服务方 Web应用的地址, 还包括如下信息 中的一种或多种:  The information of the servant web application includes: an address of the servant web application; or the servant web application information includes: an address of the servant web application, and one or more of the following information:
服务方 Web应用的服务类别、 服务方 Web应用所处理的数据类型、 服务方 Web应用的名称等。  The service category of the service provider web application, the data type processed by the service provider web application, the name of the service provider web application, and so on.
也就是说, Web应用注册模块 121根据接收到的服务方 Web应用的 地址、 服务类别和数据类型对浏览器 11 的注册信息进行动态修改, 使浏 览器 11的注册信息中携带服务方 Web应用的服务类别, 或者服务类别和 数据类型, 进而可以响应上述请求方原生应用所发送的服务发现请求。 在另一应用场景中, Web应用注册模块 121进一步用于接收所述浏览 器发送的服务方 Web应用的注册请求, 注册请求包括: 服务方 Web应用 的信息 (如服务方 Web应用的地址) ; That is, the web application registration module 121 dynamically modifies the registration information of the browser 11 according to the received address, service category, and data type of the servant web application, so that the registration information of the browser 11 carries the web application of the servant. The service category, or service category and data type, can in turn respond to the service discovery request sent by the requestor native application. In another application scenario, the web application registration module 121 is further configured to receive a registration request of the servant web application sent by the browser, where the registration request includes: a servant web application Information (such as the address of the service provider web application);
居 Λ良务方 Web应用的信息生成与 Λ良务方 Web应用对应的 Web应用 关联程序的安装文件, 并执行所述安装文件, 得到服务方 Web 应用在操 作系统中注册的 Web应用关联程序 15 (如图 12所示 ) 。  The information of the web application of the resident party generates the installation file of the web application associated program corresponding to the web application of the web, and executes the installation file to obtain the web application associated program registered by the web application in the operating system. (As shown in Figure 12).
具体地, 上述 Web应用注册模块 121具体用于根据所述服务方 Web 应用的信息生成所述 Web 应用关联程序的源文件, 对所述源文件进行编 译, 将编译后的源文件编码转换成在所述操作系统中能够执行的字节码, 将所述字节码打包成 Web应用关联程序的安装文件, 执行所述安装文件, 得到在操作系统中注册的与所述服务方 Web应用对应的 Web应用关联程 序;  Specifically, the web application registration module 121 is specifically configured to generate a source file of the web application association program according to the information of the service provider web application, compile the source file, and convert the compiled source file encoding into a bytecode executable in the operating system, the bytecode is packaged into an installation file of a web application association program, and the installation file is executed to obtain a registration corresponding to the service provider web application registered in an operating system. Web application association program;
优选地 ,根据 Web应用的信息动态生成 Web应用关联程序的源文件 , 并对源文件进行编译, 将编译后的源文件编码转化成在操作系统中能够执 行的字节码, 并将字节码打包成 Web 应用程序的安装文件, 执行所述安 装文件, 得到在操作系统中注册的与所述服务方 Web应用对应的 Web应 用关联程序。  Preferably, the source file of the web application association program is dynamically generated according to the information of the web application, and the source file is compiled, the compiled source file encoding is converted into a bytecode executable in the operating system, and the bytecode is The installation file is packaged into a web application, and the installation file is executed to obtain a web application association program corresponding to the service provider web application registered in the operating system.
在本实施例中, Web应用注册模块 121是操作系统的一部分, 该 Web 应用注册模块 121根据接收到的服务方 Web应用的服务类别、 数据类型、 应用地址、 应用图标等, 动态生成 Web 应用关联程序的各类源文件, 并 通过自带的编译环境对工程进行编译, 将编译后的 Web 应用关联程序转 化成可在操作系统中执行的字节码, 并将字节码打包成 Web 应用关联程 序的安装文件。  In this embodiment, the web application registration module 121 is a part of an operating system, and the web application registration module 121 dynamically generates a web application association according to a service category, a data type, an application address, an application icon, and the like of the received web application. Various source files of the program, compile the project through the built-in compilation environment, convert the compiled web application association program into bytecode executable in the operating system, and package the bytecode into a web application association. The installation file of the program.
此时, 原生应用调用模块 122具体用于:  At this point, the native application invocation module 122 is specifically used to:
接收请求方原生应用发送的服务发现请求, 根据所述服务发现请求在 所述操作系统中查找能够处理该服务发现请求的服务方原生应用和所述 服务方 Web应用对应的 Web应用关联程序;  Receiving a service discovery request sent by the requesting party's native application, searching, in the operating system, a service provider native application capable of processing the service discovery request and a web application association program corresponding to the server web application according to the service discovery request;
其中, 呈现所查找到的服务方原生应用和所述服务方 Web 应用对应 的 Web应用关联程序;  Wherein, the found servant native application and the web application association program corresponding to the servant web application are presented;
所述原生应用调用模块 122在确定用户根据所述呈现的服务方原生应 用和所述服务方 Web应用对应的 Web应用关联程序所选择的应用为所述 服务方 Web应用对应的 Web应用关联程序时 ,运行所述服务方 Web应用 对应的 Web应用关联程序,所述服务方 Web应用对应的 Web应用关联程 序向浏览器发送所述应用调用请求, 所述应用调用请求包括所述服务方 上述服务发现请求可以包括服务类别, 或者服务类别和数据类型, 或 者服务类别和待处理的数据,或者服务类别、数据类型和待处理的数据等, 本实施例不对其进行限定。 The native application invoking module 122 determines that the application selected by the user according to the presented servant native application and the web application association program corresponding to the servant web application is the web application association program corresponding to the servant web application. Running the service web application Corresponding web application association program, the web application association program corresponding to the server web application sends the application call request to the browser, where the application call request includes the service party, the service discovery request may include a service category, or a service The category and the data type, or the service category and the data to be processed, or the service category, the data type, and the data to be processed, etc., are not limited in this embodiment.
在其他实施例中, 上述的 Web应用注册模块 121还用于接收所述浏 览器发送的服务方 Web应用的注册请求, 注册请求包括: 服务方 Web应 用的信息;  In other embodiments, the web application registration module 121 is further configured to receive a registration request of the server web application sent by the browser, where the registration request includes: information of the service provider web application;
所述 Web应用注册模块 121将服务方 Web应用的信息发送至网络侧 服务器,以使网络侧服务器根据服务方 Web应用的信息生成与服务方 Web 应用对应的 Web应用关联程序的安装文件;  The web application registration module 121 sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
所述 Web应用注册模块 121接收所述网络侧服务器发送的所述 Web 应用关联程序的安装文件, 执行所述 Web 应用关联程序的安装文件, 得 到在操作系统中注册的 Web应用关联程序; 或者, 所述操作系统从所述 网络侧服务器下载所述 Web应用关联程序的安装文件, 执行所述下载的 Web应用关联程序的安装文件, 得到在操作系统中注册的 Web应用关联 程序。  The web application registration module 121 receives an installation file of the web application association program sent by the network side server, executes an installation file of the web application association program, and obtains a web application association program registered in the operating system; or The operating system downloads an installation file of the web application association program from the network side server, executes an installation file of the downloaded web application association program, and obtains a web application association program registered in the operating system.
或者, 上述的 Web应用注册模块 121还用于接收浏览器发送的服务 方 Web应用的注册请求, 注册请求包括: 服务方 Web应用的信息;  Alternatively, the foregoing web application registration module 121 is further configured to receive a registration request of the service provider web application sent by the browser, where the registration request includes: information of the service provider web application;
所述 Web应用注册模块 121将服务方 Web应用的信息发送至网络侧 服务器,以使网络侧服务器根据服务方 Web应用的信息生成与服务方 Web 应用对应的 Web应用关联程序的安装文件;  The web application registration module 121 sends the information of the servant web application to the network side server, so that the network side server generates an installation file of the web application association program corresponding to the servant web application according to the information of the servant web application;
所述 Web应用注册模块 121接收所述网络侧服务器发送的所述 Web 应用关联程序的安装文件, 执行所述安装文件, 得到服务方 Web 应用在 操作系统中注册的与服务方 Web应用对应的 Web应用关联程序; 或者, 所述 Web应用注册模块 121从所述网络侧服务器下载所述 Web应用关联 程序的安装文件, 并安装所述下载的 Web 应用关联程序的安装文件, 得 到月良务方 Web应用在操作系统中注册的与月良务方 Web应用对应的 Web应 用关联程序 15 , 如图 12所示。 在该方案中, 与 Web应用关联程序 15对应 (如图 12所示) 的各类 源文件的生成、 编译、 可执行程序转化和打包均在网络侧服务器上进行。 The web application registration module 121 receives an installation file of the web application association program sent by the network side server, and executes the installation file to obtain a webpage corresponding to the service provider web application registered by the service provider web application in the operating system. Applying the associated program; or, the web application registration module 121 downloads the installation file of the web application association program from the network side server, and installs the installation file of the downloaded web application association program to obtain the monthly service web The web application association program 15 corresponding to the Yueliangfang web application registered in the operating system is applied, as shown in FIG. In this scheme, generation, compilation, executable program conversion, and packaging of various source files corresponding to the web application association program 15 (shown in FIG. 12) are performed on the network side server.
上述方式可以使操作系统 12 不必提供各类源文件的生成、 编译、 可 执行程序转化和打包等功能和环境, 降低了对终端中计算和存储资源的占 用, 特别是对移动终端而言, 可以节省耗电。  The above manner can make the operating system 12 not have to provide functions and environments for generating, compiling, executing program conversion and packaging of various source files, and reducing the occupation of computing and storage resources in the terminal, especially for the mobile terminal. Save power.
本实施例中的操作系统通过 Web应用注册模块 121使服务方 Web应 用在操作系统中进行注册, 进而原生应用调用模块 122接收请求方原生应 用的服务发现请求, 并查找服务方原生应用和服务方 Web 应用, 解决了 原生应用用于发现、 调用服务方 Web 应用的问题, 使得用户在使用原生 应用的过程中, 可以有更多的选择权, 如可以自由选择合适的服务方原生 应用或服务方 Web应用来处理响应的请求, 进而可以充分利用网络中种 类繁多、 功能丰富的服务方 Web应用。  The operating system in this embodiment uses the web application registration module 121 to register the servant web application in the operating system, and the native application invoking module 122 receives the service discovery request of the requesting party's native application, and looks up the servant's native application and servant. The web application solves the problem that the native application is used to discover and invoke the servant web application, so that the user can have more options in the process of using the native application, such as freely selecting the appropriate servant native application or servant. The web application handles the response request, which in turn can make full use of the wide variety of feature-rich service-side web applications in the network.
另一种应用场景中, Web应用注册模块本身即为一安装在操作系统中 的原生应用, 此时, Web应用注册模块可具有需要较高的系统权限, 以实 现 Web 应用程序的安装文件的生成、 签名和打包。 或者该应用本身即为 一系统应用, 自然具备 Web应用程序的安装文件的生成、 签名和打包所 需要的权限。 上述实施例的优点是可以简化对操作系统的更改, 降低了系 统实现对操作系统的依赖性。  In another application scenario, the web application registration module itself is a native application installed in the operating system. At this time, the web application registration module may have a higher system authority to implement the generation of the web application installation file. , signature and packaging. Or the application itself is a system application that naturally has the necessary permissions to generate, sign, and package the installation files for the web application. The above embodiments have the advantage of simplifying changes to the operating system and reducing the dependency of the system on the operating system.
图 9示出了本发明一实施例中的浏览器的结构示意图, 如图 9所示, 本实施例中的浏览器包括: Web应用调用模块 112, 用于在用户根据呈现 的服务方原生应用和服务方 Web应用所选择的应用为服务方 Web应用中 的 Web 应用以处理请求方原生应用发送的服务发现请求时, 接收操作系 统发送的应用调用请求, 所述应用调用请求包括: 所选择的 Web 应用的 地址; 才艮据所选择的 Web应用的地址打开所选择的 Web应用的地址对应 的服务方 Web应用。  FIG. 9 is a schematic structural diagram of a browser in an embodiment of the present invention. As shown in FIG. 9, the browser in this embodiment includes: a web application invoking module 112, configured to be used by a user according to a presented service provider. And the application selected by the servant web application is a service application sent by the operating system when the web application in the servant web application processes the service discovery request sent by the requesting party's native application, where the application call request includes: the selected The address of the web application; the web application corresponding to the address of the selected web application is opened according to the address of the selected web application.
在 Android操作系统中,上述的应用调用请求可包括服务方 Web应用 的地址和待处理的数据, 此时, Web应用调用模块 112根据服务方 Web 应用的地址打开服务方 Web应用的地址对应的服务方 Web应用, 以使服 务方 Web 应用处理上述的数据, 并将所述待处理的数据发送给所打开的 服务方 Web应用进行处理。 可以理解的是, 图 9中的 Web应用调用模块 112接收原生应用调用 模块 122发送的服务方 Web应用的地址和待处理的数据,根据服务方 Web 应用的地址打开对应的服务方 Web 应用, 并将待处理的数据发送给上述 服务方 Web应用, 并获取对上述数据的处理结果, 再釆用之前所述方法, 如通过 setResult()方法将处理结果返回给请求方原生应用。 In the Android operating system, the application call request may include the address of the servant web application and the data to be processed. At this time, the web application invoking module 112 opens the service corresponding to the address of the servant web application according to the address of the servant web application. The web application, so that the servant web application processes the above data, and sends the to-be-processed data to the opened servant web application for processing. It can be understood that the web application invoking module 112 in FIG. 9 receives the address of the servant web application sent by the native application invoking module 122 and the data to be processed, and opens the corresponding servant web application according to the address of the servant web application, and The data to be processed is sent to the above-mentioned server web application, and the processing result of the above data is obtained, and the previously described method is used, for example, the processing result is returned to the requesting party's native application through the setResult() method.
通过原生应用调用模块 122和 Web应用调用模块 1 12间的上述通信 方式, 可以实现 Web 应用和原生应用之间复杂数据交互, 进而实现两者 的深度集成, 原生应用开发者可以通过灵活调用已安装的原生应用或网络 上已存在的 Web 应用实现丰富的功能, 从而降低开发者的工作量, 缩短 开发周期。 另一方面, 也可以保持与已有操作系统的数据交互方式的一致 性。  Through the above communication method between the native application invoking module 122 and the web application invoking module 12, complex data interaction between the web application and the native application can be realized, thereby achieving deep integration between the two, and the native application developer can be installed by flexible calling. A native application or a web application that already exists on the network implements rich functionality, reducing developer workload and shortening development cycles. On the other hand, it is also possible to maintain consistency with the way data is exchanged with existing operating systems.
进一步地, 如图 10所示, 本实施例中的浏览器还包括: Web应用安 装模块 111 , 用于向操作系统发送服务方 Web应用的注册请求, 所述注册 请求包括: 服务方 Web应用的信息, 所述操作系统中的 Web应用注册模 块根据所述服务方 Web 应用的信息编辑所述操作系统中所述浏览器的注 册信息, 以使所述服务方 Web应用能够被所述操作系统查找。  Further, as shown in FIG. 10, the browser in this embodiment further includes: a web application installation module 111, configured to send a registration request of the service provider web application to the operating system, where the registration request includes: The web application registration module in the operating system edits the registration information of the browser in the operating system according to the information of the web application of the server, so that the web application of the server can be searched by the operating system. .
或者, 本实施例中的浏览器还包括: Web应用安装模块 1 11 , 用于向 操作系统发送服务方 Web 应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息, 操作系统中的 Web应用注册模块根据所述服务方 Web 应用的信息生成与所述服务方 Web应用对应的 Web应用关联程序的安装 文件, 并执行所述安装文件, 得到在操作系统中注册的 Web 应用关联程 序 15 (如图 12所示 ) 。  Alternatively, the browser in this embodiment further includes: a web application installation module 1 11, configured to send a registration request of the service provider web application to the operating system, where the registration request includes: information of the service provider web application, in the operating system The web application registration module generates an installation file of the web application association program corresponding to the server web application according to the information of the server web application, and executes the installation file to obtain a web application association program registered in the operating system. (As shown in Figure 12).
也就是说, 操作系统的 Web应用注册模块 121从浏览器的 Web应用 安装模块 111接收所安装服务方 Web应用的服务类别、 数据类型和服务 方 Web 应用的地址等, 并根据上述参数和数据动态生成并安装与该服务 方 Web应用对应的 Web应用关联程序的安装文件, 执行所述安装文件, 得到服务方 Web应用在操作系统中注册的 Web应用关联程序。  That is, the web application registration module 121 of the operating system receives the service category, the data type, and the address of the server web application of the installed web application from the web application installation module 111 of the browser, and dynamically according to the above parameters and data. The installation file of the web application association program corresponding to the servant web application is generated and installed, and the installation file is executed to obtain a web application association program registered by the servant web application in the operating system.
举例来说, Web应用关联程序 15安装后可以不显示桌面图标, 在运 行时也可以不显示用户界面, 但可以通过操作系统的应用管理功能进行管 理, 如删除该 Web应用关联程序等。 以 Android系统为例, 由 Web应用注册模块 121生成的 Web应用关 联程序 15应包含 AndroidManifest.xml声明文件, 并在其中声明包含对应 服务方 Web 应用支持的服务类别、 数据类型等参数的广播接收器, 举例 ^口下: For example, the web application association program 15 may not display the desktop icon after installation, and may not display the user interface at runtime, but may be managed by the application management function of the operating system, such as deleting the web application association program. Taking the Android system as an example, the web application association program 15 generated by the web application registration module 121 should include an AndroidManifest.xml declaration file, and declare a broadcast receiver containing parameters such as a service category and a data type supported by the web application of the service provider. , for example ^ below:
<receiver android:name=".MyMusicPlayer">  <receiver android:name=".MyMusicPlayer">
<intent-filter>  <intent-filter>
<action android:name="android. intent. action. View"/>  <action android:name="android. intent. action. View"/>
<data android:type="audio/mpeg" android:scheme="http" .../>  <data android:type="audio/mpeg" android:scheme="http" .../>
<category android:name="android. Intent. Category. DEFAULT"/>  <category android:name="android. Intent. Category. DEFAULT"/>
</intent-filter>  </intent-filter>
</receiver>  </receiver>
声明了上述广播接收器的 Web应用关联程序将对播放 mpeg格式音乐 的请求方原生应用的服务发现请求做出响应, 当 Web 应用关联程序被触 发后, 则可以通过如下方式向对应的 Web应用发送数据:  Declaring that the web application association program of the above broadcast receiver responds to the service discovery request of the native application of the requester playing the mpeg format music, and after the web application association program is triggered, the web application association program may be sent to the corresponding web application as follows: Data:
Uri uri = Uri.parse("http:〃 www.url-shorter.com/service?url=***");  Uri uri = Uri.parse("http:〃 www.url-shorter.com/service?url=***");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);  Intent intent = new Intent(Intent.ACTION_VIEW, uri);
start Activity (intent);  Start Activity (intent);
在本实施例中, 如果需要传递图片或二进制文件等复杂数据内容, 则 可以通过 Web应用关联程序 15向 Web应用传递数据对象的存储标识,如 联系人名称 , Web应用网页可以通过 HTML5的 Device API或 File API等 方式获取具体的数据内容。  In this embodiment, if a complex data content such as a picture or a binary file needs to be transferred, the storage identifier of the data object, such as a contact name, may be transmitted to the web application through the web application association program 15, and the web application webpage may pass the Device API of HTML5. Or the File API to obtain specific data content.
釆用本实施例的好处是不需对操作系统中浏览器的注册信息进行动 态的修改, 可以简化对操作系统功能的变更。  The advantage of this embodiment is that dynamic modification of the browser registration information in the operating system is not required, and the change of the operating system function can be simplified.
根据本发明的另一方面, 本发明还提供一种终端, 其中, 包括上述任 一所述的操作系统和上述任一所述的浏览器, 操作系统和所述浏览器通 信。  According to another aspect of the present invention, the present invention provides a terminal, comprising the operating system of any of the above, and the browser, the operating system and the browser communication of any of the above.
优选地, 图 1 1和图 12分别示出一种终端的结构示意图, 图 12和图 12中的终端均包括: 浏览器 11、 操作系统 12 , 以及连接操作系统 12的请 求方原生应用 13、 服务方原生应用 14; 本实施例中的请求方原生应用 13 和服务方原生应用 14均是在操作系统中注册之后的应用。 图 11和图 12不同的是, 图 11中还包括在操作系统中注册的 Web应 用关联程序 15 , 此时 Web应用关联程序与在操作系统中注册的原生应用 (请求方原生应用、 服务方原生应用) 是一致的。 Preferably, FIG. 11 and FIG. 12 respectively show a schematic structural diagram of a terminal, and the terminals in FIG. 12 and FIG. 12 each include: a browser 11, an operating system 12, and a requestor native application 13 connected to the operating system 12, The servant native application 14; the requestor native application 13 and the servant native application 14 in this embodiment are both applications registered in the operating system. 11 and FIG. 12, FIG. 11 further includes a web application association program 15 registered in the operating system, where the web application association program and the native application registered in the operating system (requester native application, service party native) Application) is consistent.
需要说明的是, 在图 11中, 服务方 Web应用在操作系统中的注册信 息是携带在浏览器的注册信息中。  It should be noted that, in FIG. 11, the registration information of the servant web application in the operating system is carried in the registration information of the browser.
在图 11和图 12中, 在操作系统中注册的服务方 Web应用均可被操 作系统的注册表查找。  In Figures 11 and 12, the servant web application registered in the operating system can be looked up by the registry of the operating system.
由此, 上述终端能够实现 Native应用调用 Web应用的目的。  Thus, the above terminal can achieve the purpose of the Native application calling the Web application.
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分 步骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算 机可读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的步 骤; 而前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存 储程序代码的介质。  One of ordinary skill in the art will appreciate that all or part of the steps to implement the various method embodiments described above can be accomplished by hardware associated with the program instructions. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the above method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非 对其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的 普通技术人员应当理解: 其依然可以对前述各实施例所记载的技术方案进 行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或 者替换, 并不使相应技术方案的本质脱离本发明各实施例技术方案的范 围。  It should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims

权 利 要 求 书 claims
1、 一种应用调用的方法, 其特征在于, 包括: 1. A method for application calling, characterized by including:
操作系统接收请求方原生应用发送的服务发现请求, 根据所述服务发 现请求查找能够处理该服务发现请求的服务方原生应用和服务方 Web 应 用, 并呈现所述查找到的服务方原生应用和服务方 Web应用; The operating system receives the service discovery request sent by the requester's native application, searches for the server's native application and server's Web application that can handle the service discovery request according to the service discovery request, and presents the found server's native application and service. Party Web application;
在确定用户根据所述呈现的服务方原生应用和服务方 Web 应用所选 择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所述应用 调用请求包括所选择的 Web应用的地址, 以使所述浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应的 Λ良务方 Web应用。 When it is determined that the application selected by the user based on the presented server native application and server Web application is the server Web application, an application call request is sent to the browser, and the application call request includes the address of the selected Web application, In this way, the browser opens the Λ-server Web application corresponding to the address of the selected Web application according to the address of the selected Web application.
2、 根据权利要求 1 所述的方法, 其特征在于, 所述服务发现请求包 括: 服务类别; 2. The method according to claim 1, characterized in that the service discovery request includes: service category;
所述根据所述服务发现请求查找能够处理该服务发现请求的服务方 原生应用和服务方 Web应用, 具体包括: Searching for service-side native applications and service-side Web applications that can handle the service discovery request based on the service discovery request, specifically includes:
根据所述服务类别查找能够处理该服务发现请求的服务方原生应用 和服务方 Web应用。 Find the server native application and server web application that can handle the service discovery request based on the service category.
3、 根据权利要求 1 所述的方法, 其特征在于, 所述服务发现请求包 括: 服务类别和数据类型; 3. The method according to claim 1, characterized in that the service discovery request includes: service category and data type;
所述根据所述服务发现请求查找能够处理该服务发现请求的服务方 原生应用和服务方 Web应用, 具体包括: Searching for service-side native applications and service-side Web applications that can handle the service discovery request based on the service discovery request, specifically includes:
根据所述服务类别和数据类型查找能够处理该服务发现请求的服务 方原生应用和 Λ良务方 Web应用。 Find the server native application and Λgood server Web application that can handle the service discovery request according to the service category and data type.
4、 根据权利要求 2或 3所述的方法, 其特征在于, 所述服务发现请 求进一步包括: 待处理的数据; 4. The method according to claim 2 or 3, characterized in that the service discovery request further includes: data to be processed;
其中, 所述应用调用请求包括所选择的 Web 应用的地址, 以使所述 浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应 的服务方 Web应用, 具体包括: Wherein, the application call request includes the address of the selected Web application, so that the browser opens the server Web application corresponding to the address of the selected Web application according to the address of the selected Web application, specifically including:
所述应用调用请求包括所选择的 Web 应用的地址和所述待处理的数 据, 以使所述浏览器根据所选择的 Web应用的地址打开所选择的 Web应 用的地址对应的服务方 Web应用, 并将所述待处理的数据发送给所打开 的服务方 Web应用进行处理。 The application call request includes the address of the selected Web application and the data to be processed, so that the browser opens the server Web application corresponding to the address of the selected Web application according to the address of the selected Web application, And the data to be processed is sent to the opened server Web application for processing.
5、 根据权利要求 1 所述的方法, 其特征在于, 所述服务发现请求包 括: 服务类别、 数据类型和待处理的数据; 5. The method according to claim 1, characterized in that the service discovery request includes: service category, data type and data to be processed;
所述根据所述服务发现请求查找能够处理该服务发现请求的服务方 原生应用和服务方 Web应用, 具体包括: Searching for service-side native applications and service-side Web applications that can handle the service discovery request based on the service discovery request, specifically includes:
根据所述服务类别和数据类型查找能够处理所述待处理的数据的服 务方原生应用和 Λ良务方 Web应用; Find the server native application and the good server Web application that can process the data to be processed according to the service category and data type;
其中, 所述应用调用请求包括所选择的 Web 应用的地址, 以使所述 浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应 的服务方 Web应用, 具体包括: Wherein, the application call request includes the address of the selected Web application, so that the browser opens the server Web application corresponding to the address of the selected Web application according to the address of the selected Web application, specifically including:
所述应用调用请求包括所选择的 Web 应用的地址和所述待处理的数 据, 以使所述浏览器根据所选择的 Web应用的地址打开所选择的 Web应 用的地址对应的服务方 Web应用, 并将所述待处理的数据发送给所打开 的服务方 Web应用进行处理。 The application call request includes the address of the selected Web application and the data to be processed, so that the browser opens the server Web application corresponding to the address of the selected Web application according to the address of the selected Web application, And the data to be processed is sent to the opened server Web application for processing.
6、 根据权利要求 1至 5任一所述的方法, 其特征在于, 所述操作系 统接收请求方原生应用发送的服务发现请求之前, 进一步包括: 6. The method according to any one of claims 1 to 5, characterized in that, before the operating system receives the service discovery request sent by the requesting party's native application, it further includes:
所述操作系统接收所述浏览器发送的服务方 Web 应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息; The operating system receives the registration request of the server Web application sent by the browser, and the registration request includes: information of the server Web application;
所述操作系统根据所述服务方 Web 应用的信息编辑所述操作系统中 所述浏览器的注册信息, 以使所述服务方 Web 应用能够被所述操作系统 查找。 The operating system edits the registration information of the browser in the operating system according to the information of the server Web application, so that the server Web application can be searched by the operating system.
7、 根据权利要求 1或 5任一所述的方法, 其特征在于, 所述操作系 统接收请求方原生应用发送的服务发现请求之前, 进一步包括: 7. The method according to claim 1 or 5, wherein before the operating system receives the service discovery request sent by the requesting party's native application, it further includes:
所述操作系统接收所述浏览器发送的服务方 Web 应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息; The operating system receives the registration request of the server Web application sent by the browser, and the registration request includes: information of the server Web application;
所述操作系统根据所述服务方 Web 应用的信息生成与所述服务方 The operating system generates information related to the server's web application based on the information of the server's web application.
Web应用对应的 Web应用关联程序的安装文件, 并执行所述安装文件, 得到在操作系统中注册的 Web应用关联程序。 The installation file of the Web application associated program corresponding to the Web application is executed, and the Web application associated program registered in the operating system is obtained.
8、 根据权利要求 7 所述的方法, 其特征在于, 所述根据所述服务发 现请求查找能够处理该服务发现请求的服务方原生应用和服务方 Web 应 用, 具体包括: 根据所述服务发现请求在所述操作系统中查找能够处理该服务发现 请求的服务方原生应用和所述服务方 Web应用对应的 Web应用关联程序; 其中, 呈现所查找到的服务方原生应用和服务方 Web 应用, 具体包 括: 呈现所查找到的服务方原生应用和所述服务方 Web应用对应的 Web 应用关联程序; 8. The method according to claim 7, characterized in that: searching for a server native application and a server Web application capable of processing the service discovery request according to the service discovery request specifically includes: Search the operating system according to the service discovery request for a server native application capable of processing the service discovery request and a Web application associated program corresponding to the server Web application; wherein, the found server native application and The server Web application specifically includes: presenting the found server native application and the Web application associated program corresponding to the server Web application;
其中, 在确定用户根据所述呈现的服务方原生应用和服务方 Web 应 用所选择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所 述应用调用请求包括所选择的 Web 应用的地址, 具体包括: 在确定用户 根据所述呈现的服务方原生应用和所述服务方 Web应用对应的 Web应用 关联程序所选择的应用为所述服务方 Web应用对应的 Web应用关联程序 时, 运行所述服务方 Web 应用对应的 Web 应用关联程序, 所述服务方 Web应用对应的 Web应用关联程序向浏览器发送所述应用调用请求, 所 述应用调用请求包括所述服务方 Web应用对应的 Web应用关联程序对应 的所述服务方 Web应用的地址。 Wherein, when it is determined that the application selected by the user based on the presented server native application and server Web application is the server Web application, an application call request is sent to the browser, and the application call request includes the selected Web application. The address specifically includes: When it is determined that the application selected by the user based on the presented server native application and the Web application associated program corresponding to the server Web application is the Web application associated program corresponding to the server Web application, run The Web application associated program corresponding to the server Web application. The Web application associated program corresponding to the server Web application sends the application call request to the browser. The application call request includes the Web application corresponding to the server Web application. The address of the server's web application corresponding to the application associated program.
9、 根据权利要求 7 所述的方法, 其特征在于, 所述操作系统根据所 述服务方 Web应用的信息生成与所述服务方 Web应用对应的 Web应用关 联程序的安装文件, 包括: 9. The method according to claim 7, wherein the operating system generates an installation file of a Web application associated program corresponding to the server Web application based on the information of the server Web application, including:
根据所述服务方 Web应用的信息生成所述 Web应用关联程序的源文 件, 对所述源文件进行编译, 将编译后的源文件编码转换成在所述操作系 统中能够执行的字节码, 将所述字节码打包成 Web 应用关联程序的安装 文件, 执行所述安装文件, 得到在操作系统中注册的与所述服务方 Web 应用对应的 Web应用关联程序。 Generate the source file of the Web application associated program according to the information of the server Web application, compile the source file, and convert the compiled source file encoding into bytecode that can be executed in the operating system, The bytecode is packaged into an installation file of the Web application associated program, and the installation file is executed to obtain the Web application associated program registered in the operating system and corresponding to the server Web application.
10、 根据权利要求 1至 5任一所述的方法, 其特征在于, 所述操作系 统接收请求方原生应用发送的服务发现请求之前, 进一步包括: 10. The method according to any one of claims 1 to 5, characterized in that, before the operating system receives the service discovery request sent by the requesting party's native application, it further includes:
所述操作系统接收所述浏览器发送的服务方 Web 应用的注册请求, 所述注册请求包括: 服务方 Web应用的信息; The operating system receives the registration request of the server Web application sent by the browser, and the registration request includes: information of the server Web application;
所述操作系统将所述服务方 Web 应用的信息发送至网络侧服务器, 以使所述网络侧服务器根据所述服务方 Web 应用的信息生成与所述服务 方 Web应用对应的 Web应用关联程序的安装文件; The operating system sends the information of the server Web application to the network side server, so that the network side server generates a Web application associated program corresponding to the server Web application based on the information of the server Web application. installation files;
所述操作系统接收所述网络侧服务器发送的所述 Web 应用关联程序 的安装文件, 执行所述 Web应用关联程序的安装文件, 得到在操作系统 中注册的 Web 应用关联程序; 或者, 所述操作系统从所述网络侧服务器 下载所述 Web应用关联程序的安装文件, 执行所述下载的 Web应用关联 程序的安装文件, 得到在操作系统中注册的 Web应用关联程序。 The operating system receives the Web application associated program sent by the network side server The installation file, execute the installation file of the Web application associated program, and obtain the Web application associated program registered in the operating system; or, the operating system downloads the installation file of the Web application associated program from the network side server, Execute the downloaded installation file of the Web application associated program to obtain the Web application associated program registered in the operating system.
11、 根据权利要求 10所述的方法, 其特征在于, 所述根据所述服务 发现请求查找能够处理该服务发现请求的服务方原生应用和服务方 Web 应用, 具体包括: 11. The method according to claim 10, characterized in that, searching for a service-side native application and a service-side Web application capable of processing the service discovery request according to the service discovery request, specifically includes:
根据所述服务发现请求在所述操作系统中查找能够处理该服务发现 请求的服务方原生应用和所述服务方 Web应用对应的 Web应用关联程序; 其中, 呈现所查找到的服务方原生应用和服务方 Web 应用, 具体包 括: 呈现所查找到的服务方原生应用和所述服务方 Web应用对应的 Web 应用关联程序; Search the operating system according to the service discovery request for a server native application capable of processing the service discovery request and a Web application associated program corresponding to the server Web application; wherein, the found server native application and The server Web application specifically includes: presenting the found server native application and the Web application associated program corresponding to the server Web application;
其中, 在确定用户根据所述呈现的服务方原生应用和服务方 Web 应 用所选择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所 述应用调用请求包括所选择的 Web 应用的地址, 具体包括: 在确定用户 根据所述呈现的服务方原生应用和所述服务方 Web应用对应的 Web应用 关联程序所选择的应用为所述服务方 Web应用对应的 Web应用关联程序 时, 运行所述服务方 Web 应用对应的 Web 应用关联程序, 所述服务方 Web应用对应的 Web应用关联程序向浏览器发送所述应用调用请求, 所 述应用调用请求包括所述服务方 Web应用对应的 Web应用关联程序对应 的所述服务方 Web应用的地址。 Wherein, when it is determined that the application selected by the user based on the presented server native application and server Web application is the server Web application, an application call request is sent to the browser, and the application call request includes the selected Web application. The address specifically includes: When it is determined that the application selected by the user based on the presented server native application and the Web application associated program corresponding to the server Web application is the Web application associated program corresponding to the server Web application, run The Web application associated program corresponding to the server Web application. The Web application associated program corresponding to the server Web application sends the application call request to the browser. The application call request includes the Web application corresponding to the server Web application. The address of the server's web application corresponding to the application associated program.
12、 一种操作系统, 其特征在于, 包括: 12. An operating system, characterized by including:
原生应用调用模块, 用于接收请求方原生应用发送的服务发现请求, 根据所述服务发现请求查找能够处理该服务发现请求的服务方原生应用 和服务方 Web应用, 并呈现所述查找到的服务方原生应用和服务方 Web 应用; The native application calling module is used to receive a service discovery request sent by the requesting party's native application, find the server's native application and the server's Web application that can handle the service discovery request according to the service discovery request, and present the found service. Party native applications and server side Web applications;
在确定用户根据所述呈现的服务方原生应用和服务方 Web 应用所选 择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所述应用 调用请求包括所选择的 Web应用的地址, 以使所述浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应的 Web应用。 When it is determined that the application selected by the user based on the presented server native application and server Web application is the server Web application, an application call request is sent to the browser, and the application call request includes the address of the selected Web application, So that the browser opens the Web application corresponding to the address of the selected Web application according to the address of the selected Web application.
13、 根据权利要求 12所述的操作系统, 其特征在于, 所述服务发现 请求包括: 服务类别; 13. The operating system according to claim 12, wherein the service discovery request includes: service category;
所述原生应用调用模块进一步用于: The native application calling module is further used to:
接收请求方原生应用发送的服务发现请求, 根据所述服务发现请求中 的服务类别查找能够处理该服务发现请求的服务方原生应用和服务方 Web应用, 并呈现所述查找到的服务方原生应用和服务方 Web应用。 Receive a service discovery request sent by the requester's native application, search for the server's native application and server's Web application that can handle the service discovery request according to the service category in the service discovery request, and present the found server's native application. and server web applications.
14、 根据权利要求 12所述的操作系统, 其特征在于, 所述服务发现 请求包括: 服务类别和数据类型时, 14. The operating system according to claim 12, wherein the service discovery request includes: service category and data type,
所述原生应用调用模块进一步用于: The native application calling module is further used to:
接收请求方原生应用发送的服务发现请求, 根据所述服务发现请求中 所述服务类别和数据类型查找能够处理该服务发现请求的服务方原生应 用和服务方 Web应用 ,并呈现所述查找到的服务方原生应用和服务方 Web 应用。 Receive a service discovery request sent by the requester's native application, search for the server's native application and server's Web application that can handle the service discovery request according to the service category and data type in the service discovery request, and present the found Server-side native applications and server-side web applications.
15、 根据权利要求 13或 14所述的操作系统, 其特征在于, 所述服务 发现请求进一步包括:待处理的数据,所述原生应用调用模块进一步用于: 在确定用户根据所述呈现的服务方原生应用和服务方 Web 应用所选 择的应用为服务方 Web 应用时, 向浏览器发送应用调用请求, 所述应用 调用请求包括所选择的 Web应用的地址和所述待处理的数据, 以使所述 浏览器根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应 的服务方 Web应用, 并将所述待处理的数据发送给所打开的服务方 Web 应用进行处理。 15. The operating system according to claim 13 or 14, characterized in that, the service discovery request further includes: data to be processed, and the native application calling module is further configured to: determine whether the user has received the service according to the presented service. When the application selected by the client's native application and the server's Web application is the server's Web application, an application call request is sent to the browser, and the application call request includes the address of the selected Web application and the data to be processed, so that The browser opens the server Web application corresponding to the address of the selected Web application according to the address of the selected Web application, and sends the data to be processed to the opened server Web application for processing.
16、 根据权利要求 12至 15任一所述的操作系统, 其特征在于, 进一 步包括: 16. The operating system according to any one of claims 12 to 15, further comprising:
Web应用注册模块, 用于接收所述浏览器发送的服务方 Web应用的 注册请求, 所述注册请求包括: 服务方 Web应用的信息; A Web application registration module, configured to receive a registration request for a server Web application sent by the browser, where the registration request includes: information about the server Web application;
所述 Web应用注册模块根据所述服务方 Web应用的信息编辑操作系 统中所述浏览器的注册信息, 以使所述服务方 Web 应用能够被所述操作 系统查找。 The Web application registration module edits the registration information of the browser in the operating system according to the information of the server Web application, so that the server Web application can be found by the operating system.
17、 根据权利要求 12至 15任一所述的操作系统, 其特征在于, 进一 步包括: Web应用注册模块, 用于接收所述浏览器发送的服务方 Web应用的 注册请求, 所述注册请求包括: 服务方 Web应用的信息; 17. The operating system according to any one of claims 12 to 15, further comprising: A Web application registration module, configured to receive a registration request for a server Web application sent by the browser, where the registration request includes: information about the server Web application;
所述 Web应用注册模块根据所述服务方 Web应用的信息生成与所述 服务方 Web应用对应的 Web应用关联程序的安装文件, 并执行所述安装 文件, 得到服务方 Web应用在操作系统中注册的 Web应用关联程序。 The Web application registration module generates an installation file of a Web application associated program corresponding to the server Web application according to the information of the server Web application, and executes the installation file to obtain the server Web application registered in the operating system. Web application associated program.
18、 根据权利要求 17 所述的操作系统, 其特征在于, 所述原生应用 调用模块, 进一步用于: 18. The operating system according to claim 17, characterized in that the native application calling module is further used to:
根据所述服务发现请求在所述操作系统中查找能够处理该服务发现 请求的服务方原生应用和所述服务方 Web应用对应的 Web应用关联程序; 其中, 呈现所查找到的服务方原生应用和所述服务方 Web 应用对应 的 Web应用关联程序; Search the operating system according to the service discovery request for a server native application capable of processing the service discovery request and a Web application associated program corresponding to the server Web application; wherein, the found server native application and The Web application associated program corresponding to the server's Web application;
所述原生应用调用模块在确定用户根据所述呈现的服务方原生应用 和所述服务方 Web应用对应的 Web应用关联程序所选择的应用为所述服 务方 Web应用对应的 Web应用关联程序时,运行所述服务方 Web应用对 应的 Web应用关联程序,所述服务方 Web应用对应的 Web应用关联程序 向浏览器发送所述应用调用请求,所述应用调用请求包括所述服务方 Web When the native application calling module determines that the application selected by the user based on the presented server native application and the Web application associated program corresponding to the server Web application is the Web application associated program corresponding to the server Web application, Run the Web application associated program corresponding to the server Web application, and the Web application associated program corresponding to the server Web application sends the application call request to the browser, and the application call request includes the server Web application.
19、 根据权利要求 17所述的操作系统, 其特征在于, 所述 Web应用 注册模块, 进一步用于: 19. The operating system according to claim 17, characterized in that the Web application registration module is further used to:
根据所述服务方 Web应用的信息生成所述 Web应用关联程序的源文 件, 对所述源文件进行编译, 将编译后的源文件编码转换成在所述操作系 统中能够执行的字节码, 将所述字节码打包成 Web 应用关联程序的安装 文件, 执行所述安装文件, 得到在操作系统中注册的与所述服务方 Web 应用对应的 Web应用关联程序。 Generate the source file of the Web application associated program according to the information of the server Web application, compile the source file, and convert the compiled source file encoding into bytecode that can be executed in the operating system, The bytecode is packaged into an installation file of the Web application associated program, and the installation file is executed to obtain the Web application associated program registered in the operating system and corresponding to the server Web application.
20、 根据权利要求 12至 15任一所述的操作系统, 其特征在于, 20. The operating system according to any one of claims 12 to 15, characterized in that,
Web应用注册模块, 用于接收所述浏览器发送的服务方 Web应用的 注册请求, 所述注册请求包括: 服务方 Web应用的信息; A Web application registration module, configured to receive a registration request for a server Web application sent by the browser, where the registration request includes: information about the server Web application;
所述 Web应用注册模块将所述服务方 Web应用的信息发送至网络侧 服务器, 以使所述网络侧服务器根据所述服务方 Web 应用的信息生成与 所述服务方 Web应用对应的 Web应用关联程序的安装文件; 所述 Web应用注册模块接收所述网络侧服务器发送的所述 Web应用 关联程序的安装文件, 执行所述 Web 应用关联程序的安装文件, 得到在 操作系统中注册的 Web应用关联程序; 或者, 所述 Web应用注册模块从 所述网络侧服务器下载所述 Web 应用关联程序的安装文件, 执行所述下 载的 Web应用关联程序的安装文件, 得到在操作系统中注册的 Web应用 关联程序。 The Web application registration module sends the information of the server Web application to the network side server, so that the network side server generates a Web application association corresponding to the server Web application based on the information of the server Web application. Program installation files; The Web application registration module receives the installation file of the Web application associated program sent by the network side server, executes the installation file of the Web application associated program, and obtains the Web application associated program registered in the operating system; or, The Web application registration module downloads the installation file of the Web application associated program from the network side server, executes the downloaded installation file of the Web application associated program, and obtains the Web application associated program registered in the operating system.
21、 根据权利要求 20所述的操作系统, 其特征在于, 所述原生应用 调用模块, 进一步用于: 21. The operating system according to claim 20, characterized in that the native application calling module is further used for:
根据所述服务发现请求在所述操作系统中查找能够处理该服务发现 请求的服务方原生应用和所述服务方 Web应用对应的 Web应用关联程序; 其中, 呈现所查找到的服务方原生应用和所述服务方 Web 应用对应 的 Web应用关联程序; Search the operating system according to the service discovery request for a server native application capable of processing the service discovery request and a Web application associated program corresponding to the server Web application; wherein, the found server native application and The Web application associated program corresponding to the server's Web application;
所述原生应用调用模块在确定用户根据所述呈现的服务方原生应用 和所述服务方 Web应用对应的 Web应用关联程序所选择的应用为所述服 务方 Web应用对应的 Web应用关联程序时,运行所述服务方 Web应用对 应的 Web应用关联程序,所述服务方 Web应用对应的 Web应用关联程序 向浏览器发送所述应用调用请求,所述应用调用请求包括所述服务方 Web When the native application calling module determines that the application selected by the user based on the presented server native application and the Web application associated program corresponding to the server Web application is the Web application associated program corresponding to the server Web application, Run the Web application associated program corresponding to the server Web application, and the Web application associated program corresponding to the server Web application sends the application call request to the browser, and the application call request includes the server Web application.
22、 一种浏览器, 其特征在于, 包括: 22. A browser, characterized by including:
Web应用调用模块,用于在用户根据呈现的服务方原生应用和服务方 The web application calling module is used to call the user's native application and server based on the server presented.
Web应用所选择的应用为服务方 Web应用处理请求方原生应用发送的服 务发现请求时, 接收操作系统发送的应用调用请求, 所述应用调用请求包 括: 所选择的 Web应用的地址; The application selected by the Web application is the server. When the Web application processes the service discovery request sent by the requester's native application, it receives an application call request sent by the operating system. The application call request includes: the address of the selected Web application;
所述 Web应用调用模块根据所选择的 Web应用的地址打开所选择的 Web应用的地址对应的月良务方 Web应用。 The Web application calling module opens the corresponding Web application corresponding to the address of the selected Web application according to the address of the selected Web application.
23、 根据权利要求 22所述的浏览器, 其特征在于, 还包括: 23. The browser according to claim 22, further comprising:
Web应用安装模块, 用于向操作系统发送服务方 Web应用的注册请 求, 所述注册请求包括: 服务方 Web 应用的信息, 以使所述操作系统根 据所述服务方 Web应用的信息编辑所述操作系统中的所述浏览器的注册 信息,或者根据所述 Web应用信息生成能够安装于所述操作系统中的 Web 应用关联程序。 The Web application installation module is configured to send a registration request of the server Web application to the operating system. The registration request includes: the information of the server Web application, so that the operating system edits the information of the server Web application according to the information of the server Web application. The registration information of the browser in the operating system, or generating a Web application that can be installed in the operating system based on the Web application information. Application associated program.
24、 一种终端, 其特征在于, 包括如上权利要求 12至 21任一所述的 操作系统和如上权利要求 22至 23任一所述的浏览器, 所述操作系统和所 述浏览器通信。 24. A terminal, characterized in that it includes an operating system as described in any one of claims 12 to 21 and a browser as described in any one of claims 22 to 23, and the operating system communicates with the browser.
PCT/CN2012/081600 2012-09-19 2012-09-19 Application invocation method, operating system and browser WO2014043864A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2012/081600 WO2014043864A1 (en) 2012-09-19 2012-09-19 Application invocation method, operating system and browser
CN201280001733.6A CN103917951B (en) 2012-09-19 2012-09-19 Application invocation method, operating system and browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/081600 WO2014043864A1 (en) 2012-09-19 2012-09-19 Application invocation method, operating system and browser

Publications (1)

Publication Number Publication Date
WO2014043864A1 true WO2014043864A1 (en) 2014-03-27

Family

ID=50340526

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/081600 WO2014043864A1 (en) 2012-09-19 2012-09-19 Application invocation method, operating system and browser

Country Status (2)

Country Link
CN (1) CN103917951B (en)
WO (1) WO2014043864A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105988846A (en) * 2015-03-03 2016-10-05 腾讯科技(深圳)有限公司 Page loading method and page loading device
CN106470276A (en) * 2016-08-23 2017-03-01 努比亚技术有限公司 A kind of system realizing data interaction, method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309399A (en) * 2020-02-26 2020-06-19 北京思特奇信息技术股份有限公司 Method, system, medium and device for starting easy-to-ask native client
CN115017436B (en) * 2022-08-05 2023-01-10 太平金融科技服务(上海)有限公司深圳分公司 Data interaction method and device of application program, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716251A (en) * 2004-06-07 2006-01-04 国际商业机器公司 Method and apparatus for accessing web services
US20090228779A1 (en) * 2008-03-04 2009-09-10 Richard John Williamson Use of remote services by a local wireless electronic device
CN101663647A (en) * 2007-04-25 2010-03-03 高通股份有限公司 Device that determines whether to launch an application locally or remotely as a webapp

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711832B1 (en) * 2003-09-22 2010-05-04 Actional Corporation Enabling existing desktop applications to access web services through the use of a web service proxy
US8214754B2 (en) * 2005-04-15 2012-07-03 Microsoft Corporation Registration of applications and complimentary features for interactive user interfaces
CN101488143A (en) * 2008-01-16 2009-07-22 重庆安软信息科技有限公司 Novel web application and local application interaction mode
CN102622211B (en) * 2011-01-27 2016-05-25 腾讯科技(深圳)有限公司 A kind of method and apparatus of application development

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716251A (en) * 2004-06-07 2006-01-04 国际商业机器公司 Method and apparatus for accessing web services
CN101663647A (en) * 2007-04-25 2010-03-03 高通股份有限公司 Device that determines whether to launch an application locally or remotely as a webapp
US20090228779A1 (en) * 2008-03-04 2009-09-10 Richard John Williamson Use of remote services by a local wireless electronic device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105988846A (en) * 2015-03-03 2016-10-05 腾讯科技(深圳)有限公司 Page loading method and page loading device
CN105988846B (en) * 2015-03-03 2019-11-05 腾讯科技(深圳)有限公司 Page loading method and page loading device
CN106470276A (en) * 2016-08-23 2017-03-01 努比亚技术有限公司 A kind of system realizing data interaction, method and device
CN106470276B (en) * 2016-08-23 2019-06-28 努比亚技术有限公司 A kind of system that realizing data interaction, method and device

Also Published As

Publication number Publication date
CN103917951A (en) 2014-07-09
CN103917951B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
EP2962216B1 (en) Sharing application states
KR101898170B1 (en) Automated service profiling and orchestration
JP5241440B2 (en) System and method for creating and communicating with component-based wireless applications
RU2503056C2 (en) Xml-based web feed for web access of remote sources
US7412518B1 (en) Method and apparatus for proximity discovery of services
US7716492B1 (en) Method and apparatus to obtain service capability credentials
US20140033170A1 (en) System and method of generating rest2rest services from wadl
WO2013097592A1 (en) Script loading technology
WO2012163123A1 (en) Application management method and application platform
US7418709B2 (en) URL namespace to support multiple-protocol processing within worker processes
WO2015035774A1 (en) Customization method and system for mobile terminal based on user space file system
KR20110053819A (en) Method and apparatus for providing pair play service
WO2014043864A1 (en) Application invocation method, operating system and browser
CN108156009B (en) Service calling method and device
CN112243016B (en) Middleware platform, terminal equipment, 5G artificial intelligence cloud processing system and processing method
Park et al. InterX: A service interoperability gateway for heterogeneous smart objects
Johansson et al. Web-based adaptive application mobility
US7418712B2 (en) Method and system to support multiple-protocol processing within worker processes
JP2008134914A (en) Composite service providing system and method
Chou et al. WIPdroid–a two-way web services and real-time communication enabled mobile computing platform for distributed services computing
WO2014107956A1 (en) Resource sharing method and device
Ruokonen et al. Describing mobile devices as RESTful services for the end-users
US11811878B1 (en) Session manager providing bidirectional data transport
EP2472828B1 (en) Method and system for implementing coordinated operation between web equipment and flash equipment
WO2006040991A1 (en) Terminal device, server device, and web service providing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12885084

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12885084

Country of ref document: EP

Kind code of ref document: A1