WO2012106968A1 - Method and device for locally transmitting information by java application - Google Patents

Method and device for locally transmitting information by java application Download PDF

Info

Publication number
WO2012106968A1
WO2012106968A1 PCT/CN2011/083614 CN2011083614W WO2012106968A1 WO 2012106968 A1 WO2012106968 A1 WO 2012106968A1 CN 2011083614 W CN2011083614 W CN 2011083614W WO 2012106968 A1 WO2012106968 A1 WO 2012106968A1
Authority
WO
WIPO (PCT)
Prior art keywords
java
name
information
application module
interface platform
Prior art date
Application number
PCT/CN2011/083614
Other languages
French (fr)
Chinese (zh)
Inventor
杨彬
郑瑜
Original Assignee
惠州Tcl移动通信有限公司
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 惠州Tcl移动通信有限公司 filed Critical 惠州Tcl移动通信有限公司
Publication of WO2012106968A1 publication Critical patent/WO2012106968A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators

Definitions

  • the present invention relates to a method and apparatus for JAVA applications to communicate information locally. ⁇ Background technique ⁇
  • Java a general term for the Java programming language and Java platform introduced by Sun Microsystems in May 1995.
  • JAVA technology is a cross-platform software technology.
  • J2ME-compliant JAVA applications MIDlets
  • MIDlets J2ME-compliant JAVA applications
  • the cross-platform nature of JAVA itself depends on its abstract program runtime environment, the JAVA virtual machine.
  • the core part of the implementation of the JAVA virtual machine is often referred to as the JAVA kernel (Core), or simply JVM.
  • JAM JAVA Application Manager
  • application management layer which can be regarded as JAVA virtual.
  • Part of the machine can also be seen as a basic application layer on top of the JAVA kernel.
  • Running under the JAVA adaptation layer is the system platform, as well as some underlying applications. Other higher-level applications may also communicate with JAVA systems and JAVA applications, but often do not communicate directly, but through the JAVA adaptation layer and the JAVA kernel and JAM help.
  • JAVA technology is a highly standardized technology. Often, any functionality that is not included in the standard cannot be creatively implemented by a JAVA application, otherwise the JAVA application is difficult to adapt between different systems, ie it is difficult to run across platforms. However, in the case of standardization technology lags, some emerging application requirements will inevitably lead to the expansion of existing functions.
  • JSR211 JSR211
  • JAM JAVA application manager
  • the technical problem to be solved by the present invention is to provide a method and a device for transmitting information to a local application by a JAVA application, which can realize the JAVA application running in the background of the device to transmit information to the local application module of the device without changing the existing technical standards.
  • a technical solution adopted by the present invention is: Providing a method for a JAVA application to transmit information to a local, including:
  • the JAVA application of the device requests the PlatfromRequest by calling a standard JAVA interface platform, and transmits the JAVA application to be transmitted to the JAVA virtual machine JVM. After the domain name is requested by the JAVA interface platform, the JAVA application is set according to a predetermined rule.
  • the JAVA adaptation layer determines whether the requested URL target address in the JAVA interface platform request is "Localhost", "127.0.0.1” or “::1"; Narrative When the request URL address is "Localhost", "127.0.0.1” or "::1", the JAVA adaptation layer parses the JAVA application name and the local application module after the domain name in the JAVA interface platform request according to the predetermined rule.
  • the step of causing the JAVA adaptation layer to parse the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule includes: causing the JAVA adaptation layer to check the JAVA interface platform request.
  • the first delimiter and the second delimiter in the string after the domain name are parsed after the domain name in the JAVA interface platform request and before the first delimiter, as the JAVA application name; after the first delimiter, second
  • the content before the delimiter is parsed as the local application module name; the content after the second delimiter to the end of the string is parsed as the information to be delivered.
  • the step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and then sending the information to the local application module corresponding to the local application module name.
  • the step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: passing the information to be delivered through an event between threads, an event between processes, or between a thread and a process The event is sent to the local application module corresponding to the local application module name.
  • Providing a method for a JAVA application to transmit information to a local device comprising: causing a JAVA application of the device to request [Plattfrom Request (URL) by calling a standard JAVA interface platform.
  • the JAVA application to be passed to the JAVA virtual machine, wherein after the JAVA interface platform requests the domain name, the JAVA application name and the local application module are set according to a predetermined rule.
  • the JAVA application name corresponds to the source of the information to be delivered
  • the local application module name is the target application module name to be delivered to the information
  • the JVM is required to submit the JAVA interface platform request to JAVA Configuring the JAVA adaptation layer to determine whether the requested URL target address in the JAVA interface platform request is the current device callback standard host; when the requested URL target address is the current device callback standard host, enable JAVA
  • the adaptation layer parses the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule; and causes the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name.
  • the information to be delivered is sent to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
  • the step of causing the JAVA adaptation layer to parse the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule includes: causing the JAVA adaptation layer to check the JAVA interface platform request.
  • the first delimiter and the second delimiter in the string after the domain name are parsed after the domain name in the JAVA interface platform request and before the first delimiter, as the JAVA application name; after the first delimiter, second
  • the content before the delimiter is parsed as the local application module name; the content after the second delimiter to the end of the string is parsed as the information to be delivered.
  • the step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and then sending the information to the local application module corresponding to the local application module name.
  • the step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: passing the information to be delivered through an event between threads, an event between processes, or between a thread and a process The event is sent to the local application module corresponding to the local application module name.
  • the step of causing the JVM to hand over the JAVA interface platform request to the JAVA adaptation layer includes: causing the JVM to submit the JAVA interface platform request as a normal request to the JAVA adaptation layer.
  • the step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining whether the requested URL target address in the JAVA interface platform request is Is "Localhost", "127.0.0.1” or "::1".
  • a JAVA-based device comprising: a request sending unit, configured to enable a JAVA application of the device to request by calling a standard JAVA interface platform, The JAVA application to be passed to the JAVA virtual machine, wherein after the domain name is requested by the JAVA interface platform, the JAVA application name, the local application module name, and the to-be-delivered information are set according to a predetermined rule, and the JAVA application name corresponds to The source of the information to be delivered, the local application module name is the name of the target application module to be delivered; the first delivery unit is configured to enable the JVM to submit the JAVA interface platform request to the JAVA adaptation layer; And the JAVA adaptation layer is configured to determine whether the requested URL target address in the JAVA interface platform request is a current device callback standard host; and the information parsing unit is configured to: call back the current device in the requested URL target address When the standard host is used
  • the delivery unit is configured to send the to-be-delivered information to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
  • the information parsing unit is specifically configured to enable the JAVA adaptation layer to check the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, and after the domain name in the JAVA interface platform request, the first delimiter
  • the previous content is parsed out as JAVA The application name; parsing the content after the first delimiter and before the second delimiter as the local application module name; parsing the content after the second delimiter to the end of the string as the information to be delivered.
  • the second delivery unit is specifically configured to send the information to be delivered to an local application module corresponding to the local application module name by using an event between threads, an event between processes, or an event between a thread and a process. .
  • the address determining unit is specifically configured to determine, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is "Localhost", "127.0.0.1” or "::1".
  • the beneficial effects of the present invention are: different from the prior art, in the case that the information transmission cost between the JAVA application and the device local application module is too high based on the current technical standards, the present invention utilizes one of the Internet technologies cannot be reused.
  • the host name that is, Localhost, serves as a bridge between the JAVA application and the device's local application module.
  • the information to be passed and the local application module name are placed in the JAVA interface platform request, so that the JAVA adaptation layer can determine the JAVA interface platform request from the JVM.
  • Whether the requested URL of the requested URL is the current device callback standard host. When the determination is yes, the information to be delivered is sent to the local application module, without changing the existing technical standards, which is simple and convenient, and low in cost, and will not A situation that causes serious side effects when JAVA applications are running on other platforms.
  • FIG. 1 is a flow chart of an embodiment of a method for transmitting information to a local JAVA application
  • FIG. 2 is a schematic block diagram of an embodiment of a JAVA-based device of the present invention.
  • Localhost is a standard host name in the field of Internet technology and is used to represent the current setting. Ready to call back. "Localhost””..Localhost” is also the reserved international domain name, which is a hostname that cannot be reused. Localhost will be translated as a callback IP address, which is "127.0.0.1” in the IPV4 era and "::1" in the IPv6 era. Local requests to Localhost, such as http://Localhost, will always display the home page of the local WEB site (because http is used as the default protocol for site browsing), if it exists.
  • the function extensions include: User requirements When the JAVA application is running in the background, the device can prompt some key information from the JAVA application in the foreground, that is, the JAVA application can transmit information to the local.
  • the invention expands the standard JAVA interface, and uses Localhost as a channel to realize the information transmission of the background JAVA application, and then receives the information locally and then performs corresponding processing. This method does not cause serious side effects when the JAVA program runs on other platforms.
  • the embodiments of the present invention are specifically described below:
  • an embodiment of a method for transmitting information to a local JAVA application includes:
  • Step 101 The JAVA application of the device requests [PlatfromRequest(URL)] by calling a standard JAVA interface platform, and transmits the JAVA application to be transmitted to the JAVA virtual machine (JVM), where the domain name is requested in the JAVA interface platform. Then, according to the predetermined rule, the JAVA application name, the local application module name, and the to-be-delivered information are set, the JAVA application name corresponds to the source of the information to be delivered, and the local application module name is the target application to be delivered. Module name;
  • Step 102 Enable the JVM to submit the JAVA interface platform request to the JAVA adaptation layer. At this point, everything is in compliance with JAVA technical standards, without the special involvement of the JVM, and without the data being destroyed by the JVM.
  • Step 103 The JAVA adaptation layer determines whether the requested URL target address in the JAVA interface platform request is a current device callback standard host (Localhost);
  • Step 104 When the requested URL target address is the current device callback standard host, the JAVA adaptation layer parses the JAVA application name, the local application module name, and the domain name after the domain name in the JAVA interface platform request according to the predetermined rule. Information to be delivered;
  • the PlatformRequest whose URL format is "http://"
  • the existing JAVA technical standard requires that the browser on the device be called to access the specified URL.
  • This part is implemented through the interpretation of the JAVA adaptation layer and the call to the platform application module.
  • the JAVA adaptation layer Through the JAVA adaptation layer, the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request are parsed according to the predetermined rule.
  • Step 105 Enable the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name.
  • Step 106 Send the to-be-delivered information to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
  • the present invention utilizes a host name that cannot be reused in the Internet technology, that is, Localhost serves as a bridge between the JAVA application and the local application module of the device, and puts the information to be transmitted and the name of the local application module into the JAVA interface platform.
  • the JAVA adaptation layer determines whether the requested URL target address in the JAVA interface platform request from the JVM is the current device callback standard host. When the determination is yes, the information to be delivered is sent to the local application module. No need to change existing technical standards, easy and convenient, and low cost, and will not A situation that causes serious side effects when JAVA applications are running on other platforms.
  • the step of causing the JAVA adaptation layer to parse the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule includes:
  • the JAVA adaptation layer checks the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, and parses the content after the domain name in the JAVA interface platform request and before the first delimiter as the JAVA application. Name; parsing the content after the first delimiter and before the second delimiter as the local application module name; parsing the content after the second delimiter to the end of the string as the information to be delivered.
  • the delimiter can be "/" or other conformance for identification and segmentation. For example, if the separator is "/" as an example, the following string rules are used to parse the string of the domain name in the URL:
  • the first level directory name after the domain name part is overloaded as "JAVA application name" to indicate the source of the request, which is the name of the JAVA application.
  • the name (string) is predetermined by the JAVA application developer and the JAVA adaptation layer implementer, not the name of the JAVA application itself, or the name of its installation file, or its display name after installation.
  • the second-level directory name is reloaded as "local application module name", which is the application module that the JAVA application wants to communicate with locally, such as phone book, email, desktop application, and so on. This also requires the parties to predetermine.
  • the third level directory starts to the end of the URL is the application related data part.
  • the specific format is determined in advance by both parties, and this embodiment is not particularly limited.
  • Extract information after parsing 1) Extract the JAVA application name, that is, read the information of the first level directory location.
  • the local application module name is extracted, that is, the information of the second-level directory location is read, and the rest of the URL after the second-level directory is used as the application information, which is also about to be transmitted. Information content.
  • the above JAVA application name, the local application module name, and the form of the information set to be delivered are merely an application example, but the present invention is not limited to the above example, for example, "%" is used as a separator.
  • the step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and sending the information to the local corresponding to the local application module name Application module.
  • the step of sending the to-be-delivered information to the local application module corresponding to the local application module name comprises: passing the information to be delivered through an event between threads, an event between processes, or The event between the thread and the process is sent to the local application module corresponding to the local application module name.
  • the manner in which the information to be delivered is sent to the local application module corresponding to the local application module name may be many, and the present invention will not be described again.
  • the step of causing the JVM to hand the JAVA interface platform request to the JAVA adaptation layer includes causing the JVM to hand the JAVA interface platform request as a normal request to the JAVA adaptation layer.
  • the JVM can also be made to hand the JAVA interface platform request as a special request to the JAVA adaptation layer.
  • the step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining the JAVA interface platform request Request URL destination address is "Localhost", "127.0.0.1” or ":: ⁇ ,.
  • a JAVA application needs to file the following platform request with the JVM:
  • JAVA-based device embodiment including:
  • a request sending unit configured to enable the JAVA application of the device to request a PlatfromRequest by calling a standard JAVA interface platform, and transmit the JAVA application to be transmitted to the JAVA virtual machine JVM, where the JAVA interface platform requests the domain name, according to the reservation
  • the rule set has the JAVA application name, the local application module name, and the information to be delivered, the JAVA application name corresponds to the source of the information to be delivered, and the local application module name is the target application module name to which the information to be delivered is to be reached;
  • a first delivery unit configured to enable the JVM to submit a JAVA interface platform request to the JAVA adaptation layer
  • An address determining unit configured to: determine, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is a current device callback standard host;
  • the information parsing unit is configured to: when the requested URL target address is the current device callback standard host, enable the JAVA adaptation layer to parse the JAVA application name and the local application after the domain name in the JAVA interface platform request according to the predetermined rule. a module name and information to be delivered; a program authentication unit, configured to enable the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name; The second delivery unit is configured to send the to-be-delivered information to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
  • the JAVA-based device can be a cell phone, a portable game console, a personal digital assistant, a notebook, and the like.
  • the information parsing unit is specifically configured to enable the JAVA adaptation layer to check the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, and after the domain name in the JAVA interface platform request, the first delimiter
  • the previous content is parsed as the JAVA application name; the content after the first delimiter and before the second delimiter is parsed as the local application module name; the content after the second delimiter to the end of the string is parsed.
  • the second delivery unit is specifically configured to send the information to be delivered to an local event corresponding to the local application module name by an event between threads, an event between processes, or an event between a thread and a process.
  • Application module is specifically configured to send the information to be delivered to an local event corresponding to the local application module name by an event between threads, an event between processes, or an event between a thread and a process.
  • the address determining unit is specifically configured to determine, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is "Localhost", "127.0.0.1” or "::1".

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a method and a device for locally transmitting information by Java application. The method comprises: allowing the Java application of the device to transmit the information to be transmitted to the Java adaptation layer via JVM by invoking a standard Java interface platform request; allowing the Java adaptation layer to analyze the name of the Java application and the name of the local application module following the domain name in the JAVA interface platform request and the information to be transmitted in accordance with a predetermined rule when the requested URL destination address is determined to be the callback localhost of the current device; allowing the JAVA adaptation layer to perform authentication of the JAVA application according to the name of the JAVA application; and sending the information to be transmitted to the local application module corresponding to the name of the local application module when authentication of the JAVA application is approved. The present invention can realize the function of transmitting information to the local application module of the device by the Java application running in background without changing existing technical standards.

Description

JAVA应用程序向本地传递信息的方法及设备  Method and device for transmitting information to JAVA application locally
【技术领域】 [Technical Field]
本发明涉及 JAVA应用程序向本地传递信息的方法及设备。 【背景技术】  The present invention relates to a method and apparatus for JAVA applications to communicate information locally. 【Background technique】
Java, 是由 Sun Microsystems公司于 1995年 5月推出的 Java程序 设计语言和 Java平台的总称。  Java, a general term for the Java programming language and Java platform introduced by Sun Microsystems in May 1995.
JAVA技术是一个跨平台的软件技术。符合 J2ME规范的 JAVA应用 程序 (MIDlet )可以在不同的硬件设备上经过简单的调整和适配(甚至 完全不需要调整) 而运行, 而不用考虑硬件设备平台的处理器及操作系 统细节。 JAVA 本身的跨平台特性依赖于其抽象的程序运行环境也即 JAVA虚拟机。 实现 JAVA虚拟机的核心部分功能通常被称为 JAVA内核 ( Core ), 或者也简单的称为 JVM。  JAVA technology is a cross-platform software technology. J2ME-compliant JAVA applications (MIDlets) can be easily adapted and adapted (even without adjustment at all) on different hardware devices, regardless of the processor and operating system details of the hardware device platform. The cross-platform nature of JAVA itself depends on its abstract program runtime environment, the JAVA virtual machine. The core part of the implementation of the JAVA virtual machine is often referred to as the JAVA kernel (Core), or simply JVM.
不同的 JAVA应用程序运行在同一个硬件设备上时需要对其资源和 记录信息的管理, 这部分功能通常称为 JAVA应用程序管理器(JAM ), 或称为应用管理层, 可以看作 JAVA虚拟机的一部分,也可以看作 JAVA 内核之上的一个基础的应用层。  Different JAVA applications need to manage their resources and record information when running on the same hardware device. This part of the function is usually called JAVA Application Manager (JAM), or application management layer, which can be regarded as JAVA virtual. Part of the machine can also be seen as a basic application layer on top of the JAVA kernel.
为了将 JAVA技术的整体运行于另一个实体软硬件平台上, 需要一 些嫁接和适配的工作。 于此相关的所有软件硬件配合部分通常被称为 JAVA的适配及 JAVA适配层。  In order to run the entire JAVA technology on another physical hardware and software platform, some grafting and adaptation work is required. All software and hardware mating parts related to this are often referred to as JAVA adaptation and JAVA adaptation layers.
运行在 JAVA适配层之下的就是系统平台,以及一些底层应用程序。 其他更高层的应用也可能与 JAVA系统和 JAVA应用程序发生通讯等操 作 , 但往往不能直接通讯, 而是通过 JAVA适配层和 JAVA内核和 JAM 的帮助。 JAVA技术是一个高度标准化的技术。 通常情况下, 任何没有被纳 入标准的功能无法被 JAVA应用程序创造性实现, 否则该 JAVA应用程 序难以在不同系统间自由适应, 也即难以跨平台运行。 但在标准化技术 滞后的情况下, 一些新出现的应用需求必然导致对现有功能的扩展。 Running under the JAVA adaptation layer is the system platform, as well as some underlying applications. Other higher-level applications may also communicate with JAVA systems and JAVA applications, but often do not communicate directly, but through the JAVA adaptation layer and the JAVA kernel and JAM help. JAVA technology is a highly standardized technology. Often, any functionality that is not included in the standard cannot be creatively implemented by a JAVA application, otherwise the JAVA application is difficult to adapt between different systems, ie it is difficult to run across platforms. However, in the case of standardization technology lags, some emerging application requirements will inevitably lead to the expansion of existing functions.
比如, 存在这样一种应用需求, 即用户强烈要求 JAVA应用程序在 后台运行时, 设备能在前台提示一些关键信息, 即 JAVA应用程序能够 向本地传递信息。 目前能满足上述应用需求的技术是标准技术 JSR211 , 能够实现 JAVA应用程序与本地的双向交互。 但是, JSR211涉及较广, 需要 JVM、 JAVA应用程序管理器(JAM )、 JAVA应用程序和平台的共 同支持, 实现成本 4艮高。  For example, there is an application requirement that when a user strongly requests a JAVA application to run in the background, the device can prompt some key information in the foreground, that is, the JAVA application can deliver information locally. The current technology that meets the above application requirements is the standard technology JSR211, which enables two-way interaction between JAVA applications and the local. However, JSR211 is more extensive and requires the common support of JVM, JAVA application manager (JAM), JAVA application and platform, and the implementation cost is 4艮.
【发明内容】 [Summary of the Invention]
本发明主要解决的技术问题是提供一种 JAVA应用程序向本地传递 信息的方法及设备, 能够在不改变现有技术标准的前提下实现设备后台 运行的 JAVA应用程序向设备本地应用模块传递信息的功能。  The technical problem to be solved by the present invention is to provide a method and a device for transmitting information to a local application by a JAVA application, which can realize the JAVA application running in the background of the device to transmit information to the local application module of the device without changing the existing technical standards. Features.
为解决上述技术问题, 本发明釆用的一个技术方案是: 提供一种 JAVA应用程序向本地传递信息的方法, 包括:  In order to solve the above technical problem, a technical solution adopted by the present invention is: Providing a method for a JAVA application to transmit information to a local, including:
使设备的 JAVA应用程序通过调用标准的 JAVA接口平台请求 PlatfromRequest, 将所述 JAVA应用程序待传递信息传给 JAVA虚拟机 JVM, 其中在 JAVA接口平台请求中域名之后, 按预定规则集合有本 JAVA应用程序名、本地应用模块名以及待传递信息, 所述 JAVA应用程 序名对应待传递信息的来源, 所述本地应用模块名是待传递信息要到达 的目标应用模块名称;使所述 JVM将 JAVA接口平台请求作为普通请求 交给 JAVA适配层;所述 JAVA适配层判断 JAVA接口平台请求中的被请 求 URL 目标地址是否为 "Localhost"、 "127.0.0.1" 或 "::1" ; 在所述被 请求 URL目标地址为 "Localhost"、 "127.0.0.1" 或 "::1" 时, 使 JAVA 适配层按照所述预定规则解析出 JAVA接口平台请求中域名之后的 JAVA应用程序名、本地应用模块名以及待传递信息; 使所述 JAVA适配 层根据 JAVA应用程序名对 JAVA应用程序进行鉴权;在所述 JAVA应用 程序鉴权通过时, 将所述待传递信息发给所述本地应用模块名所对应的 本地应用模块。 The JAVA application of the device requests the PlatfromRequest by calling a standard JAVA interface platform, and transmits the JAVA application to be transmitted to the JAVA virtual machine JVM. After the domain name is requested by the JAVA interface platform, the JAVA application is set according to a predetermined rule. a program name, a local application module name, and a to-be-delivered information, where the JAVA application name corresponds to a source of the information to be delivered, the local application module name is a target application module name to which the information to be delivered is to arrive; and the JVM is to be a JAVA interface The platform request is handed over to the JAVA adaptation layer as a normal request; the JAVA adaptation layer determines whether the requested URL target address in the JAVA interface platform request is "Localhost", "127.0.0.1" or "::1"; Narrative When the request URL address is "Localhost", "127.0.0.1" or "::1", the JAVA adaptation layer parses the JAVA application name and the local application module after the domain name in the JAVA interface platform request according to the predetermined rule. And the information to be delivered; causing the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name; and sending the to-be-delivered information to the local application module when the JAVA application authentication is passed The local application module corresponding to the name.
其中, 使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请 求中域名之后的 JAVA应用程序名、 本地应用模块名以及待传递信息的 步骤包括: 使 JAVA适配层检查 JAVA接口平台请求中域名之后字符串 中的第一分隔符和第二分隔符, 将 JAVA接口平台请求中域名之后、 第 一分隔符之前的内容解析出来, 作为 JAVA应用程序名; 将第一分隔符 之后、 第二分隔符之前的内容解析出来, 作为本地应用模块名; 将第二 分隔符之后至字符串结束的内容解析出来, 作为待传递信息。  The step of causing the JAVA adaptation layer to parse the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule includes: causing the JAVA adaptation layer to check the JAVA interface platform request. The first delimiter and the second delimiter in the string after the domain name are parsed after the domain name in the JAVA interface platform request and before the first delimiter, as the JAVA application name; after the first delimiter, second The content before the delimiter is parsed as the local application module name; the content after the second delimiter to the end of the string is parsed as the information to be delivered.
其中, 将所述待传递信息发给所述本地应用模块名所对应的本地应 用模块的步骤包括: 将所述待传递信息整形后, 发给所述本地应用模块 名所对应的本地应用模块。  The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and then sending the information to the local application module corresponding to the local application module name.
其中, 将所述待传递信息发给所述本地应用模块名所对应的本地应 用模块的步骤包括: 将所述待传递信息通过线程之间的事件、 进程之间 的事件、 或线程与进程之间的事件, 发给所述本地应用模块名所对应的 本地应用模块。  The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: passing the information to be delivered through an event between threads, an event between processes, or between a thread and a process The event is sent to the local application module corresponding to the local application module name.
为解决上述技术问题, 本发明釆用的另一个技术方案是: 提供一种 JAVA应用程序向本地传递信息的方法, 包括: 使设备的 JAVA应用程序 通过调用标准的 JAVA接口平台请求 【 PlatfromRequest(URL)】, 将所述 JAVA应用程序待传递信息传给 JAVA虚拟机, 其中在 JAVA接口平台请 求中域名之后, 按预定规则集合有本 JAVA应用程序名、 本地应用模块 名以及待传递信息, 所述 JAVA应用程序名对应待传递信息的来源, 所 述本地应用模块名是待传递信息要到达的目标应用模块名称; 使所述 JVM将 JAVA接口平台请求交给 JAVA适配层; 使所述 JAVA适配层判 断 JAVA接口平台请求中的被请求 URL目标地址是否为当前设备回叫标 准主机; 在所述被请求 URL 目标地址为当前设备回叫标准主机时, 使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请求中域名之后 的 JAVA应用程序名、 本地应用模块名以及待传递信息; 使所述 JAVA 适配层根据 JAVA应用程序名对 JAVA应用程序进行鉴权; 在所述 JAVA 应用程序鉴权通过时, 将所述待传递信息发给所述本地应用模块名所对 应的本地应用模块。 In order to solve the above technical problem, another technical solution adopted by the present invention is: Providing a method for a JAVA application to transmit information to a local device, comprising: causing a JAVA application of the device to request [Plattfrom Request (URL) by calling a standard JAVA interface platform. The JAVA application to be passed to the JAVA virtual machine, wherein after the JAVA interface platform requests the domain name, the JAVA application name and the local application module are set according to a predetermined rule. Name and information to be delivered, the JAVA application name corresponds to the source of the information to be delivered, the local application module name is the target application module name to be delivered to the information; the JVM is required to submit the JAVA interface platform request to JAVA Configuring the JAVA adaptation layer to determine whether the requested URL target address in the JAVA interface platform request is the current device callback standard host; when the requested URL target address is the current device callback standard host, enable JAVA The adaptation layer parses the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule; and causes the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name. The information to be delivered is sent to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
其中, 使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请 求中域名之后的 JAVA应用程序名、 本地应用模块名以及待传递信息的 步骤包括: 使 JAVA适配层检查 JAVA接口平台请求中域名之后字符串 中的第一分隔符和第二分隔符, 将 JAVA接口平台请求中域名之后、 第 一分隔符之前的内容解析出来, 作为 JAVA应用程序名; 将第一分隔符 之后、 第二分隔符之前的内容解析出来, 作为本地应用模块名; 将第二 分隔符之后至字符串结束的内容解析出来, 作为待传递信息。  The step of causing the JAVA adaptation layer to parse the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule includes: causing the JAVA adaptation layer to check the JAVA interface platform request. The first delimiter and the second delimiter in the string after the domain name are parsed after the domain name in the JAVA interface platform request and before the first delimiter, as the JAVA application name; after the first delimiter, second The content before the delimiter is parsed as the local application module name; the content after the second delimiter to the end of the string is parsed as the information to be delivered.
其中, 将所述待传递信息发给所述本地应用模块名所对应的本地应 用模块的步骤包括: 将所述待传递信息整形后, 发给所述本地应用模块 名所对应的本地应用模块。  The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and then sending the information to the local application module corresponding to the local application module name.
其中, 将所述待传递信息发给所述本地应用模块名所对应的本地应 用模块的步骤包括: 将所述待传递信息通过线程之间的事件、 进程之间 的事件、 或线程与进程之间的事件, 发给所述本地应用模块名所对应的 本地应用模块。  The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: passing the information to be delivered through an event between threads, an event between processes, or between a thread and a process The event is sent to the local application module corresponding to the local application module name.
其中, 使所述 JVM将 JAVA接口平台请求交给 JAVA适配层的步骤 包括: 使所述 JVM将 JAVA接口平台请求作为普通请求交给 JAVA适配 层。 The step of causing the JVM to hand over the JAVA interface platform request to the JAVA adaptation layer The method includes: causing the JVM to submit the JAVA interface platform request as a normal request to the JAVA adaptation layer.
其中, 所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL 目标地址是否为当前设备回叫标准主机步骤包括: 所述 JAVA适配层判 断 JAVA接口平台请求中的被请求 URL 目标地址是否为 "Localhost"、 "127.0.0.1" 或 "::1"。  The step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining whether the requested URL target address in the JAVA interface platform request is Is "Localhost", "127.0.0.1" or "::1".
为解决上述技术问题, 本发明釆用的另一个技术方案是: 提供一种 基于 JAVA的设备, 包括: 请求发送单元, 用于使设备的 JAVA应用程 序通过调用标准的 JAVA接口平台请求, 将所述 JAVA应用程序待传递 信息传给 JAVA虚拟机, 其中在 JAVA接口平台请求中域名之后, 按预 定规则集合有本 JAVA应用程序名、 本地应用模块名以及待传递信息, 所述 JAVA应用程序名对应待传递信息的来源, 所述本地应用模块名是 待传递信息要到达的目标应用模块名称; 第一传递单元, 用于使所述 JVM将 JAVA接口平台请求交给 JAVA适配层; 地址判断单元, 用于使 所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是 否为当前设备回叫标准主机; 信息解析单元, 用于在所述被请求 URL 目标地址为当前设备回叫标准主机时, 使 JAVA适配层按照所述预定规 则解析出 JAVA接口平台请求中域名之后的 JAVA应用程序名、 本地应 用模块名以及待传递信息; 程序鉴权单元, 用于使所述 JAVA适配层根 据 JAVA应用程序名对 JAVA应用程序进行鉴权; 第二传递单元, 用于 在所述 JAVA应用程序鉴权通过时, 将所述待传递信息发给所述本地应 用模块名所对应的本地应用模块。  In order to solve the above technical problem, another technical solution adopted by the present invention is: providing a JAVA-based device, comprising: a request sending unit, configured to enable a JAVA application of the device to request by calling a standard JAVA interface platform, The JAVA application to be passed to the JAVA virtual machine, wherein after the domain name is requested by the JAVA interface platform, the JAVA application name, the local application module name, and the to-be-delivered information are set according to a predetermined rule, and the JAVA application name corresponds to The source of the information to be delivered, the local application module name is the name of the target application module to be delivered; the first delivery unit is configured to enable the JVM to submit the JAVA interface platform request to the JAVA adaptation layer; And the JAVA adaptation layer is configured to determine whether the requested URL target address in the JAVA interface platform request is a current device callback standard host; and the information parsing unit is configured to: call back the current device in the requested URL target address When the standard host is used, the JAVA adaptation layer parses the JAVA connection according to the predetermined rule. The JAVA application name, the local application module name, and the information to be delivered after the domain name in the port platform request; the program authentication unit, configured to enable the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name; The delivery unit is configured to send the to-be-delivered information to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
其中, 所述信息解析单元具体用于使 JAVA适配层检查 JAVA接口 平台请求中域名之后字符串中的第一分隔符和第二分隔符, 将 JAVA接 口平台请求中域名之后、 第一分隔符之前的内容解析出来, 作为 JAVA 应用程序名; 将第一分隔符之后、 第二分隔符之前的内容解析出来, 作 为本地应用模块名; 将第二分隔符之后至字符串结束的内容解析出来, 作为待传递信息。 The information parsing unit is specifically configured to enable the JAVA adaptation layer to check the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, and after the domain name in the JAVA interface platform request, the first delimiter The previous content is parsed out as JAVA The application name; parsing the content after the first delimiter and before the second delimiter as the local application module name; parsing the content after the second delimiter to the end of the string as the information to be delivered.
其中, 第二传递单元具体用于将所述待传递信息通过线程之间的事 件、 进程之间的事件、 或线程与进程之间的事件, 发给所述本地应用模 块名所对应的本地应用模块。  The second delivery unit is specifically configured to send the information to be delivered to an local application module corresponding to the local application module name by using an event between threads, an event between processes, or an event between a thread and a process. .
其中, 所述地址判断单元具体用于所述 JAVA适配层判断 JAVA接 口平台请求中的被请求 URL目标地址是否为 "Localhost"、 "127.0.0.1" 或 "::1"。  The address determining unit is specifically configured to determine, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is "Localhost", "127.0.0.1" or "::1".
本发明的有益效果是: 区别于现有技术基于目前技术标准情况下、 实现 JAVA应用程序与设备本地应用模块之间信息传递成本过高的情 况, 本发明利用英特网技术中一个不能被重用的主机名, 即 Localhost 作为 JAVA应用程序与设备本地应用模块之间的桥梁, 将待传递信息和 本地应用模块名放入 JAVA接口平台请求中, 使 JAVA适配层判断来自 JVM的 JAVA接口平台请求中的被请求 URL 目标地址是否为当前设备 回叫标准主机, 在判断为是时, 将所述待传递信息发至本地应用模块, 无需更改现有技术标准, 简易方便且成本低, 并且不会导致 JAVA应用 程序在其他平台上运行时出现严重副作用的情况。  The beneficial effects of the present invention are: different from the prior art, in the case that the information transmission cost between the JAVA application and the device local application module is too high based on the current technical standards, the present invention utilizes one of the Internet technologies cannot be reused. The host name, that is, Localhost, serves as a bridge between the JAVA application and the device's local application module. The information to be passed and the local application module name are placed in the JAVA interface platform request, so that the JAVA adaptation layer can determine the JAVA interface platform request from the JVM. Whether the requested URL of the requested URL is the current device callback standard host. When the determination is yes, the information to be delivered is sent to the local application module, without changing the existing technical standards, which is simple and convenient, and low in cost, and will not A situation that causes serious side effects when JAVA applications are running on other platforms.
【附图说明】 [Description of the Drawings]
图 1是本法 JAVA应用程序向本地传递信息的方法实施例的流程图; 图 2是本发明基于 JAVA的设备实施例的原理框图。  1 is a flow chart of an embodiment of a method for transmitting information to a local JAVA application; FIG. 2 is a schematic block diagram of an embodiment of a JAVA-based device of the present invention.
【具体实施方式】 【detailed description】
Localhost是一个英特网技术领域的标准主机名称,用来代表当前设 备的回叫。 "Localhost" "..Localhost"也是被预留的国际域名, 即一个不 能被重用的主机名。 Localhost会被翻译为一个回叫 IP地址, 在 IPV4时 代是 "127.0.0.1" , 在 IPv6时代是 "::1"。 对 Localhost的本地请求, 如 http://Localhost, 会永远显示本地 WEB站点的主页(因为 http被用作站 点浏览的默认协议), 如果存在的话。 Localhost is a standard host name in the field of Internet technology and is used to represent the current setting. Ready to call back. "Localhost""..Localhost" is also the reserved international domain name, which is a hostname that cannot be reused. Localhost will be translated as a callback IP address, which is "127.0.0.1" in the IPV4 era and "::1" in the IPv6 era. Local requests to Localhost, such as http://Localhost, will always display the home page of the local WEB site (because http is used as the default protocol for site browsing), if it exists.
因为 Localhost的特殊性,大多数移动通讯设备因为不存在一个本地 WEB 站点, 故不需要支持, 也不必在本地接受这个地址以待浏览器等 WEB 应用的访问。 这给本发明釆用对该地址的请求以实现功能扩展创 造了条件。  Because of the special nature of Localhost, most mobile communication devices do not need support because they do not have a local WEB site, and do not need to accept this address locally for access to web applications such as browsers. This creates the conditions for the present invention to use the request for the address to achieve functional extension.
所述的功能扩展, 包括: 用户要求 JAVA应用程序在后台运行时, 设备能在前台提示一些来自 JAVA应用程序的关键信息, 即 JAVA应用 程序能够向本地传递信息。  The function extensions include: User requirements When the JAVA application is running in the background, the device can prompt some key information from the JAVA application in the foreground, that is, the JAVA application can transmit information to the local.
为了简易快捷地实现这一市场需求,本发明扩展标准的 JAVA接口, 利用 Localhost作为通道, 实现后台 JAVA应用程序的信息传递, 本地收 到信息后再进行相应处理。 本方法不会导致该 JAVA程序在其他平台上 运行时出现严重副作用。 以下具体描述本发明各实施例:  In order to realize this market demand quickly and easily, the invention expands the standard JAVA interface, and uses Localhost as a channel to realize the information transmission of the background JAVA application, and then receives the information locally and then performs corresponding processing. This method does not cause serious side effects when the JAVA program runs on other platforms. The embodiments of the present invention are specifically described below:
参阅图 1 , 本发明 JAVA应用程序向本地传递信息的方法实施例包 括:  Referring to FIG. 1, an embodiment of a method for transmitting information to a local JAVA application includes:
步骤 101 :使设备的 JAVA应用程序通过调用标准的 JAVA接口平台 请求【PlatfromRequest(URL)】, 将所述 JAVA应用程序待传递信息传给 JAVA虚拟机 (JVM), 其中在 JAVA接口平台请求中域名之后, 按预定规 则集合有本 JAVA应用程序名、 本地应用模块名以及待传递信息, 所述 JAVA应用程序名对应待传递信息的来源, 所述本地应用模块名是待传 递信息要到达的目标应用模块名称;  Step 101: The JAVA application of the device requests [PlatfromRequest(URL)] by calling a standard JAVA interface platform, and transmits the JAVA application to be transmitted to the JAVA virtual machine (JVM), where the domain name is requested in the JAVA interface platform. Then, according to the predetermined rule, the JAVA application name, the local application module name, and the to-be-delivered information are set, the JAVA application name corresponds to the source of the information to be delivered, and the local application module name is the target application to be delivered. Module name;
步骤 102: 使所述 JVM将 JAVA接口平台请求交给 JAVA适配层; 到此步骤时, 一切都在遵循 JAVA技术标准, 不需要 JVM的特别参 与, 也不会被 JVM破坏数据。 Step 102: Enable the JVM to submit the JAVA interface platform request to the JAVA adaptation layer. At this point, everything is in compliance with JAVA technical standards, without the special involvement of the JVM, and without the data being destroyed by the JVM.
步骤 103:使所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是否为当前设备回叫标准主机 (Localhost);  Step 103: The JAVA adaptation layer determines whether the requested URL target address in the JAVA interface platform request is a current device callback standard host (Localhost);
步骤 104:在所述被请求 URL目标地址为当前设备回叫标准主机时, 使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请求中域名之 后的 JAVA应用程序名、 本地应用模块名以及待传递信息;  Step 104: When the requested URL target address is the current device callback standard host, the JAVA adaptation layer parses the JAVA application name, the local application module name, and the domain name after the domain name in the JAVA interface platform request according to the predetermined rule. Information to be delivered;
比如在一个例子中, 对于 JAVA接口平台请求中, URL 格式为 "http://" 开头的 PlatformRequest, 现有 JAVA技术标准要求调用设备上 的浏览器访问指定的 URL。 而这部分是通过 JAVA适配层的解释和对平 台应用模块调用实现的。 通过 JAVA适配层, 按照所述预定规则解析出 JAVA接口平台请求中域名之后的 JAVA应用程序名、本地应用模块名以 及待传递信息。  For example, in an example, for a JAVA interface platform request, the PlatformRequest whose URL format is "http://", the existing JAVA technical standard requires that the browser on the device be called to access the specified URL. This part is implemented through the interpretation of the JAVA adaptation layer and the call to the platform application module. Through the JAVA adaptation layer, the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request are parsed according to the predetermined rule.
步骤 105: 使所述 JAVA适配层根据 JAVA应用程序名对 JAVA应用 程序进行鉴权;  Step 105: Enable the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name.
即按照 JAVA应用程序名, 判断该应用程序在适配层是否认识, 该 应用程序是否在本设备可以使用本方法, 也即鉴权。  That is, according to the JAVA application name, it is judged whether the application is recognized at the adaptation layer, and whether the application can use the method, that is, authentication, on the device.
步骤 106: 在所述 JAVA应用程序鉴权通过时, 将所述待传递信息 发给所述本地应用模块名所对应的本地应用模块。  Step 106: Send the to-be-delivered information to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
以上可以了解, 本发明利用英特网技术中一个不能被重用的主机 名, 即 Localhost作为 JAVA应用程序与设备本地应用模块之间的桥梁, 将待传递信息和本地应用模块名放入 JAVA接口平台请求中, 使 JAVA 适配层判断来自 JVM的 JAVA接口平台请求中的被请求 URL目标地址 是否为当前设备回叫标准主机, 在判断为是时, 将所述待传递信息发至 本地应用模块, 无需更改现有技术标准, 简易方便且成本低, 并且不会 导致 JAVA应用程序在其他平台上运行时出现严重副作用的情况。 As can be understood from the above, the present invention utilizes a host name that cannot be reused in the Internet technology, that is, Localhost serves as a bridge between the JAVA application and the local application module of the device, and puts the information to be transmitted and the name of the local application module into the JAVA interface platform. In the request, the JAVA adaptation layer determines whether the requested URL target address in the JAVA interface platform request from the JVM is the current device callback standard host. When the determination is yes, the information to be delivered is sent to the local application module. No need to change existing technical standards, easy and convenient, and low cost, and will not A situation that causes serious side effects when JAVA applications are running on other platforms.
在另一个实施例中,使 JAVA适配层按照所述预定规则解析出 JAVA 接口平台请求中域名之后的 JAVA应用程序名、 本地应用模块名以及待 传递信息的步骤包括:  In another embodiment, the step of causing the JAVA adaptation layer to parse the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule includes:
使 JAVA适配层检查 JAVA接口平台请求中域名之后字符串中的第 一分隔符和第二分隔符, 将 JAVA接口平台请求中域名之后、 第一分隔 符之前的内容解析出来, 作为 JAVA应用程序名; 将第一分隔符之后、 第二分隔符之前的内容解析出来, 作为本地应用模块名; 将第二分隔符 之后至字符串结束的内容解析出来, 作为待传递信息。  The JAVA adaptation layer checks the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, and parses the content after the domain name in the JAVA interface platform request and before the first delimiter as the JAVA application. Name; parsing the content after the first delimiter and before the second delimiter as the local application module name; parsing the content after the second delimiter to the end of the string as the information to be delivered.
所述分隔符可以是 "/" , 也可以是其他用于识别、 分割的符合, 比 如以分隔符为 "/" 作为例子, 则按照以下规则解析 URL中域名部分之 后字符串的信息:  The delimiter can be "/" or other conformance for identification and segmentation. For example, if the separator is "/" as an example, the following string rules are used to parse the string of the domain name in the URL:
URL 在域名和端口部分之外的字符串, 由 "/" 进行分割, 代表目 标路径信息也即目录和文件信息。 其中有以下定义:  A string whose URL is outside the domain name and port part, separated by "/", which represents the target path information, that is, the directory and file information. Among them are the following definitions:
1 )域名部分之后的第一级目录名被重载为 "JAVA应用程序名", 用来指示本请求的来源, 也即 JAVA应用程序的名称。 该名称(字符串) 是由 JAVA应用程序开发者与 JAVA适配层实现者预先确定的, 并不是 JAVA应用程序本身的名字, 或其安装文件的名字, 或者其在安装之后 的显示名字。  1) The first level directory name after the domain name part is overloaded as "JAVA application name" to indicate the source of the request, which is the name of the JAVA application. The name (string) is predetermined by the JAVA application developer and the JAVA adaptation layer implementer, not the name of the JAVA application itself, or the name of its installation file, or its display name after installation.
2 )第二级目录名被重载为 "本地应用模块名", 也即该 JAVA应用 程序要和本地进行通信的那一个应用模块, 如电话本, 电子邮件, 桌面 应用等。 这也是需要双方预先确定的。  2) The second-level directory name is reloaded as "local application module name", which is the application module that the JAVA application wants to communicate with locally, such as phone book, email, desktop application, and so on. This also requires the parties to predetermine.
3 )第三级目录开始到 URL结束是应用相关的数据部分。 具体格式 由双方预先确定, 本实施例不做特殊限定。  3) The third level directory starts to the end of the URL is the application related data part. The specific format is determined in advance by both parties, and this embodiment is not particularly limited.
在解析之后进行信息提取: 1 )提取 JAVA应用程序名, 也即读取第一级目录位置的信息。 Extract information after parsing: 1) Extract the JAVA application name, that is, read the information of the first level directory location.
2 )在对 JAVA应用程序进行鉴权后提取本地应用模块名, 也即读取 第二级目录位置的信息, 并将第二级目录之后的 URL 的其余部分, 作 为应用信息, 也即将要传递的信息内容。  2) After the JAVA application is authenticated, the local application module name is extracted, that is, the information of the second-level directory location is read, and the rest of the URL after the second-level directory is used as the application information, which is also about to be transmitted. Information content.
上述 JAVA应用程序名、 本地应用模块名以及待传递信息集合的形 式仅仅是一个应用例子, 但本发明不限于上述例子, 比如釆用 "%" 作 为分隔符。  The above JAVA application name, the local application module name, and the form of the information set to be delivered are merely an application example, but the present invention is not limited to the above example, for example, "%" is used as a separator.
在另一个实施例中, 将所述待传递信息发给所述本地应用模块名所 对应的本地应用模块的步骤包括: 将所述待传递信息整形后, 发给所述 本地应用模块名所对应的本地应用模块。  In another embodiment, the step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and sending the information to the local corresponding to the local application module name Application module.
经过信息整形后的待传递信息, 更符合本地应用模块的接收要求。 在另一个实施例中, 将所述待传递信息发给所述本地应用模块名所 对应的本地应用模块的步骤包括: 将所述待传递信息通过线程之间的事 件、 进程之间的事件、 或线程与进程之间的事件, 发给所述本地应用模 块名所对应的本地应用模块。  The information to be transmitted after the information shaping is more in line with the receiving requirements of the local application module. In another embodiment, the step of sending the to-be-delivered information to the local application module corresponding to the local application module name comprises: passing the information to be delivered through an event between threads, an event between processes, or The event between the thread and the process is sent to the local application module corresponding to the local application module name.
待传递信息发给所述本地应用模块名所对应的本地应用模块的方 式可以有很多, 本发明不再赘述。  The manner in which the information to be delivered is sent to the local application module corresponding to the local application module name may be many, and the present invention will not be described again.
在另一个实施例中, 使所述 JVM将 JAVA接口平台请求交给 JAVA 适配层的步骤包括:使所述 JVM将 JAVA接口平台请求作为普通请求交 给 JAVA适配层。  In another embodiment, the step of causing the JVM to hand the JAVA interface platform request to the JAVA adaptation layer includes causing the JVM to hand the JAVA interface platform request as a normal request to the JAVA adaptation layer.
当然,也可以使所述 JVM将 JAVA接口平台请求作为特别请求交给 JAVA适配层。  Of course, the JVM can also be made to hand the JAVA interface platform request as a special request to the JAVA adaptation layer.
在另一个实施例中, 所述 JAVA适配层判断 JAVA接口平台请求中 的被请求 URL 目标地址是否为当前设备回叫标准主机步骤包括: 所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是否为 "Localhost"、 "127.0.0.1" 或 "::Γ,。 In another embodiment, the step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining the JAVA interface platform request Request URL destination address is "Localhost", "127.0.0.1" or "::Γ,.
下面举一个实际例子:  Here's a practical example:
如 JAVA应用程序需要向 JVM提起如下的平台请求:  For example, a JAVA application needs to file the following platform request with the JVM:
PlatfromRequest(http://l 27.0.0.1 /MidletX/ honebook/ne w&name= John sonParker&number=00862156890000). 按照本方法, 代表一个叫 MidletX 的 JAVA 应 用 程 序 要 求 要 把 信 息 "new&name=JohnsonParker&number=00862156890000 " 传递给一个叫 phonebook的本地应用模块。  PlatfromRequest(http://l 27.0.0.1 /MidletX/ honebook/ne w&name= John sonParker&number=00862156890000). According to this method, a JAVA application called MidletX is required to pass the message "new&name=JohnsonParker&number=00862156890000" to a Call the native application module of the phonebook.
参阅图 2, 基于本发明, 还提供一种基于 JAVA的设备实施例, 包 括:  Referring to FIG. 2, based on the present invention, a JAVA-based device embodiment is further provided, including:
请求发送单元,用于使设备的 JAVA应用程序通过调用标准的 JAVA 接口平台请求 PlatfromRequest, 将所述 JAVA应用程序待传递信息传给 JAVA虚拟机 JVM , 其中在 JAVA接口平台请求中域名之后, 按预定规 则集合有本 JAVA应用程序名、 本地应用模块名以及待传递信息, 所述 JAVA应用程序名对应待传递信息的来源, 所述本地应用模块名是待传 递信息要到达的目标应用模块名称;  a request sending unit, configured to enable the JAVA application of the device to request a PlatfromRequest by calling a standard JAVA interface platform, and transmit the JAVA application to be transmitted to the JAVA virtual machine JVM, where the JAVA interface platform requests the domain name, according to the reservation The rule set has the JAVA application name, the local application module name, and the information to be delivered, the JAVA application name corresponds to the source of the information to be delivered, and the local application module name is the target application module name to which the information to be delivered is to be reached;
第一传递单元, 用于使所述 JVM将 JAVA接口平台请求交给 JAVA 适配层;  a first delivery unit, configured to enable the JVM to submit a JAVA interface platform request to the JAVA adaptation layer;
地址判断单元, 用于使所述 JAVA适配层判断 JAVA接口平台请求 中的被请求 URL目标地址是否为当前设备回叫标准主机;  An address determining unit, configured to: determine, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is a current device callback standard host;
信息解析单元, 用于在所述被请求 URL 目标地址为当前设备回叫 标准主机时, 使 JAVA适配层按照所述预定规则解析出 JAVA接口平台 请求中域名之后的 JAVA应用程序名、本地应用模块名以及待传递信息; 程序鉴权单元, 用于使所述 JAVA适配层根据 JAVA应用程序名对 JAVA应用程序进行鉴权; 第二传递单元, 用于在所述 JAVA应用程序鉴权通过时, 将所述待 传递信息发给所述本地应用模块名所对应的本地应用模块。 The information parsing unit is configured to: when the requested URL target address is the current device callback standard host, enable the JAVA adaptation layer to parse the JAVA application name and the local application after the domain name in the JAVA interface platform request according to the predetermined rule. a module name and information to be delivered; a program authentication unit, configured to enable the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name; The second delivery unit is configured to send the to-be-delivered information to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
所述基于 JAVA的设备可以是手机、便携式游戏机、个人数字助理、 笔记本等等。  The JAVA-based device can be a cell phone, a portable game console, a personal digital assistant, a notebook, and the like.
其中, 所述信息解析单元具体用于使 JAVA适配层检查 JAVA接口 平台请求中域名之后字符串中的第一分隔符和第二分隔符, 将 JAVA接 口平台请求中域名之后、 第一分隔符之前的内容解析出来, 作为 JAVA 应用程序名; 将第一分隔符之后、 第二分隔符之前的内容解析出来, 作 为本地应用模块名; 将第二分隔符之后至字符串结束的内容解析出来, 作为待传递信息。  The information parsing unit is specifically configured to enable the JAVA adaptation layer to check the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, and after the domain name in the JAVA interface platform request, the first delimiter The previous content is parsed as the JAVA application name; the content after the first delimiter and before the second delimiter is parsed as the local application module name; the content after the second delimiter to the end of the string is parsed. As the information to be delivered.
其中, 所述第二传递单元具体用于将所述待传递信息通过线程之间 的事件、 进程之间的事件、 或线程与进程之间的事件, 发给所述本地应 用模块名所对应的本地应用模块。  The second delivery unit is specifically configured to send the information to be delivered to an local event corresponding to the local application module name by an event between threads, an event between processes, or an event between a thread and a process. Application module.
其中, 所述地址判断单元具体用于所述 JAVA适配层判断 JAVA接 口平台请求中的被请求 URL目标地址是否为 "Localhost"、 "127.0.0.1" 或 "::1"。  The address determining unit is specifically configured to determine, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is "Localhost", "127.0.0.1" or "::1".
以上所述仅为本发明的实施例, 并非因此限制本发明的专利范围, 凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换, 或 直接或间接运用在其他相关的技术领域, 均同理包括在本发明的专利保 护范围内。  The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present invention may be directly or indirectly applied to other related technologies. The scope of the invention is included in the scope of patent protection of the present invention.

Claims

权 利 要求 Rights request
1. 一种 JAVA应用程序向本地传递信息的方法, 其特征在于, 包括: 使设备的 JAVA 应用程序通过调用标准的 JAVA 接口平台请求 PlatfromRequest, 将所述 JAVA应用程序待传递信息传给 JAVA虚拟机 JVM, 其 中在 JAVA接口平台请求中域名之后, 按预定规则集合有本 JAVA应用程序名、 本地应用模块名以及待传递信息, 所述 JAVA应用程序名对应待传递信息的来 源, 所述本地应用模块名是待传递信息要到达的目标应用模块名称; A method for transmitting information to a local application by a JAVA application, comprising: causing a JAVA application of the device to request a PlatfromRequest by calling a standard JAVA interface platform, and transmitting the information to be transmitted by the JAVA application to the JAVA virtual machine a JVM, wherein after the domain name is requested by the JAVA interface platform, the JAVA application name, the local application module name, and the to-be-delivered information are set according to a predetermined rule, and the JAVA application name corresponds to a source of the information to be delivered, and the local application module The name is the name of the target application module to which the information to be delivered is to be reached;
使所述 JVM将 JAVA接口平台请求作为普通请求交给 JAVA适配层; 所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是否 为 "Localhost"、 "127.0.0.1" 或 "::1" ;  And causing the JVM to submit the JAVA interface platform request as a normal request to the JAVA adaptation layer; the JAVA adaptation layer determines whether the requested URL target address in the JAVA interface platform request is "Localhost", "127.0.0.1" or " ::1" ;
在所述被请求 URL 目标地址为 "Localhost"、 "127.0.0.1" 或 "::1" 时, 使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请求中域名之后的 JAVA 应用程序名、 本地应用模块名以及待传递信息;  When the requested URL target address is "Localhost", "127.0.0.1" or "::1", the JAVA adaptation layer parses the JAVA application name after the domain name in the JAVA interface platform request according to the predetermined rule. , the local application module name and the information to be delivered;
使所述 JAVA适配层根据 JAVA应用程序名对 JAVA应用程序进行鉴权; 在所述 JAVA应用程序鉴权通过时,将所述待传递信息发给所述本地应用模 块名所对应的本地应用模块。  The JAVA adaptation layer is configured to authenticate the JAVA application according to the JAVA application name; when the JAVA application authentication is passed, the information to be delivered is sent to the local application module corresponding to the local application module name. .
2. 根据权利要求 1所述的方法, 其特征在于:  2. The method of claim 1 wherein:
使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请求中域名之后的 JAVA应用程序名、 本地应用模块名以及待传递信息的步骤包括:  The steps of causing the JAVA adaptation layer to parse out the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule include:
使 JAVA适配层检查 JAVA接口平台请求中域名之后字符串中的第一分隔符 和第二分隔符,将 JAVA接口平台请求中域名之后、第一分隔符之前的内容解析 出来, 作为 JAVA应用程序名; 将第一分隔符之后、 第二分隔符之前的内容解析 出来, 作为本地应用模块名; 将第二分隔符之后至字符串结束的内容解析出来, 作为待传递信息。  The JAVA adaptation layer checks the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, and parses the content after the domain name in the JAVA interface platform request and before the first delimiter as the JAVA application. Name; parsing the content after the first delimiter and before the second delimiter as the local application module name; parsing the content after the second delimiter to the end of the string as the information to be delivered.
3. 根据权利要求 1所述的方法, 其特征在于: 将所述待传递信息发给所述本地应用模块名所对应的本地应用模块的步骤 包括: 将所述待传递信息整形后, 发给所述本地应用模块名所对应的本地应用 模块。 3. The method of claim 1 wherein: The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and then sending the information to the local application module corresponding to the local application module name.
4. 根据权利要求 1所述的方法, 其特征在于:  4. The method of claim 1 wherein:
将所述待传递信息发给所述本地应用模块名所对应的本地应用模块的步骤 包括: 将所述待传递信息通过线程之间的事件、 进程之间的事件、 或线程与进 程之间的事件, 发给所述本地应用模块名所对应的本地应用模块。  The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: passing the information to be delivered through an event between threads, an event between processes, or an event between a thread and a process And sending the local application module corresponding to the local application module name.
5. 一种 JAVA应用程序向本地传递信息的方法, 其特征在于, 包括: 使设备的 JAVA 应用程序通过调用标准的 JAVA 接口平台请求 PlatfromRequest, 将所述 JAVA应用程序待传递信息传给 JAVA虚拟机 JVM, 其 中在 JAVA接口平台请求中域名之后, 按预定规则集合有本 JAVA应用程序名、 本地应用模块名以及待传递信息, 所述 JAVA应用程序名对应待传递信息的来 源, 所述本地应用模块名是待传递信息要到达的目标应用模块名称;  A method for a JAVA application to transmit information to a local device, comprising: causing a JAVA application of the device to request a PlatfromRequest by calling a standard JAVA interface platform, and transmitting the information to be transmitted by the JAVA application to the JAVA virtual machine. a JVM, wherein after the domain name is requested by the JAVA interface platform, the JAVA application name, the local application module name, and the to-be-delivered information are set according to a predetermined rule, and the JAVA application name corresponds to a source of the information to be delivered, and the local application module The name is the name of the target application module to which the information to be delivered is to be reached;
使所述 JVM将 JAVA接口平台请求交给 JAVA适配层;  Causing the JVM to submit the JAVA interface platform request to the JAVA adaptation layer;
使所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是 否为当前设备回叫标准主机 Localhost;  And causing the JAVA adaptation layer to determine whether the requested URL destination address in the JAVA interface platform request is the current device callback standard host Localhost;
在所述被请求 URL目标地址为当前设备回叫标准主机时, 使 JAVA适配层 按照所述预定规则解析出 JAVA接口平台请求中域名之后的 JAVA应用程序名、 本地应用模块名以及待传递信息;  When the requested URL target address is the current device callback standard host, the JAVA adaptation layer parses the JAVA application name, the local application module name, and the to-be-delivered information after the domain name in the JAVA interface platform request according to the predetermined rule. ;
使所述 JAVA适配层根据 JAVA应用程序名对 JAVA应用程序进行鉴权; 在所述 JAVA应用程序鉴权通过时,将所述待传递信息发给所述本地应用模 块名所对应的本地应用模块。  The JAVA adaptation layer is configured to authenticate the JAVA application according to the JAVA application name; when the JAVA application authentication is passed, the information to be delivered is sent to the local application module corresponding to the local application module name. .
6. 根据权利要求 5所述的方法, 其特征在于:  6. The method of claim 5, wherein:
使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请求中域名之后的 JAVA应用程序名、 本地应用模块名以及待传递信息的步骤包括:  The steps of causing the JAVA adaptation layer to parse out the JAVA application name, the local application module name, and the information to be delivered after the domain name in the JAVA interface platform request according to the predetermined rule include:
使 JAVA适配层检查 JAVA接口平台请求中域名之后字符串中的第一分隔符 和第二分隔符,将 JAVA接口平台请求中域名之后、第一分隔符之前的内容解析 出来, 作为 JAVA应用程序名; 将第一分隔符之后、 第二分隔符之前的内容解析 出来, 作为本地应用模块名; 将第二分隔符之后至字符串结束的内容解析出来, 作为待传递信息。 Make the JAVA adaptation layer check the first delimiter in the string after the domain name in the JAVA interface platform request And the second delimiter, parsing the content after the domain name in the JAVA interface platform request and before the first delimiter as the JAVA application name; parsing the content after the first delimiter and before the second delimiter as a local Application module name; parsing the content after the second delimiter to the end of the string as the information to be delivered.
7. 根据权利要求 5所述的方法, 其特征在于:  7. The method of claim 5, wherein:
将所述待传递信息发给所述本地应用模块名所对应的本地应用模块的步骤 包括: 将所述待传递信息整形后, 发给所述本地应用模块名所对应的本地应用 模块。  The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: shaping the to-be-transmitted information, and then sending the information to the local application module corresponding to the local application module name.
8. 根据权利要求 5所述的方法, 其特征在于:  8. The method of claim 5, wherein:
将所述待传递信息发给所述本地应用模块名所对应的本地应用模块的步骤 包括: 将所述待传递信息通过线程之间的事件、 进程之间的事件、 或线程与进 程之间的事件, 发给所述本地应用模块名所对应的本地应用模块。  The step of sending the to-be-delivered information to the local application module corresponding to the local application module name includes: passing the information to be delivered through an event between threads, an event between processes, or an event between a thread and a process And sending the local application module corresponding to the local application module name.
9. 根据权利要求 8所述的方法, 其特征在于:  9. The method of claim 8 wherein:
使所述 JVM将 JAVA接口平台请求交给 JAVA适配层的步骤包括: 使所述 JVM将 JAVA接口平台请求作为普通请求交给 JAVA适配层。  The step of causing the JVM to hand over the JAVA interface platform request to the JAVA adaptation layer includes: causing the JVM to hand the JAVA interface platform request as a normal request to the JAVA adaptation layer.
10.根据权利要求 8所述的方法, 其特征在于:  10. The method of claim 8 wherein:
所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是否 为当前设备回叫标准主机步骤包括: 所述 JAVA适配层判断 JAVA接口平台请求 中的被请求 URL目标地址是否为 "Localhost" , "127.0.0.1" 或 "::1"。  The step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining whether the requested URL target address in the JAVA interface platform request is " Localhost" , "127.0.0.1" or "::1".
11.根据权利要求 7所述的方法, 其特征在于:  11. The method of claim 7 wherein:
使所述 JVM将 JAVA接口平台请求交给 JAVA适配层的步骤包括: 使所述 JVM将 JAVA接口平台请求作为普通请求交给 JAVA适配层。  The step of causing the JVM to hand over the JAVA interface platform request to the JAVA adaptation layer includes: causing the JVM to hand the JAVA interface platform request as a normal request to the JAVA adaptation layer.
12.根据权利要求 7所述的方法, 其特征在于:  12. The method of claim 7 wherein:
所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是否 为当前设备回叫标准主机步骤包括: 所述 JAVA适配层判断 JAVA接口平台请求 中的被请求 URL目标地址是否为 "Localhost" , "127.0.0.1" 或 The step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining whether the requested URL target address in the JAVA interface platform request is "Localhost" , "127.0.0.1" or
13.根据权利要求 6所述的方法, 其特征在于: 13. The method of claim 6 wherein:
使所述 JVM将 JAVA接口平台请求交给 JAVA适配层的步骤包括: 使所述 JVM将 JAVA接口平台请求作为普通请求交给 JAVA适配层。  The step of causing the JVM to hand over the JAVA interface platform request to the JAVA adaptation layer includes: causing the JVM to hand the JAVA interface platform request as a normal request to the JAVA adaptation layer.
14.根据权利要求 6所述的方法, 其特征在于:  14. The method of claim 6 wherein:
所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是否 为当前设备回叫标准主机步骤包括: 所述 JAVA适配层判断 JAVA接口平台请求 中的被请求 URL目标地址是否为 "Localhost" , "127.0.0.1" 或 "::1"。  The step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining whether the requested URL target address in the JAVA interface platform request is " Localhost" , "127.0.0.1" or "::1".
15.根据权利要求 5所述的方法, 其特征在于:  15. The method of claim 5 wherein:
使所述 JVM将 JAVA接口平台请求交给 JAVA适配层的步骤包括: 使所述 JVM将 JAVA接口平台请求作为普通请求交给 JAVA适配层。  The step of causing the JVM to hand over the JAVA interface platform request to the JAVA adaptation layer includes: causing the JVM to hand the JAVA interface platform request as a normal request to the JAVA adaptation layer.
16.根据权利要求 5所述的方法, 其特征在于:  16. The method of claim 5 wherein:
所述 JAVA适配层判断 JAVA接口平台请求中的被请求 URL目标地址是否 为当前设备回叫标准主机步骤包括: 所述 JAVA适配层判断 JAVA接口平台请求 中的被请求 URL目标地址是否为 "Localhost" , "127.0.0.1" 或 "::1"。  The step of determining, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is the current device callback standard host includes: the JAVA adaptation layer determining whether the requested URL target address in the JAVA interface platform request is " Localhost" , "127.0.0.1" or "::1".
17.—种基于 JAVA的设备, 其特征在于, 包括:  17. A JAVA-based device, comprising:
请求发送单元, 用于使设备的 JAVA应用程序通过调用标准的 JAVA接口平 台请求, 将所述 JAVA应用程序待传递信息传给 JAVA虚拟机, 其中在 JAVA接 口平台请求中域名之后,按预定规则集合有本 JAVA应用程序名、本地应用模块 名以及待传递信息, 所述 JAVA应用程序名对应待传递信息的来源, 所述本地应 用模块名是待传递信息要到达的目标应用模块名称;  a request sending unit, configured to enable the JAVA application of the device to send the information to be transmitted to the JAVA virtual machine by calling a standard JAVA interface platform, where the JAVA interface platform requests the domain name, and then according to a predetermined rule set The JAVA application name, the local application module name, and the information to be delivered, the JAVA application name corresponds to the source of the information to be delivered, and the local application module name is the name of the target application module to which the information to be delivered is to be reached;
第一传递单元, 用于使所述 JVM将 JAVA接口平台请求交给 JAVA适配层; 地址判断单元, 用于使所述 JAVA适配层判断 JAVA接口平台请求中的被请 求 URL目标地址是否为当前设备回叫标准主机;  a first delivery unit, configured to enable the JVM to submit a JAVA interface platform request to the JAVA adaptation layer, and an address determining unit, configured to: determine, by the JAVA adaptation layer, whether the requested URL target address in the JAVA interface platform request is The current device calls back to the standard host;
信息解析单元, 用于在所述被请求 URL目标地址为当前设备回叫标准主机 时,使 JAVA适配层按照所述预定规则解析出 JAVA接口平台请求中域名之后的 JAVA应用程序名、 本地应用模块名以及待传递信息; 程序鉴权单元, 用于使所述 JAVA适配层根据 JAVA应用程序名对 JAVA应 用程序进行鉴权; The information parsing unit is configured to: when the requested URL target address is the current device callback standard host, enable the JAVA adaptation layer to parse the JAVA application name and the local application after the domain name in the JAVA interface platform request according to the predetermined rule. Module name and information to be delivered; a program authentication unit, configured to enable the JAVA adaptation layer to authenticate the JAVA application according to the JAVA application name;
第二传递单元, 用于在所述 JAVA应用程序鉴权通过时,将所述待传递信息 发给所述本地应用模块名所对应的本地应用模块。  The second delivery unit is configured to send the to-be-delivered information to the local application module corresponding to the local application module name when the JAVA application authentication is passed.
18.根据权利要求 17所述的设备, 其特征在于:  18. Apparatus according to claim 17 wherein:
所述信息解析单元具体用于使 JAVA适配层检查 JAVA接口平台请求中域名 之后字符串中的第一分隔符和第二分隔符, 将 JAVA接口平台请求中域名之后、 第一分隔符之前的内容解析出来, 作为 JAVA应用程序名; 将第一分隔符之后、 第二分隔符之前的内容解析出来, 作为本地应用模块名; 将第二分隔符之后至 字符串结束的内容解析出来, 作为待传递信息。  The information parsing unit is specifically configured to enable the JAVA adaptation layer to check the first delimiter and the second delimiter in the string after the domain name in the JAVA interface platform request, after the domain name in the JAVA interface platform request, before the first delimiter The content is parsed as the JAVA application name; the content after the first delimiter and before the second delimiter is parsed as the local application module name; the content after the second delimiter to the end of the string is parsed as Send message.
19.根据权利要求 17所述的设备, 其特征在于:  19. Apparatus according to claim 17 wherein:
所述第二传递单元具体用于将所述待传递信息通过线程之间的事件、 进程 之间的事件、 或线程与进程之间的事件, 发给所述本地应用模块名所对应的本 地应用模块。  The second delivery unit is specifically configured to send the information to be delivered to an local application module corresponding to the local application module name by an event between threads, an event between processes, or an event between a thread and a process. .
20.根据权利要求 17所述的设备, 其特征在于: 被请求 URL目标地址是否为 "Localhost"、 "127.0.0.1" 或 "::1"。  The device according to claim 17, characterized in that: the requested URL destination address is "Localhost", "127.0.0.1" or "::1".
PCT/CN2011/083614 2011-02-12 2011-12-07 Method and device for locally transmitting information by java application WO2012106968A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN 201110036919 CN102148869B (en) 2011-02-12 2011-02-12 Method and device for JAVA application to transfer information to local
CN201110036919.2 2011-02-12

Publications (1)

Publication Number Publication Date
WO2012106968A1 true WO2012106968A1 (en) 2012-08-16

Family

ID=44422855

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/083614 WO2012106968A1 (en) 2011-02-12 2011-12-07 Method and device for locally transmitting information by java application

Country Status (2)

Country Link
CN (1) CN102148869B (en)
WO (1) WO2012106968A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582996A (en) * 2020-05-20 2020-08-25 拉扎斯网络科技(上海)有限公司 Business information display method and device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148869B (en) * 2011-02-12 2013-05-01 惠州Tcl移动通信有限公司 Method and device for JAVA application to transfer information to local
CN109471587B (en) * 2018-11-13 2020-05-12 掌阅科技股份有限公司 Java virtual machine-based handwritten content display method and electronic equipment
CN111310131B (en) * 2020-01-19 2022-11-04 Oppo广东移动通信有限公司 so library call processing method and device, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1560741A (en) * 2004-02-23 2005-01-05 史宇清 Structure method of five-hierarchical system structure base on J2EE
US20100138485A1 (en) * 2008-12-03 2010-06-03 William Weiyeh Chow System and method for providing virtual web access
CN101945163A (en) * 2010-07-19 2011-01-12 中兴通讯股份有限公司 Method, mobile terminal and system for content treatment
CN102148869A (en) * 2011-02-12 2011-08-10 惠州Tcl移动通信有限公司 Method and device for JAVA application to transfer information to local

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7568203B2 (en) * 2004-06-18 2009-07-28 Telmap Ltd Mobile device with local server
EP1703713A1 (en) * 2005-03-18 2006-09-20 BRITISH TELECOMMUNICATIONS public limited company Callback system for mobile terminals
CN101273608A (en) * 2005-09-28 2008-09-24 艾利森电话股份有限公司 Method and system of invoking MIDlet from a web browser on a local device
CN101335758B (en) * 2008-07-24 2011-09-21 中兴通讯股份有限公司 Method and system for access service in SIM card by dual-processor terminal
US8607224B2 (en) * 2009-05-28 2013-12-10 Yahoo! Inc. System for packaging native program extensions together with virtual machine applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1560741A (en) * 2004-02-23 2005-01-05 史宇清 Structure method of five-hierarchical system structure base on J2EE
US20100138485A1 (en) * 2008-12-03 2010-06-03 William Weiyeh Chow System and method for providing virtual web access
CN101945163A (en) * 2010-07-19 2011-01-12 中兴通讯股份有限公司 Method, mobile terminal and system for content treatment
CN102148869A (en) * 2011-02-12 2011-08-10 惠州Tcl移动通信有限公司 Method and device for JAVA application to transfer information to local

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111582996A (en) * 2020-05-20 2020-08-25 拉扎斯网络科技(上海)有限公司 Business information display method and device
CN111582996B (en) * 2020-05-20 2023-11-24 拉扎斯网络科技(上海)有限公司 Service information display method and device

Also Published As

Publication number Publication date
CN102148869A (en) 2011-08-10
CN102148869B (en) 2013-05-01

Similar Documents

Publication Publication Date Title
US11218460B2 (en) Secure authentication for accessing remote resources
US8275892B2 (en) Low-level remote sharing of local devices in a remote access session across a computer network
US8291475B2 (en) Secure cross-domain communication for web mashups
US9223746B2 (en) Data card and method for internet access of data card
US8073954B1 (en) Method and apparatus for a secure remote access system
US8073847B2 (en) Extended user profile
US20080196096A1 (en) Methods for Extending a Security Token Based Identity System
US20100043065A1 (en) Single sign-on for web applications
JP4758362B2 (en) Relay device, program, and relay method
WO2014082555A1 (en) Login method, device and open platform system
US20050210135A1 (en) System for ubiquitous network presence and access without cookies
EP2466792A1 (en) Internet access control apparatus, method and gateway thereof
KR20180004093A (en) Transmitting media content during instant messaging
WO2013189313A1 (en) Method and device for achieving remote manipulation
CN105306433A (en) Method and device for accessing virtual machine server
WO2012106968A1 (en) Method and device for locally transmitting information by java application
EP2028827A2 (en) Application generation system and method
US7917638B1 (en) Transparent reconnection
TW201733314A (en) Method for executing request and associated server
CN109639788B (en) Cross-domain name joint debugging method and system for voice conversation platform
US7817638B2 (en) Method for promptly redialing a broadband access server
WO2009062396A1 (en) Resource access method and resource access system
KR100614930B1 (en) Method of managing platform profile for digital home service
KR20080078705A (en) Low complexity, multi-purpose communications device and information client
CN114844699A (en) Method, device and medium for accessing BMC console

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: 11858330

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: 11858330

Country of ref document: EP

Kind code of ref document: A1