[go: up one dir, main page]

CN106201508B - Information display method and device and electronic equipment - Google Patents

Information display method and device and electronic equipment Download PDF

Info

Publication number
CN106201508B
CN106201508B CN201610539000.8A CN201610539000A CN106201508B CN 106201508 B CN106201508 B CN 106201508B CN 201610539000 A CN201610539000 A CN 201610539000A CN 106201508 B CN106201508 B CN 106201508B
Authority
CN
China
Prior art keywords
client
code
page
sdk
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610539000.8A
Other languages
Chinese (zh)
Other versions
CN106201508A (en
Inventor
桑小杰
李冠毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201610539000.8A priority Critical patent/CN106201508B/en
Publication of CN106201508A publication Critical patent/CN106201508A/en
Application granted granted Critical
Publication of CN106201508B publication Critical patent/CN106201508B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/329Power saving characterised by the action undertaken by task scheduling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses an information display method, an information display device and electronic equipment, which are used for solving the problem that two applications need to run simultaneously when one application displays a page and page logic of the other application, and the method comprises the following steps: creating an interface of a first client; creating information including a context object of the second client and a name of the first client through the interface; creating a component of the second client according to the information; the page and page logic of the second client is displayed on the page of the first client according to the information and the component. By implementing the embodiment of the invention, the power consumption can be saved.

Description

一种信息显示方法、装置及电子设备Information display method, device and electronic device

技术领域technical field

本发明涉及计算机技术领域,尤其涉及一种信息显示方法、装置及电子设备。The present invention relates to the field of computer technology, and in particular, to an information display method, device and electronic device.

背景技术Background technique

随着计算机技术的不断发展,安装在Android等操作系统上的应用间的调用越来越多,其中,一种常见的应用间调用为将一种应用的页面和页面逻辑展示在另一种应用上。假设一种应用为A应用,另一种应用为B应用,当A应用的页面和页面逻辑需要展示在B应用上时,为了显示A应用的页面和页面逻辑,B应用可以存储A应用的代码。然而,由于A应用和B应用可能属于不同的厂商,因此,A应用和B应用的更新频率可能不同。当B应用的更新频率低于A应用的更新频率时,B应用上展示的A应用的页面和页面逻辑可能不是A应用的最新的页面和页面逻辑,以致B应用无法及时的展示A应用的页面和页面逻辑。为了解决上述问题,当B应用需要展示A应用的页面和页面逻辑时,B应用将获取A应用的代码,但这需要A应用启动,以致需要A应用和B应用同时运行,从而增加了功耗。With the continuous development of computer technology, there are more and more calls between applications installed on Android and other operating systems. Among them, a common call between applications is to display the page and page logic of one application in another application. superior. Assuming that one application is application A and the other application is application B, when the page and page logic of application A need to be displayed on application B, in order to display the page and page logic of application A, application B can store the code of application A . However, since the A application and the B application may belong to different manufacturers, the update frequency of the A application and the B application may be different. When the update frequency of application B is lower than the update frequency of application A, the page and page logic of application A displayed on application B may not be the latest page and page logic of application A, so that application B cannot display the page of application A in time and page logic. In order to solve the above problem, when application B needs to display the page and page logic of application A, application B will obtain the code of application A, but this requires application A to start, so that application A and application B need to run at the same time, which increases power consumption .

发明内容SUMMARY OF THE INVENTION

本发明实施例公开了一种信息显示方法、装置及电子设备,用于解决一个应用显示另一个应用的页面和页面逻辑时需要两个应用同时运行的问题。Embodiments of the present invention disclose an information display method, apparatus and electronic device, which are used to solve the problem that two applications need to run simultaneously when one application displays the page and page logic of another application.

本发明实施例第一方面公开一种信息显示方法,包括:A first aspect of the embodiments of the present invention discloses an information display method, including:

创建第一客户端的接口;Create the interface of the first client;

通过所述接口创建包括第二客户端的上下文对象和所述第一客户端的名称的信息;creating information including the context object of the second client and the name of the first client through the interface;

根据所述信息创建所述第二客户端的组件;Create a component of the second client based on the information;

根据所述信息和所述组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The page of the second client and the page logic are displayed on the page of the first client according to the information and the component.

在一个实施例中,所述第一客户端存储有软件开发包SDK,所述SDK中存储有用于创建所述第二客户端的上下文对象的第一代码;In one embodiment, the first client stores a software development kit SDK, and the SDK stores a first code for creating a context object of the second client;

所述通过所述接口创建包括第二客户端的上下文对象和所述第一客户端的名称的信息包括:The creating information including the context object of the second client and the name of the first client through the interface includes:

通过所述接口从所述SDK中获取所述第一代码;Obtain the first code from the SDK through the interface;

将所述第一客户端的名称添加在所述第一代码中;adding the name of the first client to the first code;

执行添加所述名称后的所述第一代码,以创建包括所述第二客户端的上下文对象和所述第一客户端的名称的信息。The first code after adding the name is executed to create information including the context object of the second client and the name of the first client.

在一个实施例中,所述第一客户端还存储有jar包;In one embodiment, the first client further stores a jar package;

所述通过所述接口从所述SDK中获取所述第一代码包括:The obtaining the first code from the SDK through the interface includes:

建立所述接口与所述jar包的连接;establishing a connection between the interface and the jar package;

通过所述jar包与所述SDK的映射关系,从所述SDK中获取所述第一代码。The first code is obtained from the SDK through the mapping relationship between the jar package and the SDK.

在一个实施例中,所述SDK中还存储有用于创建所述第二客户端的组件的第二代码;In one embodiment, the SDK also stores a second code for creating a component of the second client;

所述根据所述信息创建所述第二客户端的组件包括:The components for creating the second client according to the information include:

根据所述信息通过所述接口从所述SDK中获取所述第二代码;Obtain the second code from the SDK through the interface according to the information;

将所述第一客户端的名称添加在所述第二代码中;adding the name of the first client to the second code;

执行添加所述名称后的所述第二代码,以创建所述第二客户端的组件。The second code after adding the name is executed to create a component of the second client.

在一个实施例中,所述SDK中还存储有用于调用所述第二客户端的代码的第三代码;In one embodiment, the SDK also stores a third code for calling the code of the second client;

所述根据所述信息和所述组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上包括:The displaying the page and page logic of the second client on the page of the first client according to the information and the component includes:

当检测到用于将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上的显示指令时,根据所述信息建立所述接口与所述jar包的连接;When detecting a display instruction for displaying the page and page logic of the second client on the page of the first client, establishing a connection between the interface and the jar package according to the information;

通过所述jar包与所述SDK的映射关系,从所述SDK中获取所述第三代码;Obtain the third code from the SDK through the mapping relationship between the jar package and the SDK;

执行所述第三代码,以获取所述第二客户端的代码;executing the third code to obtain the code of the second client;

根据所述组件在所述第一客户端中执行所述第二客户端的代码,以将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The code of the second client is executed in the first client according to the component, so as to display the page and page logic of the second client on the page of the first client.

本发明实施例第二方面公开一种信息显示装置,包括:A second aspect of the embodiments of the present invention discloses an information display device, comprising:

第一创建单元,用于创建第一客户端的接口;a first creation unit for creating an interface of the first client;

第二创建单元,用于通过所述第一创建单元创建的接口创建包括第二客户端的上下文对象和所述第一客户端的名称的信息;a second creation unit, configured to create information including the context object of the second client and the name of the first client through the interface created by the first creation unit;

第三创建单元,用于根据所述第二创建单元创建的信息创建所述第二客户端的组件;a third creating unit, configured to create a component of the second client according to the information created by the second creating unit;

显示单元,用于根据所述第二创建单元创建的信息和所述第三创建单元创建的组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。A display unit, configured to display the page and page logic of the second client on the page of the first client according to the information created by the second creating unit and the components created by the third creating unit.

在一个实施例中,所述第一客户端存储有软件开发包SDK,所述SDK中存储有用于创建所述第二客户端的上下文对象的第一代码;In one embodiment, the first client stores a software development kit SDK, and the SDK stores a first code for creating a context object of the second client;

所述第二创建单元包括:The second creation unit includes:

第一获取子单元,用于通过所述接口从所述SDK中获取所述第一代码;a first obtaining subunit, used for obtaining the first code from the SDK through the interface;

第一添加子单元,用于将所述第一客户端的名称添加在所述第一获取子单元获取的第一代码中;a first adding subunit, configured to add the name of the first client to the first code acquired by the first acquiring subunit;

第一执行子单元,用于执行所述第一添加子单元添加所述名称后的所述第一代码,以创建包括所述第二客户端的上下文对象和所述第一客户端的名称的信息。A first executing subunit, configured to execute the first code after the name is added by the first adding subunit, so as to create information including the context object of the second client and the name of the first client.

在一个实施例中,所述第一客户端还存储有jar包;In one embodiment, the first client further stores a jar package;

所述第一获取子单元具体用于:The first acquisition subunit is specifically used for:

建立所述接口与所述jar包的连接;establishing a connection between the interface and the jar package;

通过所述jar包与所述SDK的映射关系,从所述SDK中获取所述第一代码。The first code is obtained from the SDK through the mapping relationship between the jar package and the SDK.

在一个实施例中,所述SDK中还存储有用于创建所述第二客户端的组件的第二代码;In one embodiment, the SDK also stores a second code for creating a component of the second client;

所述第三创建单元包括:The third creation unit includes:

第二获取子单元,用于根据所述信息通过所述接口从所述SDK中获取所述第二代码;a second obtaining subunit, configured to obtain the second code from the SDK through the interface according to the information;

第二添加子单元,用于将所述第一客户端的名称添加在所述第二获取子单元获取的第二代码中;a second adding subunit, configured to add the name of the first client to the second code acquired by the second acquiring subunit;

第二执行子单元,用于执行所述第二添加子单元添加所述名称后的所述第二代码,以创建所述第二客户端的组件。The second execution subunit is configured to execute the second code after the name is added by the second adding subunit, so as to create a component of the second client.

在一个实施例中,所述SDK中还存储有用于调用所述第二客户端的代码的第三代码;In one embodiment, the SDK also stores a third code for calling the code of the second client;

所述显示单元包括:The display unit includes:

建立子单元,用于当检测到用于将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上的显示指令时,根据所述信息建立所述接口与所述jar包的连接;Establishing a subunit, configured to establish the interface and the jar package according to the information when a display instruction for displaying the page and page logic of the second client on the page of the first client is detected Connection;

第三获取子单元,用于通过所述建立子单元建立连接的所述jar包与所述SDK的映射关系,从所述SDK中获取所述第三代码;The third acquisition subunit is used to establish the mapping relationship between the jar package and the SDK connected by the establishment subunit, and acquire the third code from the SDK;

第三执行子单元,用于执行所述第三获取子单元获取的第三代码,以获取所述第二客户端的代码;a third execution subunit, configured to execute the third code acquired by the third acquisition subunit to acquire the code of the second client;

第四执行子单元,用于根据所述组件在所述第一客户端中执行所述第三执行子单元获取的第二客户端的代码,以将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The fourth execution subunit is configured to execute the code of the second client obtained by the third execution subunit in the first client according to the component, so as to display the page and page logic of the second client in the on the page of the first client.

本发明实施例第三方面公开一种电子设备,包括:处理器、存储器、通信接口和总线;A third aspect of the embodiments of the present invention discloses an electronic device, including: a processor, a memory, a communication interface, and a bus;

所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory and the communication interface are connected through the bus and complete mutual communication;

所述存储器存储可执行程序;the memory stores executable programs;

所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行一种信息显示方法;The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute an information display method;

其中,所述信息显示方法包括:Wherein, the information display method includes:

创建第一客户端的接口;Create the interface of the first client;

通过所述接口创建包括第二客户端的上下文对象和所述第一客户端的名称的信息;creating information including the context object of the second client and the name of the first client through the interface;

根据所述信息创建所述第二客户端的组件;Create a component of the second client based on the information;

根据所述信息和所述组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The page of the second client and the page logic are displayed on the page of the first client according to the information and the component.

本发明实施例中,创建第一客户端的接口,通过该接口创建包括第一客户端的名称和第二客户端的上下文对象的信息,根据该信息创建第二客户端的组件,根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面和页面逻辑,可见,第二客户端的上下文对象是创建的,而不是从第一客户端获取的,因此,不需要启动第二客户端,从而可以节约功耗。此外,在显示第二客户端的页面和页面逻辑时,如果调用了第二客户端的组件,第二客户端将会启动,但第二客户端的组件是由第一客户端创建的,因此,可以进一步避免第二客户端的启动,从而可以节约功耗。In this embodiment of the present invention, an interface of the first client is created, information including the name of the first client and the context object of the second client is created through the interface, a component of the second client is created according to the information, and according to the information and the component, the The page and page logic of the second client are displayed on the page and page logic of the first client. It can be seen that the context object of the second client is created, not obtained from the first client. Therefore, there is no need to start the second client. , thereby saving power consumption. In addition, when the page and page logic of the second client are displayed, if the components of the second client are called, the second client will be started, but the components of the second client are created by the first client. Therefore, you can further The activation of the second client is avoided, thereby saving power consumption.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1是本发明实施例公开的一种信息显示方法的流程示意图;1 is a schematic flowchart of an information display method disclosed in an embodiment of the present invention;

图2是本发明实施例公开的另一种信息显示方法的流程示意图;2 is a schematic flowchart of another information display method disclosed in an embodiment of the present invention;

图3是本发明实施例公开的一种信息显示装置的结构示意图;3 is a schematic structural diagram of an information display device disclosed in an embodiment of the present invention;

图4是本发明实施例公开的另一种信息显示装置的结构示意图;4 is a schematic structural diagram of another information display device disclosed in an embodiment of the present invention;

图5是本发明实施例公开的一种电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例公开了一种信息显示方法、装置及电子设备,用于解决一个应用显示另一个应用的页面和页面逻辑时需要两个应用同时运行的问题。以下分别进行详细说明。Embodiments of the present invention disclose an information display method, apparatus and electronic device, which are used to solve the problem that two applications need to run simultaneously when one application displays the page and page logic of another application. Each of them will be described in detail below.

请参阅图1,图1是本发明实施例公开的一种信息显示方法的流程示意图。其中,该信息显示方法是从手机、平板电脑等安装有第一客户端和第二客户端的电子设备的角度来描述的。如图1所示,该信息显示方法可以包括以下步骤。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of an information display method disclosed in an embodiment of the present invention. Wherein, the information display method is described from the perspective of an electronic device such as a mobile phone, a tablet computer, etc., on which the first client terminal and the second client terminal are installed. As shown in FIG. 1 , the information display method may include the following steps.

101、创建第一客户端的接口。101. Create an interface of the first client.

本实施例中,当用户需要将第二客户端的页面和页面逻辑显示在第一客户端的页面上时,用户可以通过操作电子设备,使电子设备创建第一客户端的接口,即可以使第一客户端提供一个ProxyClient类,该ProxyClient类提供一个接口。In this embodiment, when the user needs to display the page and page logic of the second client on the page of the first client, the user can operate the electronic device to make the electronic device create an interface of the first client, that is, the first client can The client provides a ProxyClient class, which provides an interface.

102、通过该接口创建包括第二客户端的上下文对象和第一客户端的名称的信息。102. Create information including the context object of the second client and the name of the first client through the interface.

本实施例中,第一客户端可以存储有软件开发包(Software Development Kit,SDK),该SDK中存储有可以创建第二客户端的上下文对象(即Context对象)的第一代码。因此,在创建了第一客户端的接口之后,将通过该接口创建包括第二客户端的上下文对象和第一客户端的名称的信息,即通过该接口从SDK中获取该第一代码,并将第一客户端的名称添加在该第一代码中,之后将执行添加了名称后的该第一代码,可以得到包括第二客户端的上下文对象和第一客户端的名称的信息,该信息即包括第一客户端的名称的第二客户端的上下文对象,是通过对第二客户端的上下文对象进行createPackageContext(),并传入第一客户端的名称得到的。In this embodiment, the first client may store a software development kit (Software Development Kit, SDK), and the SDK stores first code that can create a context object (ie, a Context object) of the second client. Therefore, after the interface of the first client is created, information including the context object of the second client and the name of the first client will be created through the interface, that is, the first code will be obtained from the SDK through the interface, and the first The name of the client is added to the first code, and then the first code after the name is added will be executed, and information including the context object of the second client and the name of the first client can be obtained, and the information includes the first client's name. The context object of the second client with the name is obtained by performing createPackageContext() on the context object of the second client and passing in the name of the first client.

本实施例中,第一客户端还存储有jar包,jar包与SDK存在映射关系,其中,SDK中存储的是程序代码,如果需要从SDK中获取某一个功能的程序代码,则必须了解这个功能的程序代码,才能从SDK中存储的代码中获取到这个功能的代码,以致获取效率较低。因此,为了提高代码的获取效率,引入jar包括,jar包中包括SDK中每部分代码的功能名称,且这些功能名称与SDK中相应的代码之间存在一一映射关系,可以通过jar包中的功能名称快速的获取到SDK中的代码。因此,通过接口从SDK中获取第一代码,即建立接口与jar包的连接,通过jar包与SDK的映射关系,从SDK中快速获取第一代码。In this embodiment, the first client also stores a jar package, and there is a mapping relationship between the jar package and the SDK, wherein the program code is stored in the SDK. If you need to obtain the program code of a certain function from the SDK, you must understand this Only the program code of the function can be obtained from the code stored in the SDK, so that the acquisition efficiency is low. Therefore, in order to improve the efficiency of code acquisition, the jar package is introduced. The jar package includes the function name of each part of the code in the SDK, and there is a one-to-one mapping relationship between these function names and the corresponding code in the SDK. The function name is quickly obtained from the code in the SDK. Therefore, the first code is obtained from the SDK through the interface, that is, the connection between the interface and the jar package is established, and the first code is quickly obtained from the SDK through the mapping relationship between the jar package and the SDK.

103、根据该信息创建第二客户端的组件。103. Create a component of the second client according to the information.

本实施例中,当在第一客户端的页面上显示第二客户端的页面和页面逻辑的过程中,如果需要第二客户端的视图(activity)等组件,可以从第二客户端直接调用这些组件,但这些组件在第一客户端上的应用(application)将会导致第二客户端启动。由于SDK中还存储有用于创建第二客户端的组件的第二代码,因此,为了避免第二客户端启动,将根据该信息创建第二客户端的组件,即根据该信息通过该接口从SDK中获取第二代码,将第一客户端的名称添加在第二代码中,执行添加该名称后的第二代码,以创建第二客户端的组件。In this embodiment, in the process of displaying the page and page logic of the second client on the page of the first client, if components such as the view (activity) of the second client are required, these components can be directly called from the second client, But the application of these components on the first client will cause the second client to start. Since the SDK also stores the second code for creating the component of the second client, in order to avoid the start of the second client, the component of the second client will be created according to this information, that is, it will be obtained from the SDK through this interface according to the information The second code adds the name of the first client to the second code, and executes the second code after adding the name to create a component of the second client.

104、根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面上。104. Display the page of the second client and the page logic on the page of the first client according to the information and the component.

本实施例中,SDK中还存储有用于调用第二客户端的代码的第三代码,根据该信息创建完第二客户端的组件之后,将根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面上,即当检测到用于将第二客户端的页面和页面逻辑显示在第一客户端的页面上的显示指令时,根据该信息(即包括第一客户端的名称的第二客户端的上下文对象)建立接口与jar包的连接,通过jar包与SDK的映射关系,从SDK中快速获取第三代码,执行该第三代码,以获取第二客户端的代码,之后根据该组件在第一客户端中执行第二客户端的代码,以便将第二客户端的页面和页面逻辑显示在第一客户端的页面上。其中,页面逻辑是根据对页面的操作进行的响应,例如:当页面上的一个信息被点击时,将在目标区域显示这个信息的详细内容。In this embodiment, the SDK also stores a third code for invoking the code of the second client. After the component of the second client is created according to the information, the page of the second client and the page logic will be created according to the information and the component. Display on the page of the first client, that is, when a display instruction for displaying the page and page logic of the second client on the page of the first client is detected, according to the information (that is, the first page including the name of the first client) The context object of the second client) establishes the connection between the interface and the jar package, quickly obtains the third code from the SDK through the mapping relationship between the jar package and the SDK, executes the third code to obtain the code of the second client, and then according to the component The code of the second client is executed in the first client to display the page and page logic of the second client on the page of the first client. Among them, the page logic is based on the response to the operation of the page, for example: when an information on the page is clicked, the detailed content of the information will be displayed in the target area.

在一个实施例中,还需要从第一客户端的显示区域中选取目标区域,并将目标区域分配给第二客户端,以便将第二客户端的页面和页面逻辑显示在第一客户端的页面的目标区域上。In one embodiment, it is also necessary to select a target area from the display area of the first client, and assign the target area to the second client, so as to display the page and page logic of the second client on the target of the page of the first client on the area.

在图1所描述的信息显示方法中,创建第一客户端的接口,通过该接口创建包括第一客户端的名称和第二客户端的上下文对象的信息,根据该信息创建第二客户端的组件,根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面和页面逻辑,可见,第二客户端的上下文对象是创建的,而不是从第一客户端获取的,因此,不需要启动第二客户端,从而可以节约功耗。此外,在第一客户端的页面上显示第二客户端的页面和页面逻辑时,如果调用了第二客户端的组件,第二客户端将会启动,但第二客户端的组件是创建的,因此,可以进一步避免第二客户端的启动,从而可以节约功耗。In the information display method described in FIG. 1 , an interface of the first client is created, information including the name of the first client and the context object of the second client is created through the interface, the components of the second client are created according to the information, and the components of the second client are created according to the information. Information and this component displays the page and page logic of the second client on the page and page logic of the first client, visible, the context object of the second client is created, not obtained from the first client, therefore, no need The second client is started, so that power consumption can be saved. In addition, when the page and page logic of the second client are displayed on the page of the first client, if the components of the second client are called, the second client will start, but the components of the second client are created. Therefore, you can The startup of the second client is further avoided, thereby saving power consumption.

请参阅图2,图2是本发明实施例公开的另一种信息显示方法的流程示意图。其中,该信息显示方法是从安装在手机、平板电脑等电子设备中的第一客户端的角度来描述的。如图2所示,该信息显示方法可以包括以下步骤。Please refer to FIG. 2 , which is a schematic flowchart of another information display method disclosed in an embodiment of the present invention. The information display method is described from the perspective of a first client installed in an electronic device such as a mobile phone and a tablet computer. As shown in FIG. 2 , the information display method may include the following steps.

201、第一客户端创建接口。201. The first client creates an interface.

本实施例中,当第一客户端需要将第二客户端的页面和页面逻辑显示在第一客户端的页面上时,第一客户端将创建接口,即第一客户端提供一个ProxyClient类,该ProxyClient类提供一个接口(IProxy)。In this embodiment, when the first client needs to display the page and page logic of the second client on the page of the first client, the first client will create an interface, that is, the first client provides a ProxyClient class, the ProxyClient The class provides an interface (IProxy).

202、第一客户端通过该接口创建包括第二客户端的上下文对象和第一客户端的名称的信息。202. The first client creates information including the context object of the second client and the name of the first client through the interface.

本实施例中,第一客户端可以存储有SDK,该SDK中存储有可以创建第二客户端的上下文对象的第一代码。因此,第一客户端创建了接口之后,将通过该接口创建包括第二客户端的上下文对象和第一客户端的名称的信息,即通过该接口从SDK中获取该第一代码,并将第一客户端的名称添加在该第一代码中,之后执行添加了该名称后的该第一代码,可以得到包括第二客户端的上下文对象和第一客户端的名称的信息,该信息即包括第一客户端的名称的第二客户端的上下文对象,该信息具有使第二客户端的代码在第一客户端上执行的功能,可以通过对第二客户端的上下文对象进行createPackageContext(),并传入第一客户端的名称得到的。In this embodiment, the first client may store an SDK, and the SDK may store a first code capable of creating a context object of the second client. Therefore, after the interface is created by the first client, information including the context object of the second client and the name of the first client will be created through the interface, that is, the first code will be obtained from the SDK through the interface, and the first client will be The name of the client is added to the first code, and then the first code after the name is added is executed, and information including the context object of the second client and the name of the first client can be obtained, and the information includes the name of the first client. The context object of the second client, the information has the function of making the code of the second client execute on the first client, which can be obtained by creatingPackageContext() on the context object of the second client and passing in the name of the first client of.

本实施例中,第一客户端还存储有jar包,jar包与SDK存在映射关系,其中,SDK中存储的是程序代码,如果需要从SDK中获取某一个功能的程序代码,则必须清除这个功能的程序代码,才能从SDK中存储的代码中获取到这个功能的代码,以致获取效率较低。因此,为了提高代码的获取效率,引入jar包括,jar包中包括SDK中每部分代码的功能名称,且这些功能名称与SDK中相应的代码之间存在一一映射关系,可以通过jar包中的功能名称快速的获取到SDK中的代码。因此,通过接口从SDK中获取第一代码,即建立接口与jar包的连接,通过jar包与SDK的映射关系,从SDK中快速获取第一代码。In this embodiment, the first client also stores a jar package, and there is a mapping relationship between the jar package and the SDK. The program code is stored in the SDK. If the program code of a certain function needs to be obtained from the SDK, this must be cleared. Only the program code of the function can be obtained from the code stored in the SDK, so that the acquisition efficiency is low. Therefore, in order to improve the efficiency of code acquisition, the jar package is introduced. The jar package includes the function name of each part of the code in the SDK, and there is a one-to-one mapping relationship between these function names and the corresponding code in the SDK. The function name is quickly obtained from the code in the SDK. Therefore, the first code is obtained from the SDK through the interface, that is, the connection between the interface and the jar package is established, and the first code is quickly obtained from the SDK through the mapping relationship between the jar package and the SDK.

203、第一客户端根据该信息创建第二客户端的组件。203. The first client creates a component of the second client according to the information.

本实施例中,当第一客户端在第一客户端的页面上显示第二客户端的页面和页面逻辑的过程中,如果需要第二客户端的视图(activity)等组件,可以从第二客户端直接调用这些组件,但这些组件在第一客户端上的应用(application)将会导致第二客户端启动。由于SDK中还存储有用于创建第二客户端的组件的第二代码,因此,为了避免第二客户端启动,将根据该信息创建第二客户端的组件,即根据该信息通过该接口从SDK中获取第二代码,将第一客户端的名称添加在第二代码中,执行添加该名称后的第二代码,以创建第二客户端的组件。In this embodiment, when the first client displays the page and page logic of the second client on the page of the first client, if components such as the view (activity) of the second client are required, the second client can directly display the page and page logic of the second client. These components are called, but the application of these components on the first client will cause the second client to start. Since the SDK also stores the second code for creating the component of the second client, in order to avoid the start of the second client, the component of the second client will be created according to this information, that is, it will be obtained from the SDK through this interface according to the information The second code adds the name of the first client to the second code, and executes the second code after adding the name to create a component of the second client.

204、第一客户端根据该信息和该组件显示第二客户端的页面和页面逻辑。204. The first client displays the page and page logic of the second client according to the information and the component.

本实施例中,SDK中还存储有用于调用第二客户端的代码的第三代码,根据该信息创建完第二客户端的组件之后,将根据该信息和该组件显示第二客户端的页面和页面逻辑,即当检测到用于显示第二客户端的页面和页面逻辑的显示指令时,根据该信息(即包括第一客户端的名称的第二客户端的上下文对象)建立接口与jar包的连接,通过jar包与SDK的映射关系,从SDK中获取第三代码,执行该第三代码,以获取第二客户端的代码,之后根据该组件执行第二客户端的代码,以便显示第二客户端的页面和页面逻辑。In this embodiment, the SDK also stores a third code for calling the code of the second client. After the component of the second client is created according to the information, the page and page logic of the second client will be displayed according to the information and the component. , that is, when the display instruction for displaying the page and page logic of the second client is detected, the connection between the interface and the jar package is established according to the information (that is, the context object of the second client including the name of the first client), through the jar The mapping relationship between the package and the SDK, obtain the third code from the SDK, execute the third code to obtain the code of the second client, and then execute the code of the second client according to the component to display the page and page logic of the second client .

在一个实施例中,还需要为第二客户端分配目标区域,以便将第二客户端的页面和页面逻辑显示在第一客户端的页面的目标区域上。In one embodiment, a target area also needs to be allocated for the second client, so that the page and page logic of the second client are displayed on the target area of the page of the first client.

在图2所描述的信息显示方法中,第一客户端创建接口,通过该接口创建包括第一客户端的名称和第二客户端的上下文对象的信息,根据该信息创建第二客户端的组件,根据该信息和该组件显示第二客户端的页面和页面逻辑,可见,第二客户端的上下文对象是由第一客户端创建的,而不是从第二客户端获取的,因此,不需要启动第二客户端,从而可以节约功耗。此外,在显示第二客户端的页面和页面逻辑时,如果调用了第二客户端的组件,第二客户端将会启动,但第二客户端的组件是由第一客户端创建的,因此,可以进一步避免第二客户端的启动,从而可以节约功耗。In the information display method described in FIG. 2 , the first client creates an interface, creates information including the name of the first client and the context object of the second client through the interface, creates the components of the second client according to the information, and creates the components of the second client according to the information. The information and this component display the page and page logic of the second client. It can be seen that the context object of the second client is created by the first client, not obtained from the second client. Therefore, there is no need to start the second client. , thereby saving power consumption. In addition, when the page and page logic of the second client are displayed, if the components of the second client are called, the second client will be started, but the components of the second client are created by the first client. Therefore, you can further The activation of the second client is avoided, thereby saving power consumption.

请参阅图3,图3是本发明实施例公开的一种信息显示装置的结构示意图。其中,该信息显示装置可以为安装有第一客户端和第二客户端的手机、平板电脑等电子设备。如图3所示,该信息显示装置可以包括:Please refer to FIG. 3 , which is a schematic structural diagram of an information display device disclosed in an embodiment of the present invention. Wherein, the information display device may be an electronic device such as a mobile phone, a tablet computer, etc., on which the first client terminal and the second client terminal are installed. As shown in Figure 3, the information display device may include:

第一创建单元301,用于创建第一客户端的接口;a first creating unit 301, configured to create an interface of a first client;

第二创建单元302,用于通过第一创建单元301创建的接口创建包括第二客户端的上下文对象和第一客户端的名称的信息;The second creation unit 302 is configured to create information including the context object of the second client and the name of the first client through the interface created by the first creation unit 301;

第三创建单元303,用于根据第二创建单元302创建的信息创建第二客户端的组件;The third creating unit 303 is used to create the component of the second client according to the information created by the second creating unit 302;

显示单元304,用于根据第二创建单元302创建的信息和第三创建单元303创建的组件将第二客户端的页面和页面逻辑显示在第一客户端的页面上。The display unit 304 is configured to display the page of the second client and the page logic on the page of the first client according to the information created by the second creating unit 302 and the components created by the third creating unit 303 .

在图3所描述的信息显示装置中,创建第一客户端的接口,通过该接口创建包括第一客户端的名称和第二客户端的上下文对象的信息,根据该信息创建第二客户端的组件,根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面和页面逻辑,可见,第二客户端的上下文对象是创建的,而不是从第一客户端获取的,因此,不需要启动第二客户端,从而可以节约功耗。此外,在第一客户端的页面上显示第二客户端的页面和页面逻辑时,如果调用了第二客户端的组件,第二客户端将会启动,但第二客户端的组件是创建的,因此,可以进一步避免第二客户端的启动,从而可以节约功耗。In the information display device described in FIG. 3, an interface of the first client is created, information including the name of the first client and the context object of the second client is created through the interface, the components of the second client are created according to the information, and the components of the second client are created according to the information. Information and this component displays the page and page logic of the second client on the page and page logic of the first client, visible, the context object of the second client is created, not obtained from the first client, therefore, no need The second client is started, so that power consumption can be saved. In addition, when the page and page logic of the second client are displayed on the page of the first client, if the components of the second client are called, the second client will start, but the components of the second client are created. Therefore, you can The startup of the second client is further avoided, thereby saving power consumption.

请参阅图4,图4是本发明实施例公开的另一种信息显示装置的结构示意图。其中,该信息显示装置可以为安装有第一客户端和第二客户端的手机、平板电脑等电子设备。图4所示的信息显示装置是图3所示的信息显示装置优化得到的,其中:Please refer to FIG. 4. FIG. 4 is a schematic structural diagram of another information display device disclosed in an embodiment of the present invention. Wherein, the information display device may be an electronic device such as a mobile phone, a tablet computer, etc., on which the first client terminal and the second client terminal are installed. The information display device shown in FIG. 4 is obtained by optimizing the information display device shown in FIG. 3 , wherein:

第一客户端存储有SDK,SDK中存储有用于创建第二客户端的上下文对象的第一代码;The first client stores an SDK, and the SDK stores a first code for creating a context object of the second client;

第二创建单元302可以包括:The second creation unit 302 may include:

第一获取子单元3021,用于通过该接口从SDK中获取该第一代码;The first obtaining subunit 3021 is used to obtain the first code from the SDK through the interface;

添加子单元3022,用于将第一客户端的名称添加在第一获取子单元3021获取的第一代码中;The adding subunit 3022 is used to add the name of the first client to the first code obtained by the first obtaining subunit 3021;

第一执行子单元3023,用于执行添加子单元3022添加该名称后的第一代码,以创建包括第二客户端的上下文对象和第一客户端的名称的信息。The first executing subunit 3023 is configured to execute the first code added by the adding subunit 3022 to create information including the context object of the second client and the name of the first client.

作为一种可能的实施方式,第一客户端还存储有jar包;As a possible implementation manner, the first client further stores a jar package;

第一获取子单元3021具体用于:The first obtaining subunit 3021 is specifically used for:

建立该接口与jar包的连接;Establish the connection between the interface and the jar package;

通过jar包与SDK的映射关系,从SDK中获取该第一代码。The first code is obtained from the SDK through the mapping relationship between the jar package and the SDK.

作为一种可能的实施方式,SDK中还存储有用于创建第二客户端的组件的第二代码;As a possible implementation manner, the SDK further stores the second code for creating the component of the second client;

第三创建单元303可以包括:The third creation unit 303 may include:

第二获取子单元3031,用于根据该信息通过该接口从SDK中获取第二代码;The second obtaining subunit 3031 is used to obtain the second code from the SDK through the interface according to the information;

第二添加子单元3032,用于将第一客户端的名称添加在第二获取子单元3031获取的第二代码中;The second adding subunit 3032 is used to add the name of the first client to the second code acquired by the second acquiring subunit 3031;

第二执行子单元3033,用于执行第二添加子单元3032添加该名称后的第二代码,以创建第二客户端的组件。The second executing subunit 3033 is configured to execute the second code added by the second adding subunit 3032 with the name, so as to create a component of the second client.

作为一种可能的实施方式,SDK中还存储有用于调用第二客户端的代码的第三代码;As a possible implementation manner, the SDK also stores a third code for calling the code of the second client;

显示单元304可以包括:Display unit 304 may include:

建立子单元3041,用于当检测到用于将第二客户端的页面和页面逻辑显示在第一客户端的页面上的显示指令时,根据该信息建立该接口与jar包的连接;The establishment subunit 3041 is used to establish a connection between the interface and the jar package according to the information when a display instruction for displaying the page and page logic of the second client on the page of the first client is detected;

第三获取子单元3042,用于通过建立子单元3041建立连接的jar包与SDK的映射关系,从SDK中获取该第三代码;The third obtaining subunit 3042 is used to obtain the third code from the SDK by establishing the mapping relationship between the connected jar package and the SDK by establishing the subunit 3041;

第三执行子单元3043,用于执行第三获取子单元3042获取的第三代码,以获取第二客户端的代码;The third execution subunit 3043 is used for executing the third code obtained by the third obtaining subunit 3042 to obtain the code of the second client;

第四执行子单元3044,用于根据该组件在第一客户端中执行第三执行子单元3043执行获取的第二客户端的代码,以将第二客户端的页面和页面逻辑显示在第一客户端的页面上。The fourth execution subunit 3044 is used to execute the code of the second client obtained by the third execution subunit 3043 in the first client according to the component, so as to display the page and page logic of the second client on the first client. on the page.

在图4所描述的信息显示装置中,创建第一客户端的接口,通过该接口创建包括第一客户端的名称和第二客户端的上下文对象的信息,根据该信息创建第二客户端的组件,根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面和页面逻辑,可见,第二客户端的上下文对象是创建的,而不是从第一客户端获取的,因此,不需要启动第二客户端,从而可以节约功耗。此外,在第一客户端的页面上显示第二客户端的页面和页面逻辑时,如果调用了第二客户端的组件,第二客户端将会启动,但第二客户端的组件是创建的,因此,可以进一步避免第二客户端的启动,从而可以节约功耗。In the information display device described in FIG. 4, an interface of the first client is created, information including the name of the first client and the context object of the second client is created through the interface, the components of the second client are created according to the information, and the components of the second client are created according to the information. Information and this component displays the page and page logic of the second client on the page and page logic of the first client, visible, the context object of the second client is created, not obtained from the first client, therefore, no need The second client is started, so that power consumption can be saved. In addition, when the page and page logic of the second client are displayed on the page of the first client, if the components of the second client are called, the second client will start, but the components of the second client are created. Therefore, you can The startup of the second client is further avoided, thereby saving power consumption.

请参阅图5,图5是本发明实施例公开的一种电子设备的结构示意图。其中,该电子设备可以为安装有第一客户端和第二客户端的手机、平板电脑等。如图5所示,该电子设备可以包括处理器501、存储器502、通信接口503和总线504,存储器502可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。可选地,存储器502还可以是至少一个位于远离前述处理器501的存储装置。处理器501、存储器502和通信接口503通过总线504连接并完成相互间的通信;通信接口503用于与其它设备进行通信;存储器存储可执行程序;处理器501通过读取存储器502中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行一种信息显示方法;Please refer to FIG. 5 , which is a schematic structural diagram of an electronic device disclosed in an embodiment of the present invention. Wherein, the electronic device may be a mobile phone, a tablet computer, etc. on which the first client and the second client are installed. As shown in FIG. 5 , the electronic device may include a processor 501, a memory 502, a communication interface 503 and a bus 504. The memory 502 may be a high-speed RAM memory, or a non-volatile memory, such as at least one disk storage. Optionally, the memory 502 may also be at least one storage device located away from the aforementioned processor 501 . The processor 501, the memory 502 and the communication interface 503 are connected through the bus 504 and communicate with each other; the communication interface 503 is used to communicate with other devices; the memory stores executable programs; executing the program code to run a program corresponding to the executable program code for executing an information display method;

该信息显示方法可以包括:The information display method may include:

创建第一客户端的接口;Create the interface of the first client;

通过该接口创建包括第二客户端的上下文对象和第一客户端的名称的信息;Create information including the context object of the second client and the name of the first client through the interface;

根据该信息创建第二客户端的组件;Create a component of the second client based on the information;

根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面上。Display the page and page logic of the second client on the page of the first client according to the information and the component.

在一个实施例中,该电子设备还可以包括输入装置505,如为触摸屏、按键、话筒等,输出装置506,如显示屏、话筒等,其中:In one embodiment, the electronic device may further include an input device 505, such as a touch screen, keys, a microphone, etc., and an output device 506, such as a display screen, a microphone, etc., wherein:

输入装置505,用于接收用户输入的信息;an input device 505, configured to receive information input by a user;

输出装置506,用于输出信息。The output device 506 is used for outputting information.

在图5所描述的电子设备中,创建第一客户端的接口,通过该接口创建包括第一客户端的名称和第二客户端的上下文对象的信息,根据该信息创建第二客户端的组件,根据该信息和该组件将第二客户端的页面和页面逻辑显示在第一客户端的页面和页面逻辑,可见,第二客户端的上下文对象是创建的,而不是从第一客户端获取的,因此,不需要启动第二客户端,从而可以节约功耗。此外,在第一客户端的页面上显示第二客户端的页面和页面逻辑时,如果调用了第二客户端的组件,第二客户端将会启动,但第二客户端的组件是创建的,因此,可以进一步避免第二客户端的启动,从而可以节约功耗。In the electronic device described in FIG. 5, an interface of the first client is created, information including the name of the first client and the context object of the second client is created through the interface, the components of the second client are created according to the information, and according to the information And this component displays the page and page logic of the second client on the page and page logic of the first client, visible, the context object of the second client is created, not obtained from the first client, so there is no need to start The second client can thus save power consumption. In addition, when the page and page logic of the second client are displayed on the page of the first client, if the components of the second client are called, the second client will start, but the components of the second client are created. Therefore, you can The startup of the second client is further avoided, thereby saving power consumption.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(read-only memory,ROM)、随机存取器(random accessmemory,RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Flash disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.

以上对本发明实施例公开的信息显示方法、装置及电子设备进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The information display method, device, and electronic device disclosed in the embodiments of the present invention have been described in detail above. The principles and implementations of the present invention are described with specific examples in this paper. The descriptions of the above embodiments are only used to help understand the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. In summary, the content of this description should not be construed as Limitations of the present invention.

Claims (7)

1.一种信息显示方法,其特征在于,包括:1. an information display method, is characterized in that, comprises: 创建第一客户端的接口,所述第一客户端存储有软件开发包SDK,所述SDK中存储有用于创建第二客户端的上下文对象的第一代码,所述第一客户端还存储有jar包;An interface for creating a first client, the first client stores a software development kit SDK, the SDK stores a first code for creating a context object of a second client, and the first client also stores a jar package ; 建立所述接口与所述jar包的连接;establishing a connection between the interface and the jar package; 通过所述jar包与所述SDK的映射关系,从所述SDK中获取所述第一代码;Obtain the first code from the SDK through the mapping relationship between the jar package and the SDK; 将所述第一客户端的名称添加在所述第一代码中;adding the name of the first client to the first code; 执行添加所述名称后的所述第一代码,以创建包括所述第二客户端的上下文对象和所述第一客户端的名称的信息;executing the first code after adding the name to create information including the context object of the second client and the name of the first client; 根据所述信息创建所述第二客户端的组件;Create a component of the second client based on the information; 根据所述信息和所述组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The page of the second client and the page logic are displayed on the page of the first client according to the information and the component. 2.根据权利要求1所述的方法,其特征在于,所述SDK中还存储有用于创建所述第二客户端的组件的第二代码;2. The method according to claim 1, wherein the SDK also stores a second code for creating a component of the second client; 所述根据所述信息创建所述第二客户端的组件包括:The components for creating the second client according to the information include: 根据所述信息通过所述接口从所述SDK中获取所述第二代码;Obtain the second code from the SDK through the interface according to the information; 将所述第一客户端的名称添加在所述第二代码中;adding the name of the first client to the second code; 执行添加所述名称后的所述第二代码,以创建所述第二客户端的组件。The second code after adding the name is executed to create a component of the second client. 3.根据权利要求2所述的方法,其特征在于,所述SDK中还存储有用于调用所述第二客户端的代码的第三代码;3. The method according to claim 2, wherein the SDK also stores a third code for calling the code of the second client; 所述根据所述信息和所述组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上包括:The displaying the page and page logic of the second client on the page of the first client according to the information and the component includes: 当检测到用于将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上的显示指令时,根据所述信息建立所述接口与所述jar包的连接;When detecting a display instruction for displaying the page and page logic of the second client on the page of the first client, establishing a connection between the interface and the jar package according to the information; 通过所述jar包与所述SDK的映射关系,从所述SDK中获取所述第三代码;Obtain the third code from the SDK through the mapping relationship between the jar package and the SDK; 执行所述第三代码,以获取所述第二客户端的代码;executing the third code to obtain the code of the second client; 根据所述组件在所述第一客户端中执行所述第二客户端的代码,以将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The code of the second client is executed in the first client according to the component, so as to display the page and page logic of the second client on the page of the first client. 4.一种信息显示装置,其特征在于,包括:4. An information display device, characterized in that, comprising: 第一创建单元,用于创建第一客户端的接口,所述第一客户端存储有软件开发包SDK,所述SDK中存储有用于创建第二客户端的上下文对象的第一代码,所述第一客户端还存储有jar包;The first creation unit is used to create the interface of the first client, the first client stores a software development kit SDK, and the SDK stores the first code for creating the context object of the second client, the first The client also stores a jar package; 第二创建单元,用于通过所述第一创建单元创建的接口创建包括所述第二客户端的上下文对象和所述第一客户端的名称的信息;a second creation unit, configured to create information including the context object of the second client and the name of the first client through the interface created by the first creation unit; 第三创建单元,用于根据所述第二创建单元创建的信息创建所述第二客户端的组件;a third creating unit, configured to create a component of the second client according to the information created by the second creating unit; 显示单元,用于根据所述第二创建单元创建的信息和所述第三创建单元创建的组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上;a display unit, configured to display the page and page logic of the second client on the page of the first client according to the information created by the second creating unit and the component created by the third creating unit; 所述第二创建单元包括:The second creation unit includes: 第一获取子单元,用于通过所述接口从所述SDK中获取所述第一代码;a first obtaining subunit, used for obtaining the first code from the SDK through the interface; 第一添加子单元,用于将所述第一客户端的名称添加在所述第一获取子单元获取的第一代码中;a first adding subunit, configured to add the name of the first client to the first code acquired by the first acquiring subunit; 第一执行子单元,用于执行所述第一添加子单元添加所述名称后的所述第一代码,以创建包括所述第二客户端的上下文对象和所述第一客户端的名称的信息;a first execution subunit, configured to execute the first code after the name is added by the first adding subunit, to create information including the context object of the second client and the name of the first client; 所述第一获取子单元具体用于:The first acquisition subunit is specifically used for: 建立所述接口与所述jar包的连接;establishing a connection between the interface and the jar package; 通过所述jar包与所述SDK的映射关系,从所述SDK中获取所述第一代码。The first code is obtained from the SDK through the mapping relationship between the jar package and the SDK. 5.根据权利要求4所述的装置,其特征在于,所述SDK中还存储有用于创建所述第二客户端的组件的第二代码;5. The device according to claim 4, wherein the SDK also stores a second code for creating a component of the second client; 所述第三创建单元包括:The third creation unit includes: 第二获取子单元,用于根据所述信息通过所述接口从所述SDK中获取所述第二代码;a second obtaining subunit, configured to obtain the second code from the SDK through the interface according to the information; 第二添加子单元,用于将所述第一客户端的名称添加在所述第二获取子单元获取的第二代码中;a second adding subunit, configured to add the name of the first client to the second code acquired by the second acquiring subunit; 第二执行子单元,用于执行所述第二添加子单元添加所述名称后的所述第二代码,以创建所述第二客户端的组件。The second execution subunit is configured to execute the second code after the name is added by the second adding subunit, so as to create a component of the second client. 6.根据权利要求5所述的装置,其特征在于,所述SDK中还存储有用于调用所述第二客户端的代码的第三代码;6. The device according to claim 5, wherein the SDK also stores a third code for calling the code of the second client; 所述显示单元包括:The display unit includes: 建立子单元,用于当检测到用于将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上的显示指令时,根据所述信息建立所述接口与所述jar包的连接;establishing a subunit, configured to establish the interface and the jar package according to the information when a display instruction for displaying the page and page logic of the second client on the page of the first client is detected Connection; 第三获取子单元,用于通过所述建立子单元建立连接的所述jar包与所述SDK的映射关系,从所述SDK中获取所述第三代码;The third acquisition subunit is used to establish the mapping relationship between the jar package and the SDK connected by the establishment subunit, and acquire the third code from the SDK; 第三执行子单元,用于执行所述第三获取子单元获取的第三代码,以获取所述第二客户端的代码;a third execution subunit, configured to execute the third code acquired by the third acquisition subunit to acquire the code of the second client; 第四执行子单元,用于根据所述组件在所述第一客户端中执行所述第三执行子单元获取的第二客户端的代码,以将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The fourth execution subunit is configured to execute the code of the second client obtained by the third execution subunit in the first client according to the component, so as to display the page and page logic of the second client in the on the page of the first client. 7.一种电子设备,其特征在于,包括:处理器、存储器、通信接口和总线;7. An electronic device, comprising: a processor, a memory, a communication interface and a bus; 所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory and the communication interface are connected through the bus and complete mutual communication; 所述存储器存储可执行程序;the memory stores executable programs; 所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行一种信息显示方法;The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute an information display method; 其中,所述信息显示方法包括:Wherein, the information display method includes: 创建第一客户端的接口,所述第一客户端存储有软件开发包SDK,所述SDK中存储有用于创建第二客户端的上下文对象的第一代码,所述第一客户端还存储有jar包;An interface for creating a first client, the first client stores a software development kit SDK, the SDK stores a first code for creating a context object of a second client, and the first client also stores a jar package ; 建立所述接口与所述jar包的连接;establishing a connection between the interface and the jar package; 通过所述jar包与所述SDK的映射关系,从所述SDK中获取所述第一代码;Obtain the first code from the SDK through the mapping relationship between the jar package and the SDK; 将所述第一客户端的名称添加在所述第一代码中;adding the name of the first client to the first code; 执行添加所述名称后的所述第一代码,以创建包括所述第二客户端的上下文对象和所述第一客户端的名称的信息;executing the first code after adding the name to create information including the context object of the second client and the name of the first client; 根据所述信息创建所述第二客户端的组件;Create a component of the second client based on the information; 根据所述信息和所述组件将所述第二客户端的页面和页面逻辑显示在所述第一客户端的页面上。The page of the second client and the page logic are displayed on the page of the first client according to the information and the component.
CN201610539000.8A 2016-07-08 2016-07-08 Information display method and device and electronic equipment Expired - Fee Related CN106201508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610539000.8A CN106201508B (en) 2016-07-08 2016-07-08 Information display method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610539000.8A CN106201508B (en) 2016-07-08 2016-07-08 Information display method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN106201508A CN106201508A (en) 2016-12-07
CN106201508B true CN106201508B (en) 2020-06-05

Family

ID=57473233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610539000.8A Expired - Fee Related CN106201508B (en) 2016-07-08 2016-07-08 Information display method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN106201508B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108733395B (en) * 2018-05-14 2022-02-01 广州虎牙信息科技有限公司 Software application program service updating method and device and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902774A (en) * 2012-09-28 2013-01-30 用友软件股份有限公司 Page presenting system and page presenting method
CN104021039A (en) * 2014-05-30 2014-09-03 北京金山网络科技有限公司 Calling method for APP and browser
CN104063071A (en) * 2014-07-18 2014-09-24 百度在线网络技术(北京)有限公司 Content input method and device
CN104267977A (en) * 2014-09-16 2015-01-07 小米科技有限责任公司 Application program running method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9003361B2 (en) * 2012-11-30 2015-04-07 Red Hat Israel, Ltd. Generating a restful web service software development kit client
US20140181984A1 (en) * 2012-12-21 2014-06-26 International Business Machines Corporation Method and apparatus for authentication of solution topology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902774A (en) * 2012-09-28 2013-01-30 用友软件股份有限公司 Page presenting system and page presenting method
CN104021039A (en) * 2014-05-30 2014-09-03 北京金山网络科技有限公司 Calling method for APP and browser
CN104063071A (en) * 2014-07-18 2014-09-24 百度在线网络技术(北京)有限公司 Content input method and device
CN104267977A (en) * 2014-09-16 2015-01-07 小米科技有限责任公司 Application program running method and device

Also Published As

Publication number Publication date
CN106201508A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN111566608B (en) Apparatus and methods for providing functionality associated with keyboard layouts
US8639749B2 (en) Platform independent information handling system, communication method, and computer program product thereof
CN103970411B (en) For preparing the method and electronic installation of screen
WO2018103484A1 (en) Data processing method, apparatus and system for live broadcast page
CN111767090B (en) Method and device for starting applet, electronic equipment and storage medium
CN105580024B (en) Screen capture method and device
CN111435277B (en) Method, device, terminal and storage medium for displaying content
CN107870716A (en) Method and apparatus for invoking a background application
CN111352597A (en) Multi-screen display control method and device, electronic device and readable storage medium
CN104158972A (en) Method for calling third-party application in conversation process and user terminal
WO2018077041A1 (en) Method and apparatus for running application
WO2019233307A1 (en) User interface display method and apparatus, and terminal and storage medium
CN105988805A (en) Application program management method and mobile terminal
JP2017524193A (en) Method and apparatus for setting background of UI control, and terminal
CN104699515A (en) Android operating system based upgrading method and intelligent terminal
WO2019052115A1 (en) Application control style customization method and apparatus, and computer-readable storage medium
CN106201508B (en) Information display method and device and electronic equipment
CN112214404A (en) Test method, device, storage medium and electronic device for mobile application
CN115756534A (en) Card interface updating method and device, electronic equipment and storage medium
CN115344312A (en) Operating system deployment method, device, equipment and storage medium
CN110570830B (en) Device adjustment method, device, storage medium and electronic device
CN111615171A (en) Wireless local area network access method and device
CN107301089B (en) An APP deployment and invocation method and terminal
CN106980481A (en) A kind of method for displaying image and equipment
CN106603851A (en) Communication shortcut realizing method and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200605

CF01 Termination of patent right due to non-payment of annual fee