WO2018050040A1 - 实现web页面与本地应用通信的方法、装置和电子设备 - Google Patents
实现web页面与本地应用通信的方法、装置和电子设备 Download PDFInfo
- Publication number
- WO2018050040A1 WO2018050040A1 PCT/CN2017/101277 CN2017101277W WO2018050040A1 WO 2018050040 A1 WO2018050040 A1 WO 2018050040A1 CN 2017101277 W CN2017101277 W CN 2017101277W WO 2018050040 A1 WO2018050040 A1 WO 2018050040A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- local
- port number
- response
- web page
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9574—Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9558—Details of hyperlinks; Management of linked annotations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44536—Selecting among different versions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/543—Local
Definitions
- the present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and an electronic device for implementing communication between a web page and a native application (referred to as a local application).
- the promotion form is generally to deploy a promotion image (such as a banner image or a two-dimensional code) in the web page, and then directly add the promotion image.
- a link with a download prompt an action prompt
- a link with a download prompt pops up.
- the experience of this download prompt is obviously poor.
- the browser cannot personally adjust the operation prompt of the application in the web page requested by the user according to the actual application installation situation of the user terminal (for example, The application in the web page requested by the user terminal is an installed version on the user terminal, and the operation prompt of the application in the web page may be adjusted from “download” to “installed” and displayed to the user) to improve the user experience.
- the browser can implement indirect communication between web pages and local applications.
- the browser may first attempt to evoke a local application by using a url schema (uniform resource locator schema), and carry a uid (user identifier) on the url schema; after receiving the local application, the uid and the uid are The information that needs to be sent to the browser is sent to the server together; the server stores this, and the browser initiates polling to the server according to the uid.
- the server matches the information to the browser through the uid, and deletes the uid. information.
- the above indirect communication method requires that the url schema be registered for the local application, and the browser also supports the url schema, otherwise the local application cannot be evoked.
- the native application sends the uid and the information that needs to be transmitted to the web page to the server, and the web page obtains the uid from the server, network support is required. If a network abnormality occurs or the network is not good, it will be built. The failure of the uid in the transmission process causes the entire process to be interrupted, and the interruption is not known to the web page, the native application, and the server, and thus affects the user experience.
- the purpose of the embodiments of the present application is to provide a method, an apparatus, and an electronic device for implementing communication between a web page and a local application, so as to improve user experience.
- the embodiment of the present application provides a method for implementing communication between a web page and a local application, where the local application pre-opens a url bound to a specific port number on a local server located on the local terminal.
- the method includes the following steps:
- the first response includes the identifier of the application, the download link, and the version information, selecting a port number from the set of registered ports, and initiating an access request carrying the port number to the local server;
- the second response returned by the local server When the second response returned by the local server is received, determining, according to the identifier, whether the local application in the second response is the same application as the application in the first response; Describe the identity and version information of the local application;
- the operation prompt of the download link of the application is adjusted according to the version information of the local application and the version information of the application.
- the embodiment of the present application further provides an apparatus for implementing communication between a web page and a local application, where the local application opens a url service bound with a specific port number in advance on a local server located on the local terminal.
- the device includes:
- a first response receiving module configured to receive a first response returned by the web server based on a user-initiated web page access request
- the local access initiating module is configured to: when the first response includes the identifier of the application, the download link, and the version information, select a port number from the registered port set, and initiate the port number to the local server on the local terminal. Access request;
- An application identifier matching module when receiving the second response returned by the local server, Determining, according to the identifier, whether the local application in the second response is the same application as the application in the first response; the second response carrying the identifier and version information of the local application;
- An operation prompt adjustment module configured to: when the local application and the application are the same application, in the process of rendering a web page based on the first response, according to version information of the local application and a version of the application Information, adjusting the operation prompt of the download link of the application.
- the embodiment of the present application further provides an electronic device, including:
- a memory configured to store means for enabling a web page to communicate with a local application, the means for implementing the web page to communicate with the local application being executed by the processor, performing the following steps:
- the first response includes the identifier of the application, the download link, and the version information, select a port number from the set of registered ports, and initiate an access request carrying the port number to the local server on the local terminal;
- the second response returned by the local server When the second response returned by the local server is received, determining, according to the identifier, whether the local application in the second response is the same application as the application in the first response; Describe the identity and version information of the local application;
- the operation prompt of the download link of the application is adjusted according to the version information of the local application and the version information of the application.
- the browser client may select a port number from the registered port set, and initiate an access request carrying the port number to the local server on the local terminal.
- Obtaining data of the local application if the port number carried by the access request is a port that has been bound by the local application, the browser client can obtain the name and version information of the local application, thereby implementing the web page and the local application.
- FIG. 1 is a flowchart of a method for implementing communication between a web page and a local application according to an embodiment of the present application
- FIG. 2 is a flowchart of a method for implementing communication between a web page and a local application according to another embodiment of the present application
- FIG. 3 is a schematic diagram of a web page according to an embodiment of the present application (only the application part of the web page is drawn);
- FIG. 4 is a structural block diagram of an electronic device according to an embodiment of the present application.
- FIG. 5 is a structural block diagram of an apparatus for implementing communication between a web page and a local application according to an embodiment of the present application.
- the method for the local application to enable the url service in the embodiment of the present application includes the following steps:
- Step S101 Receive a first response returned by the web server based on a web page access request initiated by the user.
- Step S102 When the first response includes the name of the application, the download link, and the version information, select a port number from the registered port set, and initiate an access request carrying the port number to the local server on the local terminal.
- the first response returned by the web server includes the name, download link, and version information of the application.
- the download link may be a virtual button with an operation prompt, and the operation prompt may be, for example, “download”.
- the port number of the logical port of the server ranges from 0 to 65535, according to the TCP/IP protocol.
- These ports can be divided into well-known ports (the port number ranges from 0 to 1023), dynamic ports (the port number ranges from 49152 to 65535), and registered ports (the port number ranges from 1024 to 49151).
- the registered port can be fixedly assigned to a certain service. Therefore, in the embodiment of the present application, when the browser client takes the port number, a port number may be selected from the registered port set (ie, the range of 1024 to 49151), and the selection may be sequential or random. .
- One of the selected port numbers may be an unbound port number or a port number that has been bound.
- the binding refers to that the local application opens a url service bound with a specific port number on the local terminal in advance.
- the local application refers to an application that has been installed on a local terminal.
- the opening of the url service bound to the specific port number on the local terminal may be implemented as follows:
- the local application sends an instruction to the local server requesting the url service to bind the registered port.
- the local server selects a port number from the port number that has not been bound, and enables the url service bound to the port number for the local application; or ,
- the local server confirms that the binding fails.
- the url service with a specific port number bound to the local terminal is opened in advance, and can also be implemented as follows:
- the local application sends an instruction to the local server to request the binding of the url service of the registration port, where the local application sends the port number of the desired registration port to the local server.
- the port number that you want to bind is specified by the application developer in the application.
- the local server starts the url service binding the port number for the local application
- the local server selects a port number from the port number that has not been bound, and The local application starts the url service bound to the port number; or,
- the local server confirms that the binding fails.
- the url service with a specific port number bound to the local terminal is opened in advance, and can also be implemented as follows:
- the system monitors the installation status of the current application during its installation
- the triggering system sends a binding instruction to the local server to enable the url service bound to the specific port number for the current application;
- the local server selects a port number from the port number that has not been bound, and starts the url service bound to the port number for the current application. ;or,
- the local server confirms that the binding fails.
- the version information corresponding to the local application is also recorded. If some local applications have updates after binding, the local server will update the version information accordingly; and since the name of the local application has not changed after the update (for example, Alipay, it is still Alipay after the update), therefore, for local The application update does not need to re-bind the port number for the local application.
- the triggering system sends a unbinding command to the local server to release the port number bound to the local application to release the occupied port resource.
- the local server After receiving the unbinding command, the local server unbinds the application from the corresponding port number and updates the corresponding relationship table.
- the updating the foregoing correspondence table may be deleting the entire data column corresponding to the name of the application that has been uninstalled in the correspondence table, or may be the data corresponding to the name of the application that has been uninstalled in the corresponding relationship table. All data in the column except the name is deleted.
- Step S103 When the second response returned by the local server is received, determine whether the local application in the second response is the same application as the application in the first response, and the second response carries the local The name and version information of the app.
- Step S104 If the local application in the second response and the application in the first response are The same application, in the process of rendering the web page based on the first response, adjusting an operation prompt of the download link of the application according to the version information of the local application and the version information of the application.
- the same application refers to an application with the same name. For example, if a local application on the local terminal is Alipay, the same application in the first response is also an Alipay.
- the local server that sends the registered port to the local server on the local terminal may be in the form of: http://local terminal IP+registered port number.
- the name of the application is used as the identification identifier of the application.
- a character string or the like may also be used as the identification identifier of the application.
- the execution body of the embodiment of the present application may be a browser client, or may be another module or application having similar functions.
- the browser client may select a port number from the registered port set, and initiate an access request carrying the port number to the local server on the local terminal.
- Obtaining data of the local application if the port number carried by the access request is a port that has been bound by the local application, the browser client can obtain the name and version information of the local application, thereby implementing the web page and the local application.
- the communication between the user and the browser client can personalize the operation prompt of the download link of each application in the web page requested by the user according to the actual application installation situation of the user terminal, thereby improving the user experience. Moreover, since the url schema registration is not required in the embodiment of the present application, and network support is not required when the web page is implemented to communicate with the local application, the user experience is further improved.
- the method for implementing communication between a web page and a local application in the embodiment of the present application includes the following steps:
- Step S201 The user initiates a web page access operation to the browser client.
- the web page may be any web page that the user wishes to open, and the access operation may be a user. Enter the url address in the address bar of the browser client, or click on the web page link.
- Step S202 The browser client initiates a web page access request to the web server based on the user's web page access operation.
- Step S203 After generating the first response based on the web page access request, the web server returns the first response to the browser client.
- Step S204 After receiving the first response returned by the web server, the browser client may be configured to determine whether the first response includes an application name, a download link, and version information by parsing the first response. If yes, step S205 is performed, otherwise step S210 is performed.
- the first response returned by the web server includes the name, download link, and version information of the application. among them,
- the download link may be a virtual button with an operation prompt, and the operation prompt may be, for example, “download”.
- Step S205 The browser client selects a port number from the registered port set, and initiates an access request carrying the port number to the local server on the local terminal.
- the port number of the logical port of the server ranges from 0 to 65535.
- These ports can be divided into well-known ports (the port number ranges from 0 to 1023), dynamic ports (the port number ranges from 49152 to 65535), and registered ports (the port number ranges from 1024 to 49151).
- the registered port can be fixedly assigned to a certain service. Therefore, in the embodiment of the present application, when the browser client takes the port number, a port number may be selected from the registered port set (ie, the range of 1024 to 49151), and the selection may be sequential or random. .
- One of the selected port numbers may be an unbound port number or a port number that has been bound.
- the IP address of the local terminal is 127.0.0.1
- the port number currently selected by the browser client is 7777
- the browser client initiates the carrying to the local server on the local terminal by using the get or post mode.
- the access request with this port number can be http://127.0.0.1:7777.
- Step S206 After the browser client initiates the access request with the port number, it determines whether the second response returned by the local server is received; if the local server returns the second response In response, step S208 is performed, otherwise step S207 is performed.
- the second response is a response returned by the local server for the access request carrying the port number, where the response includes the name and version information of the local application bound to the port number.
- the local server after receiving the access request of the port number sent by the browser client, the local server obtains the correspondence between the pre-stored local application and the corresponding binding port according to the port number carried in the request. Medium (as shown in Table 1 above), find out if there is a local application bound to the port number. If there is a local application bound to the port number, the name and version information of the local application corresponding to the port number is read from the correspondence table, and the name and version information including the name and version information are returned to the browser client. The second response; if there is no local application bound to the port number, the browser client returns a prompt message indicating that the request failed.
- Step S207 When the browser client does not receive the second response returned by the local server, indicating that the local server does not have a local application bound to the port number, the browser client determines the registration port. Concentration is whether there is a port number that has not been selected, and if so, step S205 is performed to attempt access again; otherwise, step S210 is performed.
- Step S208 When the browser client receives the second response returned by the local server, the name and version information of the local application in the second response may be obtained by parsing the second response. The name of the local application is then matched with the name of the application in the first response that has been obtained before to determine whether the local application in the second response is the same application as the application in the first response. If the name of the local application in the second response is the same as the name of the application in the first response, it is confirmed that both belong to the same application, and then step S209 is performed, otherwise step S207 is performed.
- the first response returned by the web server includes the name, download link, and version information of each application.
- the name of the local application in the second response may be respectively matched with the name of each application in the first response; if found, the second response is found. If the local application is the same as the application in the first response, step S209 is performed; if it is found that none of the first response is the same as the local application in the second response, step S207 is performed.
- Step S209 in the process of rendering the web page based on the first response, according to the version information of the local application in the second response and the same application in the first response
- the version information adjusts an operation prompt of the download link of the application in the first ring.
- the adjusting the operation prompt of the download link of the application may include:
- the operation prompt of the download link of the same application in the first response is adjusted from “download” to "update” ;
- the operation prompt of the download link of the same application in the first response is adjusted from “download” to "It has been installed.
- Step S210 Display a web page for the user to view.
- the web page finally displayed on the user terminal is as shown in FIG. 3 .
- the embodiment of the present application can personalize the operation prompt of the download link of each application in the web page requested by the user according to the actual application installation situation of the user terminal, so that the user can accurately understand the requested web. Which of the applications in the page are already installed, which are not yet installed, and which are updatable.
- the name of the application is used as the identification identifier of the application.
- a character string may also be used as the identification identifier of the application.
- the browser client may select a port number from the registered port set, and initiate an access request carrying the port number to the local server on the local terminal.
- Obtaining data of the local application if the port number carried by the access request is a port that has been bound by the local application, the browser client can obtain the name and version information of the local application, thereby implementing the web page and the local application.
- the communication between the user and the browser client can personalize the operation prompt of the download link of each application in the web page requested by the user according to the actual application installation situation of the user terminal, thereby improving the user experience. And because the embodiment of the present application does not need to perform url schema registration, and implements the web page and the local application. No network support is required for the letter, which further enhances the user experience.
- the electronic device includes a processor, an internal bus, a network interface, memory, and memory, and may of course include hardware required for other services.
- the processor reads the corresponding computer program from memory into memory and then runs, forming a device on the logical level that enables the web page to communicate with the local application.
- the local application opens a uniform resource locator url service with a specific port number in advance on the local server located on the local terminal.
- the apparatus for implementing communication between a web page and a local application in the embodiment of the present application includes:
- the first response receiving module 51 is configured to receive a first response returned by the web server based on the user-initiated web page access request;
- the local access initiating module 52 is configured to: when the first response includes the identifier, download link, and version information of the application, select a port number from the registered port set, and initiate the port to the local server on the local terminal. Number access request;
- the application identifier matching module 53 is configured to determine, according to the identifier, whether the local application in the second response is the same application as the application in the first response, according to the identifier;
- the second response carries the identifier and version information of the local application;
- the operation prompt adjustment module 54 is configured to: when the local application and the application are the same application, in the process of rendering the web page based on the first response, according to the version information of the local application and the application Version information, adjusting the operation prompt of the download link of the application.
- the page display module 55 is configured to display a web page for the user to view.
- the operation prompt adjustment module 54 is configured according to the version information of the local application and The version information of the application, and the operation prompt for adjusting the download link of the application, including:
- the operation prompt of the download link of the application is adjusted to: update
- the operation prompt of the download link of the application is adjusted to be installed.
- the device for implementing the communication between the web page and the local application in the embodiment of the present application corresponds to the method for implementing the communication between the web page and the local application in the foregoing embodiment. Therefore, the device for implementing the communication between the web page and the local application in the embodiment of the present application is specific. For details, refer to the method for implementing communication between a web page and a local application in the foregoing embodiment, and details are not described herein again.
- the browser client may select a port number from the registered port set, and initiate an access request carrying the port number to the local server on the local terminal.
- Obtaining data of the local application if the port number carried by the access request is a port that has been bound by the local application, the browser client can obtain the name and version information of the local application, thereby implementing the web page and the local application.
- the communication between the user and the browser client can personalize the operation prompt of the download link of each application in the web page requested by the user according to the actual application installation situation of the user terminal, thereby improving the user experience. Moreover, since the url schema registration is not required in the embodiment of the present application, and network support is not required when the web page is implemented to communicate with the local application, the user experience is further improved.
- a general purpose processor may be a microprocessor.
- the general purpose processor may be any conventional processor, controller, microcontroller, or state machine.
- the processor may also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration. achieve.
- the steps of the method or algorithm described in the embodiments of the present application may be directly embedded in hardware, a software module executed by a processor, or a combination of the two.
- the software modules can be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium in the art.
- the storage medium can be coupled to the processor such that the processor can read information from the storage medium and can write information to the storage medium.
- the storage medium can also be integrated into the processor.
- the processor and the storage medium may be disposed in an ASIC, and the ASIC may be disposed in the user terminal. Alternatively, the processor and the storage medium may also be disposed in different components in the user terminal.
- the above-described functions described in the embodiments of the present application may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, these functions may be stored on a computer readable medium or transmitted as one or more instructions or code to a computer readable medium.
- Computer readable media includes computer storage media and communication media that facilitates the transfer of computer programs from one place to another.
- the storage medium can be any available media that any general purpose or special computer can access.
- Such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, or any other device or data structure that can be used for carrying or storing Other media that can be read by a general purpose or special computer, or a general purpose or special processor.
- any connection can be appropriately defined as a computer readable medium, for example, if the software is from a website site, server, or other remote source through a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) Or wirelessly transmitted in, for example, infrared, wireless, and microwave, is also included in the defined computer readable medium.
- DSL digital subscriber line
- the disks and discs include compact disks, laser disks, optical disks, DVDs, floppy disks, and Blu-ray disks. Disks typically replicate data magnetically, while disks typically optically replicate data with a laser. Combinations of the above may also be included in a computer readable medium.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
Claims (15)
- 一种实现web页面与本地应用通信的方法,其特征在于,所述本地应用预先在位于本地终端上的本地服务端,开启绑定有特定端口号的统一资源定位符url服务,该方法包括以下步骤:接收web服务端基于用户发起的web页面访问请求所返回的第一响应;当所述第一响应中含有应用的标识、下载链接及版本信息时,从注册端口集中选取一个端口号,并向所述本地服务端发起携带有该端口号的访问请求;当收到所述本地服务端返回的第二响应时,根据标识判断所述第二响应中的本地应用与所述第一响应中的应用是否为相同应用;所述第二响应中携带有所述本地应用的标识及版本信息;如果为相同应用,则在基于所述第一响应渲染web页面的过程中,根据所述本地应用的版本信息以及所述应用的版本信息,调整所述应用的下载链接的操作提示。
- 根据权利要求1所述的实现web页面与本地应用通信的方法,其特征在于,所述根据所述本地应用的版本信息以及所述应用的版本信息,调整所述应用的下载链接的操作提示,包括:当所述本地应用的版本低于所述应用的版本时,将所述应用的下载链接的操作提示调整为:更新;或者,当所述本地应用的版本不低于所述应用的版本时,将所将所述应用的下载链接的操作提示调整为:已安装。
- 根据权利要求1所述的实现web页面与本地应用通信的方法,其特征在于,在所述向本地终端上的本地服务端发起携带有该端口号的访问请求之后,还包括:如果未收到所述本地服务端返回的第二响应,且所述注册端口集有尚未被选取的端口号时,从所述尚未被选取的端口号中选取一个端口号,并向所述本地服务端发起携带有该端口号的访问请求;或者,如果未收到所述本地服务端返回的第二响应,且所述注册端口集中 的所有端口号已被选取时,则直接基于所述第一响应渲染web页面。
- 根据权利要求1所述的实现web页面与本地应用通信的方法,其特征在于,还包括:如果所述第一响应中含有多个应用的标识、下载链接及版本信息,则根据标识判断所述第二响应中的本地应用,分别与所述第一响应中的每个应用是否为相同应用。
- 根据权利要求1所述的实现web页面与本地应用通信的方法,其特征在于,所述本地应用预先通过以下方式开启所述url服务:在首次启动过程中,所述本地应用向所述本地服务端发送请求绑定注册端口的url服务的指令;所述指令中携带希望绑定的端口号;如果所述希望绑定的端口号未被绑定,所述本地服务端为该本地应用开启绑定该端口号的url服务。
- 根据权利要求5所述的实现web页面与本地应用通信的方法,其特征在于,还包括:如果所述希望绑定的端口号已被绑定,且注册端口集中有尚未被绑定的端口号,则所述本地服务端从尚未被绑定的端口号中选取一个端口号,并为该本地应用开启绑定有该端口号的url服务。
- 根据权利要求5所述的实现web页面与本地应用通信的方法,其特征在于,还包括:如果注册端口集中的端口号已全部被绑定,则所述本地服务端确认本次绑定失败。
- 根据权利要求1所述的实现web页面与本地应用通信的方法,其特征在于,所述本地应用预先通过以下方式开启所述url服务:在首次启动过程中,所述本地应用向所述本地服务端发送请求绑定注册端口的url服务的指令;如果所述注册端口集中有尚未被绑定的端口号,则所述本地服务端从尚未被绑定的端口号中选取一个端口号,并为该本地应用开启绑定有该端口号的url服务。
- 根据权利要求8所述的实现web页面与本地应用通信的方法,其 特征在于,还包括:如果注册端口集中的端口号已全部被绑定,则所述本地服务端确认本次绑定失败。
- 根据权利要求1所述的实现web页面与本地应用通信的方法,其特征在于,所述本地应用预先通过以下方式开启所述url服务:系统在当前应用被安装的过程中监测其安装状态;如果监测到所述当前应用已成功安装的事件,则触发系统向所述本地服务端发送绑定指令,以为所述当前应用开启绑定有特定端口号的url服务;如果所述注册端口集中有尚未被绑定的端口号,则所述本地服务端从尚未被绑定的端口号中选取一个端口号,并为该当前应用开启绑定有该端口号的url服务。
- 根据权利要求10所述的实现web页面与本地应用通信的方法,其特征在于,还包括:如果注册端口集中的端口号已全部被绑定,则所述本地服务端确认本次绑定失败。
- 一种实现web页面与本地应用通信的装置,其特征在于,所述本地应用预先在位于本地终端上的本地服务端,开启绑定有特定端口号的统一资源定位符url服务,该装置包括:第一响应接收模块,用于接收web服务端基于用户发起的web页面访问请求所返回的第一响应;本地访问发起模块,用于当所述第一响应中含有应用的标识、下载链接及版本信息时,从注册端口集中选取一个端口号,并向本地终端上的本地服务端发起携带有该端口号的访问请求;应用标识匹配模块,用于当收到所述本地服务端返回的第二响应时,根据标识判断所述第二响应中的本地应用与所述第一响应中的应用是否为相同应用;所述第二响应中携带有所述本地应用的标识及版本信息;操作提示调整模块,用于当所述本地应用与所述应用为相同应用时,则在基于所述第一响应渲染web页面的过程中,根据所述本地应用的版 本信息以及所述应用的版本信息,调整所述应用的下载链接的操作提示。
- 根据权利要求12所述的实现web页面与本地应用通信的装置,其特征在于,所述操作提示调整模块根据所述本地应用的版本信息以及所述应用的版本信息,调整所述应用的下载链接的操作提示,包括:当所述本地应用的版本低于所述应用的版本时,将所述应用的下载链接的操作提示调整为:更新;或者,当所述本地应用的版本不低于所述应用的版本时,将所将所述应用的下载链接的操作提示调整为:已安装。
- 一种电子设备,其特征在于,包括:处理器;以及存储器,所述存储器被配置成用以存储实现web页面与本地应用通信的装置,所述实现web页面与本地应用通信的装置被所述处理器执行时,执行如下步骤:接收web服务端基于用户发起的web页面访问请求所返回的第一响应;当所述第一响应中含有应用的标识、下载链接及版本信息时,从注册端口集中选取一个端口号,并向本地终端上的本地服务端发起携带有该端口号的访问请求;当收到所述本地服务端返回的第二响应时,根据标识判断所述第二响应中的本地应用与所述第一响应中的应用是否为相同应用;所述第二响应中携带有所述本地应用的标识及版本信息;如果为相同应用,则在基于所述第一响应渲染web页面的过程中,根据所述本地应用的版本信息以及所述应用的版本信息,调整所述应用的下载链接的操作提示。
- 根据权利要求14所述的电子设备,其特征在于,所述电子设备包括移动终端。
Priority Applications (6)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP17850242.3A EP3518109A4 (en) | 2016-09-19 | 2017-09-11 | METHOD AND APPARATUS FOR ESTABLISHING COMMUNICATION BETWEEN A WEB PAGE AND A NATIVE APPLICATION AND ELECTRONIC DEVICE |
JP2019515258A JP6945782B2 (ja) | 2016-09-19 | 2017-09-11 | ウェブページとネイティブアプリケーションの間の通信を実現する方法及び装置並びに電子装置 |
KR1020197011095A KR102166589B1 (ko) | 2016-09-19 | 2017-09-11 | 웹 페이지와 네이티브 애플리케이션 간의 통신을 실현하기 위한 방법 및 장치, 그리고 전자 디바이스 |
MYPI2019001402A MY181230A (en) | 2016-09-19 | 2017-09-11 | Method and apparatus for realizing communication between web page and native application, and electronic device |
US16/356,506 US10783212B2 (en) | 2016-09-19 | 2019-03-18 | Method and apparatus for realizing communication between web page and native application, and electronic device |
PH12019500601A PH12019500601A1 (en) | 2016-09-19 | 2019-03-19 | Method and apparatus for realizing communication between web page and native application, and electronic device |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610832369.8A CN107015870B (zh) | 2016-09-19 | 2016-09-19 | 实现web页面与本地应用通信的方法、装置和电子设备 |
CN201610832369.8 | 2016-09-19 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/356,506 Continuation US10783212B2 (en) | 2016-09-19 | 2019-03-18 | Method and apparatus for realizing communication between web page and native application, and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018050040A1 true WO2018050040A1 (zh) | 2018-03-22 |
Family
ID=59439047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/101277 WO2018050040A1 (zh) | 2016-09-19 | 2017-09-11 | 实现web页面与本地应用通信的方法、装置和电子设备 |
Country Status (9)
Country | Link |
---|---|
US (1) | US10783212B2 (zh) |
EP (1) | EP3518109A4 (zh) |
JP (1) | JP6945782B2 (zh) |
KR (1) | KR102166589B1 (zh) |
CN (1) | CN107015870B (zh) |
MY (1) | MY181230A (zh) |
PH (1) | PH12019500601A1 (zh) |
TW (1) | TWI713770B (zh) |
WO (1) | WO2018050040A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112804320A (zh) * | 2021-01-04 | 2021-05-14 | 德施曼机电(中国)有限公司 | 一种智能门锁的控锁app下载方法及系统 |
CN112989233A (zh) * | 2019-12-02 | 2021-06-18 | 北京小米移动软件有限公司 | 文件下载方法、装置及存储介质 |
CN113176887A (zh) * | 2021-02-05 | 2021-07-27 | 西安宇飞电子技术有限公司 | 一种无人机数据链终端的无线固件升级方法 |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107015870B (zh) | 2016-09-19 | 2020-11-03 | 创新先进技术有限公司 | 实现web页面与本地应用通信的方法、装置和电子设备 |
CN109842671B (zh) * | 2018-11-30 | 2022-08-30 | 畅捷通信息技术股份有限公司 | 一种浏览器与自动报税应用程序通信的方法及系统 |
CN111181836B (zh) * | 2019-10-25 | 2023-03-24 | 腾讯科技(深圳)有限公司 | 一种消息推送方法及装置 |
CN110990170A (zh) * | 2019-11-29 | 2020-04-10 | 广州市百果园信息技术有限公司 | 数据结构、通信方法、装置、存储介质及设备 |
CN111273950B (zh) * | 2019-12-31 | 2023-03-21 | 百度国际科技(深圳)有限公司 | 应用唤起方法、装置、电子设备及计算机可读存储介质 |
CN113364821B (zh) * | 2020-03-04 | 2024-03-05 | 腾讯科技(深圳)有限公司 | 一种功能服务访问方法、设备及存储介质 |
JP7570193B2 (ja) | 2020-07-29 | 2024-10-21 | キヤノン株式会社 | 情報処理装置、アプリケーションの起動方法及びプログラム |
CN112040025B (zh) * | 2020-09-03 | 2023-03-24 | 安徽文香科技有限公司 | 一种服务器地址切换的方法、系统及终端设备 |
CN113704660A (zh) * | 2021-06-24 | 2021-11-26 | 青岛海尔科技有限公司 | 用于获取渲染页面视图的方法及装置、电子设备 |
CN113761408A (zh) * | 2021-09-08 | 2021-12-07 | 腾讯音乐娱乐科技(深圳)有限公司 | 页面渲染方法、电子设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1499089B1 (en) * | 2003-07-18 | 2014-04-02 | Canon Kabushiki Kaisha | Method of accessing and sharing a digital document in a P2P communication network |
CN103731445A (zh) * | 2012-10-10 | 2014-04-16 | 上海宝信软件股份有限公司 | 一种基于ios的应用智能更新系统及方法 |
CN104598268A (zh) * | 2014-12-12 | 2015-05-06 | 百度在线网络技术(北京)有限公司 | 应用的处理方法及装置 |
CN105939355A (zh) * | 2016-06-13 | 2016-09-14 | 乐视控股(北京)有限公司 | 一种数据访问方法、系统及客户端和服务器 |
CN107015870A (zh) * | 2016-09-19 | 2017-08-04 | 阿里巴巴集团控股有限公司 | 实现web页面与本地应用通信的方法、装置和电子设备 |
Family Cites Families (40)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5928330A (en) * | 1996-09-06 | 1999-07-27 | Motorola, Inc. | System, device, and method for streaming a multimedia file |
US6119166A (en) | 1997-03-28 | 2000-09-12 | International Business Machines Corporation | Controlling communications with local applications using a browser application |
US6182146B1 (en) * | 1997-06-27 | 2001-01-30 | Compuware Corporation | Automatic identification of application protocols through dynamic mapping of application-port associations |
US6571392B1 (en) | 1999-04-20 | 2003-05-27 | Webtv Networks, Inc. | Receiving an information resource from the internet if it is not received from a broadcast channel |
US6546554B1 (en) | 2000-01-21 | 2003-04-08 | Sun Microsystems, Inc. | Browser-independent and automatic apparatus and method for receiving, installing and launching applications from a browser on a client computer |
US7406664B1 (en) | 2001-06-15 | 2008-07-29 | Microsoft Corporation | System for integrating HTML Web site views into application file dialogs |
US7275096B2 (en) | 2001-09-20 | 2007-09-25 | Telelogic North America Inc. | Computerized system and method for web enabling and/or web management of embedded applications |
US20040210663A1 (en) * | 2003-04-15 | 2004-10-21 | Paul Phillips | Object-aware transport-layer network processing engine |
US20040260806A1 (en) * | 2003-06-20 | 2004-12-23 | Eric Martin | System supporting communication between a web enabled application and another application |
US7676472B2 (en) | 2004-06-07 | 2010-03-09 | International Business Machines Corporation | Method and apparatus for accessing web services |
US7840648B1 (en) | 2005-04-29 | 2010-11-23 | Google Inc. | Web-page authoring tool for automatic enrollment in advertising program |
US7849437B2 (en) | 2005-09-01 | 2010-12-07 | Microsoft Corporation | Object oriented web application framework |
US9489187B2 (en) * | 2005-11-07 | 2016-11-08 | Yahoo, Inc. | Adaptive deployment of applications for mobile devices |
US8601363B2 (en) * | 2009-07-20 | 2013-12-03 | Facebook, Inc. | Communicating information about a local machine to a browser application |
US8407290B2 (en) | 2009-08-31 | 2013-03-26 | International Business Machines Corporation | Dynamic data sharing using a collaboration-enabled web browser |
US9390172B2 (en) | 2009-12-03 | 2016-07-12 | Microsoft Technology Licensing, Llc | Communication channel between web application and process outside browser |
US10580051B2 (en) | 2010-05-18 | 2020-03-03 | Google Llc | Background element associated with an application installed in a browser application |
CN102316160B (zh) | 2011-06-14 | 2013-09-18 | 贵阳朗玛信息技术股份有限公司 | 网站系统及其通信方法 |
KR20160118378A (ko) | 2011-08-24 | 2016-10-11 | 노키아 솔루션스 앤드 네트웍스 오와이 | 애플리케이션 프로그램 제어 |
JP6219296B2 (ja) | 2011-11-01 | 2017-10-25 | グーグル インコーポレイテッド | ウェブページからのアプリケーションの起動 |
US9612724B2 (en) * | 2011-11-29 | 2017-04-04 | Citrix Systems, Inc. | Integrating native user interface components on a mobile device |
US9053201B2 (en) | 2012-02-29 | 2015-06-09 | Microsoft Technology Licensing, Llc | Communication with a web compartment in a client application |
CN104185845B (zh) | 2012-03-13 | 2017-12-12 | 谷歌公司 | 用于提供网页的二进制表示的系统和方法 |
JP6061480B2 (ja) * | 2012-03-16 | 2017-01-18 | キヤノン株式会社 | 通信装置の制御方法及び通信装置 |
US8898766B2 (en) | 2012-04-10 | 2014-11-25 | Spotify Ab | Systems and methods for controlling a local application through a web page |
CN102625290B (zh) * | 2012-04-10 | 2015-02-18 | 青岛海信移动通信技术股份有限公司 | 一种资源下载的方法、装置和系统及终端 |
CN103514089B (zh) * | 2012-06-26 | 2016-03-09 | 腾讯科技(深圳)有限公司 | 软件管理器的软件安装检测方法和系统 |
US8938726B2 (en) | 2012-08-28 | 2015-01-20 | Sap Ag | Integrating native application into web portal |
US20140067835A1 (en) * | 2012-08-30 | 2014-03-06 | Microsoft Corporation | Search extensibility application framework in a hosted search |
US9465596B2 (en) | 2012-09-27 | 2016-10-11 | Google Inc. | Cross system installation of web applications |
US9002821B2 (en) | 2013-01-16 | 2015-04-07 | Google Inc. | Indexing application pages of native applications |
US9203891B2 (en) | 2013-03-13 | 2015-12-01 | Qualcomm Incorporated | System and method to enable web property access to a native application |
KR101585547B1 (ko) * | 2013-04-15 | 2016-01-14 | 김수현 | 프로그램 업데이트 확인방법 |
EP3005039A4 (en) * | 2013-05-28 | 2017-03-01 | Pulletikurty, Ravi | System having a miniature portable electronic device for command and control of a plurality of wireless devices |
CN103279375B (zh) * | 2013-06-19 | 2016-08-10 | 百度在线网络技术(北京)有限公司 | 在浏览器中运行应用程序的方法和装置 |
CN104394237B (zh) * | 2014-12-19 | 2018-07-13 | 北京奇虎科技有限公司 | 浏览器与移动终端之间进行通信的方法及浏览器装置 |
US10193737B2 (en) * | 2014-12-19 | 2019-01-29 | Beijing Qihoo Technology Company Limited | Method for performing communication between browser and mobile terminal, and browser apparatus |
US10397373B2 (en) * | 2015-05-20 | 2019-08-27 | Qualcomm Incorporated | Renewing registrations for client applications installed on different proximate client devices |
CN105159692B (zh) * | 2015-06-18 | 2019-07-02 | 小米科技有限责任公司 | 应用的标识方法、装置及服务器 |
US10564988B1 (en) * | 2017-12-22 | 2020-02-18 | Intuit Inc. | Deploying cross-platform applications on mobile devices with native and web components |
-
2016
- 2016-09-19 CN CN201610832369.8A patent/CN107015870B/zh active Active
-
2017
- 2017-07-21 TW TW106124621A patent/TWI713770B/zh active
- 2017-09-11 KR KR1020197011095A patent/KR102166589B1/ko active IP Right Grant
- 2017-09-11 MY MYPI2019001402A patent/MY181230A/en unknown
- 2017-09-11 WO PCT/CN2017/101277 patent/WO2018050040A1/zh unknown
- 2017-09-11 JP JP2019515258A patent/JP6945782B2/ja active Active
- 2017-09-11 EP EP17850242.3A patent/EP3518109A4/en not_active Ceased
-
2019
- 2019-03-18 US US16/356,506 patent/US10783212B2/en active Active
- 2019-03-19 PH PH12019500601A patent/PH12019500601A1/en unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1499089B1 (en) * | 2003-07-18 | 2014-04-02 | Canon Kabushiki Kaisha | Method of accessing and sharing a digital document in a P2P communication network |
CN103731445A (zh) * | 2012-10-10 | 2014-04-16 | 上海宝信软件股份有限公司 | 一种基于ios的应用智能更新系统及方法 |
CN104598268A (zh) * | 2014-12-12 | 2015-05-06 | 百度在线网络技术(北京)有限公司 | 应用的处理方法及装置 |
CN105939355A (zh) * | 2016-06-13 | 2016-09-14 | 乐视控股(北京)有限公司 | 一种数据访问方法、系统及客户端和服务器 |
CN107015870A (zh) * | 2016-09-19 | 2017-08-04 | 阿里巴巴集团控股有限公司 | 实现web页面与本地应用通信的方法、装置和电子设备 |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112989233A (zh) * | 2019-12-02 | 2021-06-18 | 北京小米移动软件有限公司 | 文件下载方法、装置及存储介质 |
CN112804320A (zh) * | 2021-01-04 | 2021-05-14 | 德施曼机电(中国)有限公司 | 一种智能门锁的控锁app下载方法及系统 |
CN112804320B (zh) * | 2021-01-04 | 2023-02-28 | 德施曼机电(中国)有限公司 | 一种智能门锁的控锁app下载方法及系统 |
CN113176887A (zh) * | 2021-02-05 | 2021-07-27 | 西安宇飞电子技术有限公司 | 一种无人机数据链终端的无线固件升级方法 |
CN113176887B (zh) * | 2021-02-05 | 2023-09-29 | 西安宇飞电子技术有限公司 | 一种无人机数据链终端的无线固件升级方法 |
Also Published As
Publication number | Publication date |
---|---|
TW201814509A (zh) | 2018-04-16 |
US20190213231A1 (en) | 2019-07-11 |
CN107015870A (zh) | 2017-08-04 |
JP6945782B2 (ja) | 2021-10-06 |
KR20190049874A (ko) | 2019-05-09 |
CN107015870B (zh) | 2020-11-03 |
US10783212B2 (en) | 2020-09-22 |
KR102166589B1 (ko) | 2020-10-19 |
EP3518109A4 (en) | 2020-04-08 |
EP3518109A1 (en) | 2019-07-31 |
MY181230A (en) | 2020-12-21 |
JP2019530089A (ja) | 2019-10-17 |
TWI713770B (zh) | 2020-12-21 |
PH12019500601A1 (en) | 2020-01-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018050040A1 (zh) | 实现web页面与本地应用通信的方法、装置和电子设备 | |
US10880287B2 (en) | Out of box experience application API integration | |
US12117970B2 (en) | Systems and methods for providing access to a data file stored at a data storage system | |
JP6643490B2 (ja) | 可変ブラウザ識別子のセッションベースのマッチング | |
US10320940B1 (en) | Managing generic data | |
US10282522B2 (en) | Cross-application authentication on a content management system | |
RU2621643C2 (ru) | Способ и устройство для отображения информации | |
US9781089B2 (en) | Authenticating a user account with a content management system | |
WO2017113060A1 (zh) | web网站的访问方法、装置及Web网站系统 | |
US20150378714A1 (en) | Providing Context-Specific Software Updates to Client Applications | |
US20150012616A1 (en) | Saving Third Party Content to a Content Management System | |
US9137094B1 (en) | Method for setting DNS records | |
WO2013143403A1 (zh) | 一种访问网站的方法和系统 | |
JP2018045704A (ja) | リモーティングセッションを通じた非サポートファイル形式の開封 | |
US10209976B2 (en) | Automated application installation | |
US12137136B2 (en) | Smart URL integration using serverless service | |
WO2022116575A1 (zh) | 业务平台的访问权限获取方法和业务平台的访问控制方法 | |
JP2016212656A (ja) | 情報処理装置、端末、情報処理装置と端末を有するシステム、情報処理方法及びプログラム | |
TWI505100B (zh) | 在區域網路中進行資料分享與數據同步的方法 | |
US20150149596A1 (en) | Sending mobile applications to mobile devices from personal computers | |
TW200933381A (en) | System and method for running a web-based application while offline | |
JP2016062215A (ja) | 情報処理システム及び認証方法 |
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: 17850242 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2019515258 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 20197011095 Country of ref document: KR Kind code of ref document: A |
|
ENP | Entry into the national phase |
Ref document number: 2017850242 Country of ref document: EP Effective date: 20190423 |