[go: up one dir, main page]

CN110139118A - Application program function operating method, device, electronic device, and storage medium - Google Patents

Application program function operating method, device, electronic device, and storage medium Download PDF

Info

Publication number
CN110139118A
CN110139118A CN201910419153.2A CN201910419153A CN110139118A CN 110139118 A CN110139118 A CN 110139118A CN 201910419153 A CN201910419153 A CN 201910419153A CN 110139118 A CN110139118 A CN 110139118A
Authority
CN
China
Prior art keywords
program
function type
target
user
target class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910419153.2A
Other languages
Chinese (zh)
Other versions
CN110139118B (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910419153.2A priority Critical patent/CN110139118B/en
Publication of CN110139118A publication Critical patent/CN110139118A/en
Application granted granted Critical
Publication of CN110139118B publication Critical patent/CN110139118B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
    • H04N21/4586Content update operation triggered locally, e.g. by comparing the version of software modules in a DVB carousel to the version stored locally

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure discloses a function running method and device of an application program, electronic equipment and a storage medium. The method comprises the following steps: when a first program generates a call demand for a program with a set function type, a main program of the application program sends a program identifier acquisition request to a server, wherein the first program and the program with the set function type are programs which run by taking the application program as an environment; the main program receives a target program identifier fed back by the server; the main program inquires a target class matched with the target program identifier in a preset database, and loads the target class into a cache to determine a cache address; the main program provides the cache address to the first program; and the first program calls the program with the set function type in the target class from the cache according to the cache address. The embodiment of the disclosure can improve the updating efficiency of the functional program and improve the fault tolerance of the functional program.

Description

应用程序的功能运行方法、装置、电子设备及存储介质Application program function operating method, device, electronic device, and storage medium

技术领域technical field

本公开实施例涉及数据处理技术,尤其涉及一种应用程序的功能运行方法、装置、电子设备及存储介质。Embodiments of the present disclosure relate to data processing technologies, and in particular, to a function running method, device, electronic device, and storage medium of an application program.

背景技术Background technique

随着互联网的发展,终端设备的功能不断扩展,例如在直播领域中,终端设备的网络视频直播系统可以将现场的音视频信号传送到服务器上,供广大网友或授权特定人群收听或收看。With the development of the Internet, the functions of terminal equipment continue to expand. For example, in the field of live broadcast, the network video live broadcast system of terminal equipment can transmit live audio and video signals to the server for the majority of netizens or authorized specific groups of people to listen or watch.

目前,直播间的功能更新是通过技术人员在原有代码的基础上进行调整修改,并将调整后的直播间进行发版,实现迭代开发,同时用户在升级版本,重新安装应用之后,从而实现使用直播间的最新功能。若直播间的存在异常,或者是存在不合理的地方需要改进,例如,切换直播间内容的浏览方式由点击操作触发改进为滑动操作触发。At present, the function update of the live broadcast room is adjusted and modified by technicians on the basis of the original code, and the adjusted live broadcast room is released to realize iterative development. At the same time, users can upgrade the version and reinstall the application to realize the use The latest features of the live room. If there are abnormalities in the live room, or there are unreasonable places that need to be improved, for example, the browsing mode of switching the content of the live room is changed from a click operation to a slide operation trigger.

现有的重构方法需要删除直播间对应的全部代码,或者直接对代码进行较大程度上的改动,对原有代码造成污染,同时还要求用户重新下载安装应用才可以实现使用更新后的直播间。而且若更新后的直播间存在更大的问题,或者更新后的直播间的投诉更多,此时原有代码已经不存在或被修改,导致不存在回滚方案,从而在直播间崩溃或展示异常时,客户端无法在直播间中正确显示直播内容。若想退回之前的直播间版本,技术人员只能将直播间重新进行开发,用户重新下载安装应用,导致直播间的更新效率低下,直播间服务容错性低。The existing refactoring method needs to delete all the codes corresponding to the live broadcast room, or directly modify the code to a large extent, causing pollution to the original code, and also requires the user to re-download and install the application in order to use the updated live broadcast between. And if there are bigger problems in the updated live room, or there are more complaints in the updated live room, the original code no longer exists or has been modified at this time, resulting in no rollback plan, which will crash or display in the live room When abnormal, the client cannot correctly display the live content in the live room. If you want to return to the previous version of the live room, the technicians can only re-develop the live room, and the user will download and install the application again, resulting in low update efficiency of the live room and low fault tolerance of the live room service.

发明内容Contents of the invention

本公开实施例提供一种应用程序的功能运行方法、装置、电子设备及存储介质,可以实现提高功能程序的更新效率,同时提高功能程序的容错性。Embodiments of the present disclosure provide a function running method, device, electronic device, and storage medium of an application program, which can improve the update efficiency of the function program and improve the fault tolerance of the function program at the same time.

第一方面,本公开实施例提供了一种应用程序的功能运行方法,该方法包括:In a first aspect, an embodiment of the present disclosure provides a function running method of an application, the method including:

在第一程序产生对设定功能类型的程序的调用需求时,所述应用程序的主程序向服务器发送程序标识获取请求,其中,所述第一程序和所述设定功能类型的程序是以所述应用程序为环境运行的程序;When the first program generates a call requirement for a program with a set function type, the main program of the application program sends a program identification acquisition request to the server, wherein the first program and the program with a set function type are based on The application program is a program run by the environment;

所述主程序接收所述服务器反馈的目标程序标识;The main program receives the target program identifier fed back by the server;

所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址,所述目标类用于形成所述设定功能类型的程序;The main program queries a preset database for a target class that matches the target program identifier, loads it into a cache, and determines a cache address, and the target class is used to form a program of the set function type;

所述主程序将所述缓存地址提供给所述第一程序;The main program provides the cache address to the first program;

所述第一程序根据所述缓存地址,从所述缓存中调用所述目标类中的设定功能类型的程序。The first program calls the program of the set function type in the target class from the cache according to the cache address.

进一步的,所述应用程序中包括至少两个类,分别对应于所述设定功能类型,且所述至少两个类中实现所述设定功能类型的程序不同。Further, the application program includes at least two classes corresponding to the set function type respectively, and the programs for realizing the set function type in the at least two classes are different.

进一步的,所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址包括:Further, the main program queries the target class matching the target program identifier in the preset database, and loads it into the cache, and determining the cache address includes:

所述主程序按照所述第一程序的调用请求中的第二程序名称,以及所述目标程序标识,在预设数据库中匹配目标类;The main program matches the target class in a preset database according to the second program name in the calling request of the first program and the target program identifier;

所述主程序按照所述设定功能类型,在目标类的代码中确定用于实现所述设定功能类型的程序,并加载到缓存中,确定缓存地址。According to the set function type, the main program determines the program for realizing the set function type in the code of the target class, loads it into the cache, and determines the cache address.

进一步的,所述设定功能类型的程序包括滑动展示直播间程序,所述第一程序包括:关注列表程序、直播间列表程序或个人主页程序。Further, the program for setting the function type includes a slide show live room program, and the first program includes: a follow-up list program, a live room list program or a personal homepage program.

进一步的,所述第一程序产生对设定功能类型的程序的调用需求,包括:Further, the first program generates a calling requirement for a program of a set function type, including:

所述关注列表程序接收到在关注用户列表界面中用户输入的针对关注用户头像的触发操作;The follow-up list program receives a trigger operation for the avatar of the follow-up user input by the user in the follow-up user list interface;

所述直播间列表程序接收到在直播间列表界面中所述用户输入的针对直播间展示缩略区域的触发操作;The live room list program receives a trigger operation for displaying a thumbnail area in the live room input by the user in the live room list interface;

所述个人主页程序接收到在用户个人主页界面中所述用户输入的针对直播用户头像的触发操作;或The personal homepage program receives a trigger operation input by the user on the user's personal homepage interface for the avatar of the live broadcast user; or

所述个人主页程序接收到在所述用户个人主页界面中所述用户输入的针对所述直播用户头像的触发操作。The personal homepage program receives a trigger operation input by the user on the user's personal homepage interface for the live broadcast user avatar.

进一步的,在调用所述目标类中的设定功能类型的程序之后,还包括:Further, after calling the program for setting the function type in the target class, it also includes:

当所述滑动展示直播间程序确定接收到用户输入的操作指令为预设上滑指令时,所述滑动展示直播间程序按照上滑方向上顺序展示直播间直播视频流;When the sliding display live room program determines that the operation instruction received by the user is a preset sliding command, the sliding display live room program displays the live video stream of the live room in sequence in the upward sliding direction;

当所述滑动展示直播间程序确定接收到用户输入的操作指令为预设下滑指令时,所述滑动展示直播间程序按照下滑方向上顺序展示直播间直播视频流。When the sliding show live room program determines that the operation instruction received from the user is a preset slide down command, the slide show live room program displays the live video streams of the live room sequentially in the direction of the slide down.

进一步的,所述主程序包括对象工厂,所述对象工厂用于在所述数据库中查询目标类,并加载到所述缓存中,确定所述缓存地址。Further, the main program includes an object factory, and the object factory is used to query the target class in the database, load it into the cache, and determine the cache address.

第二方面,本公开实施例还提供了一种应用程序的功能运行装置,该装置包括:In the second aspect, an embodiment of the present disclosure further provides an application program function running device, the device comprising:

程序标识请求模块,用于在第一程序产生对设定功能类型的程序的调用需求时,通过所述应用程序的主程序向服务器发送程序标识获取请求,其中,所述第一程序和所述设定功能类型的程序是以所述应用程序为环境运行的程序;A program identification request module, configured to send a program identification acquisition request to the server through the main program of the application program when the first program generates a call requirement for a program of a set function type, wherein the first program and the The program that sets the function type is a program that runs in the environment of the application program;

目标程序标识接收模块,用于通过所述主程序接收所述服务器反馈的目标程序标识;a target program identification receiving module, configured to receive the target program identification fed back by the server through the main program;

目标类加载模块,用于通过所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址,所述目标类用于形成所述设定功能类型的程序;The target class loading module is used to query the target class matching the target program identifier in the preset database through the main program, and load it into the cache to determine the cache address, and the target class is used to form the set program of function type;

缓存地址发送模块,用于通过所述主程序将所述缓存地址提供给所述第一程序;a cache address sending module, configured to provide the cache address to the first program through the main program;

功能类型的程序调用模块,用于通过所述第一程序根据所述缓存地址,从缓存中调用所述目标类中的设定功能类型的程序。The program calling module of the function type is used for calling the program of the set function type in the target class from the cache according to the cache address through the first program.

第三方面,本公开实施例还提供了一种电子设备,该电子设备包括:In a third aspect, an embodiment of the present disclosure further provides an electronic device, which includes:

一个或多个处理器;one or more processors;

存储器,用于存储一个或多个程序;memory for storing one or more programs;

当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开实施例所述的应用程序的功能运行方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the function running method of the application program as described in the embodiments of the present disclosure.

第四方面,本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本公开实施例所述的应用程序的功能运行方法。In a fourth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for running the function of the application program as described in the embodiments of the present disclosure is implemented.

本公开实施例通过在产生设定功能类型的程序的调用需求时,通过主程序向服务器请求获取程序标识,在接收到反馈的目标程序标识之后,通过主程序查询并加载与目标程序标识匹配的目标类,并确定缓存地址,同时提供给第一程序,以使第一程序通过缓存地址调用设定功能类型的程序,实现其他程序在实现该设定功能类型时,根据服务器的指示,查询并加载相应的功能程序,以通过调用该功能程序实现设定功能类型,从而实现针对一个设定功能类型配置可实现的功能程序,同时可以根据服务器指示及时切换实现设定功能类型的功能程序,解决了现有技术中功能程序不存在回滚方案,出现异常时修复效率低下和容错性低,以及功能程序的更新效率低下的问题,可以提高功能程序的更新效率,同时提高功能程序的容错性。In the embodiment of the present disclosure, when a call requirement for a program with a set function type is generated, the main program requests the server to obtain the program ID, and after receiving the fed back target program ID, the main program queries and loads the program ID that matches the target program ID. Target class, and determine the cache address, and provide it to the first program at the same time, so that the first program calls the program of the set function type through the cache address, so that when other programs realize the set function type, they can query and query according to the instructions of the server. Load the corresponding function program to realize the set function type by calling the function program, so as to realize the configuration of the achievable function program for a set function type, and at the same time switch the function program to realize the set function type in time according to the server’s instructions, solving the problem The problem of no rollback scheme in the functional program in the prior art, low repair efficiency and low fault tolerance when an exception occurs, and low update efficiency of the functional program can be improved, and the fault tolerance of the functional program can be improved at the same time.

附图说明Description of drawings

图1是本公开实施例中的一种应用程序的功能运行方法的流程图;FIG. 1 is a flow chart of an application function running method in an embodiment of the present disclosure;

图2a是本公开实施例中的一种应用程序的功能运行方法的流程图;Fig. 2a is a flow chart of an application function running method in an embodiment of the present disclosure;

图2b是本公开实施例所适用的一种滑动展示直播间程序的显示界面的示意图;Fig. 2b is a schematic diagram of a display interface of a sliding display live room program applicable to an embodiment of the present disclosure;

图2c是本公开实施例所适用的一种关注列表程序的显示界面的示意图;Fig. 2c is a schematic diagram of a display interface of a watchlist program applicable to an embodiment of the present disclosure;

图2d是本公开实施例所适用的一种直播间列表程序的显示界面的示意图;Fig. 2d is a schematic diagram of a display interface of a live room list program applicable to an embodiment of the present disclosure;

图2e是本公开实施例所适用的一种个人主页程序的显示界面的示意图;Fig. 2e is a schematic diagram of a display interface of a personal homepage program applicable to an embodiment of the present disclosure;

图2f是本公开实施例所适用的一种个人主页程序的显示界面的示意图;Fig. 2f is a schematic diagram of a display interface of a personal homepage program applicable to an embodiment of the present disclosure;

图3是本公开实施例中的一种应用程序的功能运行装置的结构示意图;FIG. 3 is a schematic structural diagram of a functional running device of an application program in an embodiment of the present disclosure;

图4是本公开实施例中的一种电子设备的结构示意图。Fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.

具体实施方式Detailed ways

下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本公开,而非对本公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。The present disclosure will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present disclosure, but not to limit the present disclosure. In addition, it should be noted that, for the convenience of description, only some structures related to the present disclosure are shown in the drawings but not all structures.

实施例一Embodiment one

图1为本公开实施例提供的一种应用程序的功能运行方法的流程图,本实施例可适用于第一程序调用实现设定功能类型的不同程序的情况,该方法可以由应用程序的功能运行装置来执行,该装置可以采用软件和/或硬件的方式实现,该装置可以配置于电子设备的客户端中,电子设备可以包括终端设备,典型的是手机、平板电脑或车载设备等。如图1所示,该方法具体包括如下步骤:Fig. 1 is a flow chart of an application function running method provided by an embodiment of the present disclosure. This embodiment is applicable to the case where the first program calls a different program that realizes the set function type. The method can be implemented by the function of the application program The device can be implemented by means of software and/or hardware. The device can be configured in a client of an electronic device, and the electronic device can include a terminal device, typically a mobile phone, a tablet computer, or a vehicle-mounted device. As shown in Figure 1, the method specifically includes the following steps:

S110,在第一程序产生对设定功能类型的程序的调用需求时,所述应用程序的主程序向服务器发送程序标识获取请求,其中,所述第一程序和所述设定功能类型的程序是以所述应用程序为环境运行的程序。S110, when the first program generates a call requirement for a program of a set function type, the main program of the application program sends a program identification acquisition request to the server, wherein the first program and the program of the set function type It is a program that runs in the environment of the application program.

其中,第一程序和设定功能类型的程序均可以是指在应用程序中运行的程序,需要依赖应用程序作为其运行环境。第一程序与设定功能类型的程序的功能不同,也即第一程序可以是指除设定功能类型的程序之外的程序。Wherein, both the first program and the program of the set function type may refer to a program running in an application program, which needs to rely on the application program as its operating environment. The function of the first program is different from the program for setting the function type, that is, the first program may refer to a program other than the program for setting the function type.

此外,第一程序向第一服务器请求数据,以获取该第一服务器提供的服务;设定功能类型的程序向设定功能服务器请求数据,以获取该设定功能服务器提供的服务,该服务与第一服务器提供的服务不同。示例性的,设定功能类型的程序是直播间功能程序,设定功能服务器提供直播服务,第一程序是小视频功能程序,第一服务器提供小视频服务。In addition, the first program requests data from the first server to obtain the service provided by the first server; the program for setting the function type requests data from the setting function server to obtain the service provided by the setting function server. The services provided by the first server are different. Exemplarily, the program for setting the function type is a live broadcast room function program, the setting function server provides live broadcast services, the first program is a small video function program, and the first server provides small video services.

第一程序产生对设定功能类型的程序的调用需求,用于在第一程序处于运行状态时,切换到运行设定功能类型的程序,以使设定功能类型的程序处于运行状态。具体的,调用需求可以是指第一程序接收到跳转到设定功能类型的程序的指令。示例性的,用户通过触发(如点击或触摸)第一程序的显示界面中的设定控件(如跳转按钮),确定用户输入了跳转到设定功能类型的程序的跳转指令,以及确定第一程序产生对设定功能类型的程序的调用需求。第一程序在产生对设定功能类型的程序的调用需求时,可以向主程序发送设定功能类型的程序的调用请求,以使主程序加载实现设定功能类型的程序,由此,主程序在接收到第一程序发送实现设定功能类型的程序的调用请求时,确定第一程序在产生对设定功能类型的程序的调用需求。The first program generates a call requirement for the program of the set function type, and is used to switch to running the program of the set function type when the first program is in the running state, so that the program of the set function type is in the running state. Specifically, the calling requirement may mean that the first program receives an instruction to jump to the program of the set function type. Exemplarily, by triggering (such as clicking or touching) a setting control (such as a jump button) in the display interface of the first program by the user, it is determined that the user has input a jump instruction to jump to the program of the set function type, and Determining the first program generates a calling requirement for the program of the set function type. When the first program generates a call requirement for a program with a set function type, it can send a call request for a program with a set function type to the main program, so that the main program loads the program that realizes the set function type, thus, the main program When receiving the call request sent by the first program for the program implementing the set function type, it is determined that the first program is generating a call request for the program of the set function type.

应用程序用于为第一程序和设定功能类型的程序提供运行环境,应用程序可以是指宿主程序。程序标识获取请求用于请求获取实现设定功能类型的待加载程序的程序标识。主程序用于向服务器请求程序标识,并基于反馈的目标程序标识,加载匹配的程序,以使其他程序调用该程序。其中,预设数据库中实际存储有多个具备实现设定功能类型能力的程序的代码,例如程序A的代码和程序B的代码,主程序根据服务器下发的程序标识从上述多个程序中选择一个进行加载,例如,程序A,由此,其他程序在产生对设定功能类型的程序的调用需求时,可以直接调用程序A。The application program is used to provide an operating environment for the first program and the program of the set function type, and the application program may refer to a host program. The program identification obtaining request is used to request to obtain the program identification of the program to be loaded that realizes the set function type. The main program is used to request the program ID from the server, and based on the fed back target program ID, load the matching program so that other programs can invoke the program. Among them, the preset database actually stores the codes of multiple programs capable of realizing the set function type, such as the code of program A and the code of program B, and the main program selects from the above-mentioned multiple programs according to the program identification issued by the server. One loads, for example, program A, so that other programs can directly call program A when they need to call the program of the set function type.

S120,所述主程序接收所述服务器反馈的目标程序标识。S120, the main program receives the target program identifier fed back by the server.

其中,服务器用于向客户端发送目标程序标识,以使客户端运行与目标程序标识匹配的程序,从而控制客户端从实现相同设定功能类型的多个程序中选择一个运行。目标程序标识用于标识本地存储的待加载的程序的关联数据。Wherein, the server is used to send the target program ID to the client, so that the client runs the program matching the target program ID, so as to control the client to select one of the multiple programs that realize the same set function type to run. The target program identifier is used to identify associated data of the program to be loaded locally stored.

需要说明的是,服务器可以筛选部分客户端下发程序标识A,以及筛选部分客户端下发程序标识B。客户端的筛选可以是随机的,也可以是按照预设规则选择,例如根据客户端的登陆的账号对应的用户等级确定。或者,服务器可以根据客户端的属性信息确定下发的程序标识,属性信息可以是客户端的操作系统或客户端的版本信息等。此外,服务器还可以通过其他方式确定需要下发的程序标识,如,服务器可以根据客户端的出现崩溃的次数,对此,本公开不作具体限制。It should be noted that the server may filter part of the program ID A issued by the client, and filter part of the program ID B delivered by the client. The screening of the client may be random, or may be selected according to preset rules, for example, determined according to the user level corresponding to the login account of the client. Alternatively, the server may determine the delivered program identifier according to the attribute information of the client, where the attribute information may be the operating system of the client or the version information of the client. In addition, the server may also determine the program identifier to be delivered in other ways, for example, the server may use the number of crashes of the client, which is not specifically limited in the present disclosure.

S130,所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址,所述目标类用于形成所述设定功能类型的程序。S130, the main program queries a preset database for a target class matching the target program identifier, loads it into a cache, and determines a cache address, and the target class is used to form a program of the set function type.

通常,中央处理器(Central Processing Unit,CPU)只能访问缓存,而无法访问本地数据库。也就是说,当程序存储在本地数据库中时,程序无法运行,也无法提供功能。由此,想要运行实现某个功能的程序需要预先将该程序运行所需的数据加载到缓存中,以便CPU访问,从而实现其他程序调用。Usually, a central processing unit (Central Processing Unit, CPU) can only access the cache, but cannot access the local database. That is, the program cannot run and provide functionality while it is stored in the local database. Therefore, if you want to run a program that implements a certain function, you need to load the data required for running the program into the cache in advance, so that the CPU can access it, so as to realize other program calls.

本实施例中的设定功能类型的程序实际是,将类加载在应用程序中形成的可以被调用的程序。可以理解的是,程序关联的数据以类文件的形式存储在本地数据库,其中,类中包括多个函数和多个参数。通过将类存放在缓存,实现加载类,同时实现加载程序,也即该程序通过加载类形成。由此,其他程序可以通过调用加载在缓存中的该程序,实现运行该程序,并获取该程序的运行结果,从而实现该程序的功能。需要说明的是,类加载完成后,由于类中包括多个函数,程序可以通过调用不同函数实现不同功能。The program for setting the function type in this embodiment is actually a program that can be called by loading a class into an application program. It can be understood that the data associated with the program is stored in the local database in the form of a class file, wherein the class includes multiple functions and multiple parameters. By storing the class in the cache, the loading of the class is realized, and at the same time, the loading program is realized, that is, the program is formed by loading the class. In this way, other programs can execute the program by calling the program loaded in the cache, and obtain the running result of the program, so as to realize the function of the program. It should be noted that after the class loading is completed, since the class includes multiple functions, the program can implement different functions by calling different functions.

本实施例的程序标识用于通过标识类,实现标识设定功能类型的程序。实际上,预设数据库存储有至少一个对应设定功能类型的类。可以通过服务器下发的目标程序标识从数据库中查询到匹配的类,并进行加载,形成实现设定功能类型的一个程序,从而实现通过目标程序标识形成匹配的程序。主程序还用于在加载类的同时生成缓存地址。缓存地址用于指向目标类形成的设定功能类型的程序,以使其他程序调用该程序。The program identification in this embodiment is used to identify a program of a set function type by identifying a class. Actually, the preset database stores at least one class corresponding to the set function type. The matching class can be queried from the database through the target program identifier issued by the server, and loaded to form a program that realizes the set function type, thereby realizing the formation of a matching program through the target program identifier. The main program is also used to generate cache addresses while loading classes. The buffer address is used to point to the program of the set function type formed by the target class, so that other programs can call the program.

可选的,所述应用程序中包括至少两个类,分别对应于所述设定功能类型,且所述至少两个类中实现所述设定功能类型的程序不同。Optionally, the application program includes at least two classes corresponding to the set function type respectively, and the programs for realizing the set function type in the at least two classes are different.

其中,至少两个类分别形成的程序均可以实现设定功能类型,但不同类对应形成的程序不同。也即,不同类形成的程序均具备实现设定功能类型的能力,同时除设定功能类型以外,不同类形成的程序还可以分别实现不同的其他功能。例如,至少两个类包括类A和类B,设定功能类型为直播间功能。类A形成的直播间功能程序A除了实现直播间功能之外,还可以实现送礼物特效的显示功能,而类B形成的直播间功能程序B不具备送礼物特效的显示功能。Among them, the programs formed by at least two classes can realize the set function type, but the programs formed by different classes are different. That is to say, the programs formed by different classes all have the ability to realize the set function type, and besides the set function type, the programs formed by different classes can also realize different other functions respectively. For example, at least two classes include class A and class B, and the function type is set as a live room function. In addition to realizing the function of the live broadcast room, the program A of the live room function formed by class A can also realize the display function of the special effect of giving gifts, while the functional program B of the live room formed by class B does not have the function of displaying the special effect of giving gifts.

通过配置分别对应设定功能类型的至少两个类,同时不同类中实现设定功能类型的程序不同,实现在客户端中配置均实现设定功能类型的不同的程序,从而实现客户端快速切换或更新至实现设定功能类型的不同程序,提高实现设定功能类型的程序的切换效率,可以在其中一个实现设定功能类型的程序出错时,及时切换到可实现设定功能类型的其他程序,提高应用程序功能运行的容错性。By configuring at least two classes respectively corresponding to the set function type, and at the same time, the programs for realizing the set function type in different classes are different, so as to realize the configuration of different programs in the client to realize the set function type, so as to realize the quick switching of the client Or update to different programs that realize the set function type, improve the switching efficiency of the program that realizes the set function type, and switch to other programs that can realize the set function type in time when one of the programs that realize the set function type makes an error , to improve the fault tolerance of the application function operation.

S140,所述主程序将所述缓存地址提供给所述第一程序。S140. The main program provides the cache address to the first program.

具体的,第一程序可以通过预设接口或其他方式获取缓存地址。示例性的,第一程序可以通过预设接口,向主程序请求设定功能类型的程序的缓存地址。主程序在接收到该缓存地址请求时,向服务器请求目标程序标识,并加载匹配的类,生成缓存地址,同时将缓存地址反馈给第一程序,以实现第一程序调用加载类形成的设定功能类型的程序。Specifically, the first program may obtain the cache address through a preset interface or other methods. Exemplarily, the first program can request the cache address of the program of the set function type from the main program through a preset interface. When the main program receives the cache address request, it requests the target program identifier from the server, loads the matching class, generates the cache address, and feeds back the cache address to the first program at the same time, so as to realize the setting formed by the first program calling the loaded class A program of function type.

可选的,所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址包括:所述主程序按照所述第一程序的调用请求中的第二程序名称,以及所述目标程序标识,在预设数据库中匹配目标类;所述主程序按照所述设定功能类型,在目标类的代码中确定用于实现所述设定功能类型的程序,并加载到缓存中,确定缓存地址。Optionally, the main program searches the preset database for the target class matching the target program identifier, and loads it into the cache, and determining the cache address includes: the main program according to the call request of the first program The name of the second program and the target program identifier match the target class in the preset database; the main program determines in the code of the target class to realize the set function type according to the set function type The program is loaded into the cache and the cache address is determined.

其中,第二程序名称用于确定对应设定功能类型的类的集合。目标程序标识还用于在第二程序名称确定的类的集合中筛选出匹配的目标类,以形成实现设定功能类型的程序。从而,通过第二程序名称和目标程序标识实现确定实现设定功能类型的程序。Wherein, the second program name is used to determine the set of classes corresponding to the set function type. The target program identifier is also used to filter out matching target classes from the set of classes determined by the second program name, so as to form a program for realizing the set function type. Therefore, the program that realizes the set function type can be determined through the second program name and the target program identifier.

具体的,目标类中包括多个函数和参数,实现设定功能类型的程序可以仅关联该目标类中的部分数据,从而,可以将目标类中与设定功能类型的程序关联的数据(如函数或参数)存放在缓存中,实现加载操作,并确定指向该部分数据在缓存中的地址作为缓存地址,用于指向设定功能类型的程序。Specifically, the target class includes multiple functions and parameters, and the program that realizes the set function type can only associate part of the data in the target class, so that the data associated with the program of the set function type in the target class (such as functions or parameters) are stored in the cache to implement the loading operation, and determine the address pointing to the part of the data in the cache as the cache address, which is used to point to the program of the set function type.

此外,也可以将目标类的全部数据均加载到缓存中,并确定指向该数据的缓存地址。In addition, it is also possible to load all the data of the target class into the cache, and determine the cache address pointing to the data.

通过调用请求中的第二程序名称和目标程序标识查询目标类,可以准确确定实现设定功能类型的程序,并按照设定功能类型,将目标类中的数据实现设定功能类型的程序的加载操作,并确定目标类中的数据的缓存地址,从而实现加载设定功能类型的程序,并确定匹配的缓存地址,方便其他程序调用。By invoking the second program name and target program identifier in the call request to query the target class, the program that realizes the set function type can be accurately determined, and the data in the target class can be loaded according to the set function type. Operation, and determine the cache address of the data in the target class, so as to realize the loading of the program of the set function type, and determine the matching cache address, which is convenient for other programs to call.

通常,在加载和调用不同的程序时,技术人员需要对应的编写匹配的代码。例如,若需要调用的程序为A,需要在主程序中编写相应代码,如判断目标程序标识为A,则获取程序A的关联数据并进行加载,并获取程序A的缓存地址A,同时将缓存地址A返回至需要调用的第一程序,同时还需要在第一程序中编写调用缓存地址A的代码;若需要调用的程序为B,需要在主程序中编写相应代码如判断目标程序标识为B,则获取程序B的关联数据并进行加载,并获取程序B的缓存地址B,并将缓存地址B返回至需要调用的第一程序,同时还需要在第一程序中编写调用缓存地址B的代码。也即,无论是主程序还是第一程序,当加载和调用程序不同时,均需要对应程序编写一套相应编写加载和调用程序的代码。可以理解的是,当本地存储三个类对应设定功能类型,此时,需要编写三套加载和调用设定功能类型的程序的代码。为了避免重复代码开发可以选择对象工厂实现加载目标类。Usually, when loading and calling different programs, technicians need to write corresponding codes. For example, if the program to be called is A, the corresponding code needs to be written in the main program. If the target program is identified as A, then the associated data of program A is obtained and loaded, and the cache address A of program A is obtained, and the cache Address A returns to the first program that needs to be called, and at the same time, it is necessary to write the code to call the cache address A in the first program; if the program to be called is B, it is necessary to write the corresponding code in the main program, such as judging that the target program is identified as B , then obtain the associated data of program B and load it, and obtain the cache address B of program B, and return the cache address B to the first program that needs to be called, and also need to write the code for calling the cache address B in the first program . That is to say, no matter it is the main program or the first program, when the loading and calling programs are different, a set of codes for correspondingly writing the loading and calling programs needs to be written corresponding to the program. It can be understood that when the three classes of local storage correspond to the set function type, at this time, it is necessary to write three sets of codes for loading and calling the program of the set function type. In order to avoid repeated code development, an object factory can be selected to implement the loading target class.

可选的,主程序包括对象工厂,所述对象工厂用于在所述数据库中查询目标类,并加载到所述缓存中,确定所述缓存地址。Optionally, the main program includes an object factory, and the object factory is used to query the target class in the database, load it into the cache, and determine the cache address.

其中,对象工厂用于加载目标类,并返回一个返回值,该返回值作为缓存地址,用于指向目标类在缓存的地址。第一程序在获取返回值时,可以通过返回值调用指向的程序,以实现设定功能类型。可以理解的是,第一程序在需要调用设定功能类型的程序时,仅需要向对象工厂请求,并根据对象工厂反馈的返回值调用该程序。Among them, the object factory is used to load the target class and return a return value, which is used as a cache address to point to the address of the target class in the cache. When the first program obtains the return value, it can call the program pointed to by the return value, so as to realize the setting function type. It can be understood that when the first program needs to call the program of the set function type, it only needs to request the object factory, and call the program according to the return value fed back by the object factory.

实际上,对象工厂可以加载多个程序,但对外暴露的接口是同一个,第一程序在调用该接口时,仅需要将返回值发送至该接口,即可实现调用该返回值指向的程序,也即在需要调用设定功能类型的程序时,仅需编写一套第一程序通过返回值调用该接口的代码即可,从而实现减少重复代码的开发,提高程序开发的效率。In fact, the object factory can load multiple programs, but the interface exposed to the outside is the same. When the first program calls this interface, it only needs to send the return value to this interface, and then the program pointed to by the return value can be called. That is to say, when it is necessary to call the program of the set function type, it is only necessary to write a set of codes for the first program to call the interface through the return value, so as to reduce the development of repeated codes and improve the efficiency of program development.

具体的,第一程序可以向对象工厂发送调用请求,包括第二程序名称。对象工厂基于所述调用请求,生成程序标识获取请求,并发送至与第二程序名称匹配的服务器,以获取服务器下发的目标程序标识,由此,对象工厂可以根据第二程序名称和目标程序标识创建匹配的对象,即加载目标类,以及形成设定功能类型的程序,并生成返回值至第一程序,以使第一程序通过返回值调用对象工厂暴露的接口,实现调用设定功能类型的程序。Specifically, the first program may send a call request to the object factory, including the name of the second program. The object factory generates a program identification acquisition request based on the invocation request, and sends it to the server matching the second program name to obtain the target program identification issued by the server. Therefore, the object factory can Identify and create a matching object, that is, load the target class, and form a program of the set function type, and generate a return value to the first program, so that the first program can call the interface exposed by the object factory through the return value, and realize the call of the set function type program of.

通过使用对象工厂查询目标类并加载,可以减少重复代码的开发量,提高程序的扩展性。By using the object factory to query and load the target class, the amount of repetitive code development can be reduced and the scalability of the program can be improved.

此外,若想调用新的程序,仅需在预设数据库中增加对应设定功能类型的类,同时在对象工厂中新增该类的对象即可,提高新程序的开发效率。In addition, if you want to call a new program, you only need to add a class corresponding to the set function type in the default database, and add an object of this class in the object factory at the same time, which improves the development efficiency of the new program.

S150,所述第一程序根据所述缓存地址,从缓存中调用所述目标类中的设定功能类型的程序。S150, the first program calls the program of the set function type in the target class from the cache according to the cache address.

第一程序通过缓存地址,获取设定功能类型的程序关联的应用代码,实现调用设定功能类型的程序,从而实现设定功能类型。The first program obtains the application code associated with the program for setting the function type through the buffer address, and realizes calling the program for setting the function type, thereby realizing the setting function type.

本公开实施例通过在产生设定功能类型的程序的调用需求时,通过主程序向服务器请求获取程序标识,在接收到反馈的目标程序标识之后,通过主程序查询并加载与目标程序标识匹配的目标类,并确定缓存地址,同时提供给第一程序,以使第一程序通过缓存地址调用设定功能类型的程序,实现其他程序在实现该设定功能类型时,根据服务器的指示,查询并加载相应的功能程序,以通过调用该功能程序实现设定功能类型,从而实现针对一个设定功能类型配置可实现的功能程序,同时可以根据服务器指示及时切换实现设定功能类型的功能程序,解决了现有技术中功能程序不存在回滚方案,出现异常时修复效率低下和容错性低,以及功能程序的更新效率低下的问题,可以提高功能程序的更新效率,同时提高功能程序的容错性。In the embodiment of the present disclosure, when a call requirement for a program with a set function type is generated, the main program requests the server to obtain the program ID, and after receiving the fed back target program ID, the main program queries and loads the program ID that matches the target program ID. Target class, and determine the cache address, and provide it to the first program at the same time, so that the first program calls the program of the set function type through the cache address, so that when other programs realize the set function type, they can query and query according to the instructions of the server. Load the corresponding function program to realize the set function type by calling the function program, so as to realize the configuration of the achievable function program for a set function type, and at the same time switch the function program to realize the set function type in time according to the server’s instructions, solving the problem The problem of no rollback scheme in the functional program in the prior art, low repair efficiency and low fault tolerance when an exception occurs, and low update efficiency of the functional program can be improved, and the fault tolerance of the functional program can be improved at the same time.

图2a为本公开实施例中的一种应用程序的功能运行方法的流程图。该方法以上述步骤为基础进行优化,将所述设定功能类型的程序具体化为滑动展示直播间程序,以及将所述第一程序具体化为下述任意一项:关注列表程序、直播间列表程序或个人主页程序。如图2a所示,该方法具体包括如下步骤:Fig. 2a is a flow chart of an application function running method in an embodiment of the present disclosure. The method is optimized on the basis of the above steps, and the program for setting the function type is embodied as a sliding display live room program, and the first program is embodied as any of the following: follow-up list program, live room Listing programs or personal home page programs. As shown in Figure 2a, the method specifically includes the following steps:

S210,在第一程序产生对滑动展示直播间程序的调用需求时,所述应用程序的主程序向服务器发送程序标识获取请求,其中,所述第一程序和滑动展示直播间程序是以所述应用程序为环境运行的程序,所述第一程序包括:关注列表程序、直播间列表程序或个人主页程序。S210, when the first program generates a call requirement for the program of the sliding display live room, the main program of the application program sends a program identification acquisition request to the server, wherein the first program and the program of the sliding display live room are based on the The application program is a program run by the environment, and the first program includes: a watch list program, a live room list program or a personal homepage program.

其中,滑动展示直播间程序用于表示通过用户滑动操作实现切换直播间展示内容的程序。具体如图2b所示,图2b所示的滑动展示直播间程序可以通过用户的上滑或下滑操作实现在上滑或下滑方向上滑动切换直播间的展示内容。服务器可以是指提供直播服务的服务器。Wherein, the sliding display live room program is used to indicate a program for switching the content displayed in the live room through a user's sliding operation. Specifically, as shown in FIG. 2b, the sliding display live room program shown in FIG. 2b can slide up or down to switch the display content of the live room through the user's up or down operation. The server may refer to a server providing live broadcast services.

可选的,所述第一程序产生对设定功能类型的程序的调用需求,包括:所述关注列表程序接收到在关注用户列表界面中用户输入的针对关注用户头像的触发操作;所述直播间列表程序接收到在直播间列表界面中所述用户输入的针对直播间展示缩略区域的触发操作;所述个人主页程序接收到在用户个人主页界面中所述用户输入的针对直播用户头像的触发操作;或所述个人主页程序接收到在所述用户个人主页界面中所述用户输入的针对所述直播用户头像的触发操作。Optionally, the first program generates a call requirement for a program with a set function type, including: the following list program receives a trigger operation on the avatar of the user input by the user in the following user list interface; the live broadcast The room list program receives the trigger operation for displaying the thumbnail area in the live room input by the user in the live room list interface; A trigger operation; or the personal homepage program receives a trigger operation input by the user on the user's personal homepage interface for the avatar of the live broadcast user.

具体的,图2c是一种关注列表程序的显示界面的示意图,如图2c所示,关注列表程序的显示界面中展示有当前用户关注的关注用户的直播动态和视频动态。当前用户通过手发出对第三用户的用户头像区域的触发操作(如点击或触摸),实现关注列表程序产生对滑动展示直播间程序的调用需求,并在实现调用滑动展示直播间程序的操作之后,客户端的显示界面显示如图2b所示的滑动展示直播间程序的显示界面。Specifically, FIG. 2c is a schematic diagram of a display interface of a follow-up list program. As shown in FIG. 2c, the display interface of the watch-list program displays the live broadcast dynamics and video dynamics of the following users concerned by the current user. The current user issues a trigger operation (such as clicking or touching) on the user avatar area of the third user by hand, and the watch list program generates a call requirement for the program of the sliding display live room, and after realizing the operation of calling the program of the sliding display live room , the display interface of the client terminal displays the display interface of the sliding display program of the live broadcast room as shown in FIG. 2b.

图2d是一种直播间列表程序的显示界面的示意图,如图2c所示,直播间列表程序的显示界面中展示有正在直播的直播间的主题图的列表,其中,该主题图可以是指直播用户在开始直播时预先设定的显示图像。直播间列表程序可以通过用户的上滑或下滑操作实现在上滑或下滑方向上滑动切换主题图。同时,当主题图的显示区域超过设定面积阈值时,在主题图中显示有该直播间对应的直播间展示缩略区域,具体的,如图2c所示,第一直播间主题图中显示有第一直播间展示缩略区域。其中,直播间展示缩略区域展示了对应的直播间正在直播的直播视频流。当前用户通过手发出对直播间展示缩略区域的触发操作(如点击或触摸),实现直播间列表程序产生对滑动展示直播间程序的调用需求,并在实现调用滑动展示直播间程序的操作之后,客户端的显示界面显示如图2b所示的滑动展示直播间程序的显示界面。Fig. 2d is a schematic diagram of the display interface of a live room list program, as shown in Fig. 2c, the display interface of the live room list program shows a list of theme maps of the live room being broadcast, wherein the theme map can refer to The display image preset by the live broadcast user when starting the live broadcast. The live room list program can slide up or down to switch the theme map through the user's up or down operation. At the same time, when the display area of the theme map exceeds the set area threshold, the live room display thumbnail area corresponding to the live room is displayed in the theme map. Specifically, as shown in Figure 2c, the theme map of the first live room shows There is a thumbnail area displayed in the first live room. Wherein, the thumbnail area displayed in the live broadcast room displays the live video stream being broadcast live in the corresponding live broadcast room. At present, the user issues a trigger operation (such as clicking or touching) on the thumbnail area displayed in the live room by hand, so that the list program of the live room will generate a call demand for the program of the sliding display live room, and after the operation of calling the program of the sliding display live room is realized , the display interface of the client terminal displays the display interface of the sliding display program of the live broadcast room as shown in FIG. 2b.

图2e和图2f是一种用户个人主页程序的显示界面的示意图,如图2e和图2f所示,用户个人主页程序的显示界面中展示设定用户个人主页,如图2e和图2f中所示的第一用户个人主页,具体包括用户头像、用户简介和用户发布的视频等内容。当设定用户正在直播时,用户头像中会显示正在直播的提示信息,同时,在用户发布内容中显示该设定用户正在直播的直播间对应的直播间展示缩略区域。同前,该直播间展示缩略区域展示了对应的直播间正在直播的直播视频流。当前用户通过手发出对正在浏览的用户个人主页中的用户头像的触发操作或者对正在浏览的用户个人主页中的直播间展示缩略区域的触发操作(如点击或触摸),实现用户个人主页程序产生对滑动展示直播间程序的调用需求,并在实现调用滑动展示直播间程序的操作之后,客户端的显示界面显示如图2b所示的滑动展示直播间程序的显示界面。Fig. 2e and Fig. 2f are schematic diagrams of the display interface of a user's personal homepage program, as shown in Fig. 2e and Fig. 2f, the display interface of the user's personal homepage program displays and sets the user's personal homepage, as shown in Fig. 2e and Fig. 2f The personal homepage of the first user displayed, specifically including the user's avatar, user profile, and videos posted by the user. When it is set that the user is live broadcasting, the prompt information of the live broadcasting will be displayed on the user avatar, and at the same time, the thumbnail area of the live broadcast room corresponding to the live broadcast room where the set user is live broadcasting will be displayed in the content posted by the user. As before, the thumbnail area of the live broadcast room displays the live video stream being broadcast in the corresponding live broadcast room. The current user triggers the user's avatar on the user's personal homepage that is being browsed or the trigger operation (such as clicking or touching) to display the thumbnail area in the live broadcast room on the user's personal homepage that is currently browsing to realize the user's personal homepage program A call requirement for the program of the sliding display live room is generated, and after the operation of calling the program of the sliding display live room is realized, the display interface of the client displays the display interface of the program of the sliding display live room as shown in FIG. 2b.

通过针对第一程序分别为关注列表程序、直播间列表程序或个人主页程序时,分别设置不同的触发条件,确定第一程序产生对设定功能类型的程序的调用需求,可以提高设定功能类型的程序的调用方式的多样性。By setting different trigger conditions when the first program is a watch list program, a live room list program or a personal homepage program, it is determined that the first program generates a call requirement for a program of the set function type, which can improve the set function type The diversity of calling methods of the program.

需要说明的是,关注列表程序、直播间列表程序或个人主页程序仅是一种具体实现方式的示例,还可以将应用程序中的其他程序作为第一程序,同时,每个程序中的触发条件还可以包括其他操作,对此,本公开实施例不做具体限制。It should be noted that the watch list program, the live room list program or the personal home page program are only examples of a specific implementation, and other programs in the application program can also be used as the first program, and at the same time, the trigger conditions in each program Other operations may also be included, which are not specifically limited in this embodiment of the present disclosure.

S220,所述主程序接收所述服务器反馈的目标程序标识。S220, the main program receives the target program identifier fed back by the server.

S230,所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址,所述目标类用于形成所述滑动展示直播间程序。S230, the main program queries the target class matching the target program identifier in the preset database, loads it into the cache, and determines the cache address, and the target class is used to form the sliding display live room program.

S240,所述主程序将所述缓存地址提供给所述第一程序。S240. The main program provides the cache address to the first program.

S250,所述第一程序根据所述缓存地址,从缓存中调用所述目标类中的滑动展示直播间程序。S250. According to the cache address, the first program calls the sliding display live room program in the target class from the cache.

可选的,在调用所述目标类中的设定功能类型的程序之后,还包括:当所述滑动展示直播间程序确定接收到用户输入的操作指令为预设上滑指令时,所述滑动展示直播间程序按照上滑方向上顺序展示直播间直播视频流;或当所述滑动展示直播间程序确定接收到用户输入的操作指令为预设下滑指令时,所述滑动展示直播间程序按照下滑方向上顺序展示直播间直播视频流。Optionally, after calling the program for setting the function type in the target class, it also includes: when the program of the sliding display live room determines that the operation instruction received from the user is a preset sliding instruction, the sliding The show live room program displays the live video stream of the live room sequentially in the direction of the upward slide; Display the live video streams in the live room in sequence.

在一个具体的例子中,如图2b所示,当前用户通过手发出对直播间的上滑指令,显示界面中在上滑方向上顺序展示直播间直播视频流,具体的,如图2b所示,第一直播间内容展示区域上移,同时第二直播间内容展示区域在上滑方向上逐渐展示。In a specific example, as shown in Figure 2b, the current user issues an instruction to slide up the live broadcast room through the hand, and the live video stream of the live broadcast room is sequentially displayed in the upward sliding direction on the display interface, specifically, as shown in Figure 2b , the content display area of the first live room moves up, and at the same time, the content display area of the second live room is gradually displayed in the upward sliding direction.

通过第一程序在产生对滑动展示直播间程序的调用需求,获取直播服务器下发的目标程序标识,并通过主程序对与目标程序标识匹配的目标类进行加载,并生成缓存地址,返回至第一程序,以使第一程序调用滑动展示直播间程序,实现滑动切换展示直播间的功能,提高直播间程序的更新效率,同时提高直播间程序的容错性。Through the first program, when the call requirement for the program in the sliding display live room is generated, the target program ID issued by the live server is obtained, and the target class matching the target program ID is loaded through the main program, and a cache address is generated, and the return to the first A program, so that the first program calls the program of the sliding display live room, realizes the function of sliding switching and displaying the live room, improves the update efficiency of the program of the live room, and improves the fault tolerance of the program of the live room.

此外,若主程序接收到目标程序标识信息用于标识第一目标类,所述第一目标类用于形成第一滑动展示直播间程序,则主程序在缓存中加载第一滑动展示直播间程序;若主程序接收到目标程序标识信息用于标识第二目标类,所述第二目标类用于形成第二滑动展示直播间程序,则主程序在缓存中加载第二滑动展示直播间程序。其中,第一滑动展示直播间程序和第二滑动展示直播间程序的功能不同。In addition, if the main program receives the target program identification information for identifying the first target class, and the first target class is used to form the first sliding display live room program, then the main program loads the first sliding display live room program in the cache ; If the main program receives the target program identification information for identifying the second target class, and the second target class is used to form the second slide show live room program, then the main program loads the second slide show live room program in the cache. Wherein, the functions of the first sliding display live room program and the second sliding display live room program are different.

例如,第一滑动展示直播间程序是在上下滑方向上顺序展示直播间直播视频流。第二滑动展示直播间程序是在左右滑方向上顺序展示直播间直播视频流。For example, the program for first sliding to display the live room is to sequentially display the live video streams of the live room in an up and down direction. The second program of sliding to display the live room is to sequentially display the live video streams of the live room in the direction of sliding left and right.

具体为:当第二滑动展示直播间程序确定接收到用户输入的操作指令为预设左滑指令时,第二滑动展示直播间程序按照左滑方向上顺序展示直播间直播视频流;或当第二滑动展示直播间程序确定接收到用户输入的操作指令为预设右滑指令时,第二滑动展示直播间程序按照右滑方向上顺序展示直播间直播视频流。Specifically: when the second sliding display live room program determines that the operation instruction received from the user is a preset left sliding command, the second sliding display live room program displays the live video stream of the live room in sequence in the direction of the left slide; or when the second sliding display live room program When the second sliding display live room program determines that the operation command input by the user is a preset right slide command, the second sliding display live room program displays the live video streams of the live room in sequence in the direction of the right slide.

可选的,在调用所述目标类中的设定功能类型的程序之后,还可以包括:Optionally, after calling the program for setting the function type in the target class, it may also include:

当第一滑动展示直播间程序确定接收到用户输入的操作指令为预设滑动指令时,第一滑动展示直播间程序调用第一目标类加载在缓存中的第一预加载函数,以实现预加载直播间推荐内容数据;或者,当第二滑动展示直播间程序确定接收到用户输入的操作指令为预设滑动指令,且当前展示直播间的已展示区域面积大于等于所述当前展示直播间的全部展示区域面积的一半时,第二滑动展示直播间程序调用第二目标类加载在缓存中的第二预加载函数,以实现预加载直播间推荐内容数据。When the first sliding display live room program determines that the operation instruction received from the user is a preset sliding command, the first sliding display live room program calls the first preload function loaded in the cache by the first target class to achieve preloading The recommended content data in the live room; or, when the second sliding display live room program determines that the operation instruction received by the user is a preset sliding command, and the displayed area of the currently displayed live room is greater than or equal to all of the current displayed live room When displaying half of the area, the program of the second sliding display live room calls the second preload function loaded in the cache by the second target class, so as to preload the recommended content data of the live room.

当第一滑动展示直播间程序确定接收到预设运行指令时,第一滑动展示直播间程序调用第一目标类加载在缓存中的第一跳转过渡函数,以实现预加载直播间推荐内容数据;或者,当第二滑动展示直播间程序确定接收到预设运行指令时,第二滑动展示直播间程序调用第二目标类加载在缓存中的第二跳转过渡函数,以实现渐隐渐现过渡效果展示直播间内容流。When the first sliding display live room program determines that the preset operation instruction is received, the first sliding display live room program calls the first jump transition function loaded in the cache by the first target class, so as to realize the preloading of the recommended content data of the live room ; Or, when the second sliding display live room program determines to receive the preset running instruction, the second sliding display live room program calls the second jump transition function loaded in the cache by the second target class to realize fading in and out The transition effect shows the content flow of the live room.

此外,除设定功能类型之外,不同滑动展示直播间程序实现的功能还包括其他内容,对此,本公开实施例不做具体限制。In addition, in addition to setting the function type, the functions realized by the different sliding display live room programs also include other content, which is not specifically limited in the embodiments of the present disclosure.

图3为本公开实施例中的一种应用程序的功能运行装置的结构示意图,本实施例的应用程序的功能运行装置可适用于第一程序调用实现设定功能类型的不同程序情况。该装置可以采用软件和/或硬件的方式实现,该装置可以配置于电子设备中。如图3所示,该装置可以包括:程序标识请求模块310、目标程序标识接收模块320、目标类加载模块330、缓存地址发送模块340和功能类型的程序调用模块350。FIG. 3 is a schematic structural diagram of an application program function running device in an embodiment of the present disclosure. The application program function running device in this embodiment may be applicable to different programs in which the first program calls to implement a set function type. The device can be implemented in software and/or hardware, and the device can be configured in electronic equipment. As shown in FIG. 3 , the device may include: a program identification request module 310 , a target program identification receiving module 320 , a target class loading module 330 , a buffer address sending module 340 and a function type program calling module 350 .

程序标识请求模块310,用于在第一程序产生对设定功能类型的程序的调用需求时,通过所述应用程序的主程序向服务器发送程序标识获取请求,其中,所述第一程序和所述设定功能类型的程序是以所述应用程序为环境运行的程序;The program identification request module 310 is configured to send a program identification acquisition request to the server through the main program of the application program when the first program generates a call requirement for a program of a set function type, wherein the first program and the The program for setting the function type is a program that runs in the environment of the application program;

目标程序标识接收模块320,用于通过所述主程序接收所述服务器反馈的目标程序标识;A target program identifier receiving module 320, configured to receive the target program identifier fed back by the server through the main program;

目标类加载模块330,用于通过所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址,所述目标类用于形成所述设定功能类型的程序;The target class loading module 330 is used to query the target class matching the target program identifier in the preset database through the main program, and load it into the cache to determine the cache address, and the target class is used to form the design Programs of a given type of function;

缓存地址发送模块340,用于通过所述主程序将所述缓存地址提供给所述第一程序;a cache address sending module 340, configured to provide the cache address to the first program through the main program;

功能类型的程序调用模块350,用于通过所述第一程序根据所述缓存地址,从缓存中调用所述目标类中的设定功能类型的程序。The function-type program calling module 350 is configured to use the first program to call the program of the set function type in the target class from the cache according to the cache address.

本公开实施例通过在产生设定功能类型的程序的调用需求时,通过主程序向服务器请求获取程序标识,在接收到反馈的目标程序标识之后,通过主程序查询并加载与目标程序标识匹配的目标类,并确定缓存地址,同时提供给第一程序,以使第一程序通过缓存地址调用设定功能类型的程序,实现其他程序在实现该设定功能类型时,根据服务器的指示,查询并加载相应的功能程序,以通过调用该功能程序实现设定功能类型,从而实现针对一个设定功能类型配置可实现的功能程序,同时可以根据服务器指示及时切换实现设定功能类型的功能程序,解决了现有技术中功能程序不存在回滚方案,出现异常时修复效率低下和容错性低,以及功能程序的更新效率低下的问题,可以提高功能程序的更新效率,同时提高功能程序的容错性。In the embodiment of the present disclosure, when a call requirement for a program with a set function type is generated, the main program requests the server to obtain the program ID, and after receiving the fed back target program ID, the main program queries and loads the program ID that matches the target program ID. Target class, and determine the cache address, and provide it to the first program at the same time, so that the first program calls the program of the set function type through the cache address, so that when other programs realize the set function type, they can query and query according to the instructions of the server. Load the corresponding function program to realize the set function type by calling the function program, so as to realize the configuration of the achievable function program for a set function type, and at the same time switch the function program to realize the set function type in time according to the server’s instructions, solving the problem The problem of no rollback scheme in the functional program in the prior art, low repair efficiency and low fault tolerance when an exception occurs, and low update efficiency of the functional program can be improved, and the fault tolerance of the functional program can be improved at the same time.

进一步的,所述应用程序中包括至少两个类,分别对应于所述设定功能类型,且所述至少两个类中实现所述设定功能类型的程序不同。Further, the application program includes at least two classes corresponding to the set function type respectively, and the programs for realizing the set function type in the at least two classes are different.

进一步的,所述目标类加载模块330包括:目标类匹配单元,用于通过所述主程序按照所述第一程序的调用请求中的第二程序名称,以及所述目标程序标识,在预设数据库中匹配目标类;缓存地址确定单元,用于通过所述主程序按照所述设定功能类型,在目标类的代码中确定用于实现所述设定功能类型的程序,并加载到缓存中,确定缓存地址。Further, the target class loading module 330 includes: a target class matching unit, configured to use the main program according to the name of the second program in the call request of the first program and the identifier of the target program, in a preset Matching the target class in the database; the cache address determination unit is used to determine the program for realizing the set function type in the code of the target class according to the set function type through the main program, and load it into the cache , to determine the cache address.

进一步的,所述设定功能类型的程序包括滑动展示直播间程序,所述第一程序包括:关注列表程序、直播间列表程序或个人主页程序。Further, the program for setting the function type includes a slide show live room program, and the first program includes: a follow-up list program, a live room list program or a personal homepage program.

进一步的,所述程序标识请求模块310,包括:触发操作获取单元,用于通过所述关注列表程序接收到在关注用户列表界面中用户输入的针对关注用户头像的触发操作;通过所述直播间列表程序接收到在直播间列表界面中用户输入的针对直播间展示缩略区域的触发操作;所述个人主页程序接收到在用户个人主页界面中所述用户输入的针对直播用户头像的触发操作;或所述个人主页程序接收到在所述用户个人主页界面中所述用户输入的针对所述直播用户头像的触发操作。Further, the program identification request module 310 includes: a trigger operation acquisition unit, configured to receive a trigger operation on the avatar of the user who follows in the user-followed list interface input by the user through the follow-up list program; through the live broadcast room The list program receives the trigger operation for displaying the thumbnail area in the live room input by the user in the live room list interface; the personal homepage program receives the trigger operation for the live user avatar input by the user in the user's personal homepage interface; Or the personal homepage program receives a trigger operation input by the user on the user's personal homepage interface for the live broadcast user avatar.

进一步的,所述装置,还包括:上下滑动展示直播间单元,用于在调用所述目标类中的设定功能类型的程序之后,当所述滑动展示直播间程序确定接收到用户输入的操作指令为预设上滑指令时,通过所述滑动展示直播间程序按照上滑方向上顺序展示直播间直播视频流;或当所述滑动展示直播间程序确定接收到用户输入的操作指令为预设下滑指令时,通过所述滑动展示直播间程序按照下滑方向上顺序展示直播间直播视频流。Further, the device further includes: a unit for sliding up and down to display the live broadcast room, used for calling the program of the set function type in the target class, when the sliding display live broadcast room program determines that the operation input by the user is received When the instruction is a preset sliding instruction, the program of the sliding display live room displays the live video stream of the live room sequentially in the upward sliding direction; or when the program of the sliding display live room determines that the operation instruction received from the user is preset When the command is slid down, the live room program will display the live video streams in the live room according to the direction of the slide.

进一步的,所述主程序包括对象工厂,所述对象工厂用于在所述数据库中查询目标类,并加载到所述缓存中,确定所述缓存地址。Further, the main program includes an object factory, and the object factory is used to query the target class in the database, load it into the cache, and determine the cache address.

下面参考图4,其示出了适于用来实现本公开实施例的电子设备(例如终端设备或服务器)400的结构示意图。本公开实施例中的电子设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(PDA)、平板电脑(PAD)、便携式多媒体播放器(PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图4示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 4 , it shows a schematic structural diagram of an electronic device (such as a terminal device or a server) 400 suitable for implementing an embodiment of the present disclosure. Electronic devices in embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 4 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.

如图4所示,电子设备400可以包括处理装置(例如中央处理器、图形处理器等)401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储装置408加载到随机访问存储器(RAM)403中的程序而执行各种适当的动作和处理。在RAM 403中,还存储有电子设备400操作所需的各种程序和数据。处理装置401、ROM 402以及RAM 403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。As shown in FIG. 4, an electronic device 400 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 401, which may be randomly accessed according to a program stored in a read-only memory (ROM) 402 or loaded from a storage device 408. Various appropriate actions and processes are executed by programs in the memory (RAM) 403 . In the RAM 403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401 , ROM 402 and RAM 403 are connected to each other through a bus 404 . An input/output (I/O) interface 405 is also connected to bus 404 .

通常,以下装置可以连接至I/O接口405:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置406;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置407;包括例如磁带、硬盘等的存储装置408;以及通信装置409。通信装置409可以允许电子设备400与其他设备进行无线或有线通信以交换数据。虽然图4示出了具有各种装置的电子设备400,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Typically, the following devices can be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 407 such as a computer; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to perform wireless or wired communication with other devices to exchange data. While FIG. 4 shows electronic device 400 having various means, it should be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置409从网络上被下载和安装,或者从存储装置408被安装,或者从ROM 402被安装。在该计算机程序被处理装置401执行时,执行本公开实施例的应用程序的功能运行方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 409 , or from storage means 408 , or from ROM 402 . When the computer program is executed by the processing device 401, the above-mentioned functions defined in the function running method of the application program in the embodiment of the present disclosure are executed.

需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable signal medium may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.

上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:在第一程序产生对设定功能类型的程序的调用需求时,所述应用程序的主程序向服务器发送程序标识获取请求,其中,所述第一程序和设定功能类型的程序是以所述应用程序为环境运行的程序;所述主程序接收所述服务器反馈的目标程序标识;所述主程序在预设数据库中查询与所述目标程序标识匹配的目标类,并加载到缓存中,确定缓存地址,所述目标类用于形成所述设定功能类型的程序;所述主程序将所述缓存地址提供给所述第一程序;所述第一程序根据所述缓存地址,从缓存中调用所述目标类中的设定功能类型的程序。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: when the first program generates a call requirement for a program with a set function type, the The main program of the application program sends a program identification acquisition request to the server, wherein the first program and the program for setting the function type are programs run in the environment of the application program; the main program receives the feedback from the server Target program identification; the main program queries the target class matching the target program identification in the preset database, and loads it into the cache to determine the cache address, and the target class is used to form the program of the set function type ; The main program provides the cache address to the first program; the first program calls the program of the set function type in the target class from the cache according to the cache address.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.

描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,程序标识请求模块还可以被描述为“在第一程序产生对设定功能类型的程序的调用需求时,通过所述应用程序的主程序向服务器发送程序标识获取请求的模块”。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Among them, the name of the module does not constitute a limitation on the module itself in some cases. For example, the program identification request module can also be described as "when the first program generates a call requirement for the program of the set function type, through A module in which the main program of the application program sends a program identification acquisition request to the server".

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principle. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

Claims (10)

1. a kind of function operation method of application program characterized by comprising
When the first program is generated to the calling demand of the program of set-up function type, the main program of the application program is to service Device sends program identification acquisition request, wherein the program of first program and the set-up function type is with the application Program is the program of environment operation;
The main program receives the target program mark of the server feedback;
The main program is inquired in the preset database identifies matched target class with the target program, and is loaded into caching In, determine buffer address, the target class is used to form the program of the set-up function type;
The buffer address is supplied to first program by the main program;
First program is according to the buffer address, from the set-up function type called in the target class in the caching Program.
2. according to the method described in claim 1, it is characterized by: in the application program include at least two classes, it is right respectively Set-up function type described in Ying Yu, and realize that the program of the set-up function type is different at least two class.
3. the method according to claim 1, wherein the main program is inquired and the mesh in the preset database The matched target class of program identification is marked, and is loaded into caching, determines that buffer address includes:
The main program according in the call request of first program the second program name and the target program mark Know, matches target class in the preset database;
The main program is determined according to the set-up function type in the code of target class for realizing the set-up function class The program of type, and be loaded into caching, determine buffer address.
4. according to the method described in claim 3, it is characterized in that, the program of the set-up function type includes that sliding is shown directly A program is broadcast, first program includes: concern list procedure, direct broadcasting room list procedure or personal homepage program.
5. according to the method described in claim 4, it is characterized in that, first program generates the program to set-up function type Calling demand, comprising:
The concern list procedure receives the touching for concern user's head portrait of user's input in concern user list interface Hair operation;
The direct broadcasting room list procedure receives showing for direct broadcasting room for the input of the user described in direct broadcasting room list interface and contracts The slightly trigger action in region;
The personal homepage program receives being directed to for the input of the user described in individual subscriber home interface and user's head portrait is broadcast live Trigger action;Or
The personal homepage program receive the input of the user described in the individual subscriber home interface for the live streaming The trigger action of user's head portrait.
6. according to the method described in claim 5, it is characterized in that, in the journey for calling the set-up function type in the target class After sequence, further includes:
It is described when the sliding shows that direct broadcasting room program determines that receiving the operational order of user's input is default sliding instruction Sliding shows direct broadcasting room program according to sequentially showing direct broadcasting room live video stream on upper sliding direction;
It is described when the sliding displaying direct broadcasting room program determines that the operational order for receiving user's input is default downslide instruction Sliding shows direct broadcasting room program according to sequentially showing direct broadcasting room live video stream on gliding direction.
7. the method according to claim 1, wherein the main program includes object factory, the object factory It for inquiring target class in the database, and is loaded into the caching, determines the buffer address.
8. a kind of function running gear of application program characterized by comprising
Program identification request module passes through when for generating the calling demand to the program of set-up function type in the first program The main program of the application program sends program identification acquisition request to server, wherein first program and the setting The program of function type is the program run using the application program as environment;
Target program identifies receiving module, and the target program for receiving the server feedback by the main program identifies;
Target class loading module is matched for being inquired in the preset database by the main program with target program mark Target class, and be loaded into caching, determine buffer address, the target class is used to form the journey of the set-up function type Sequence;
Buffer address sending module, for the buffer address to be supplied to first program by the main program;
The routine call module of function type, for, according to the buffer address, being called from caching by first program The program of set-up function type in the target class.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The function operation method of existing application program as claimed in claim 1.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The function operation method of application program as claimed in claim 1 is realized when execution.
CN201910419153.2A 2019-05-20 2019-05-20 Function running method, device, electronic device and storage medium of application program Active CN110139118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910419153.2A CN110139118B (en) 2019-05-20 2019-05-20 Function running method, device, electronic device and storage medium of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910419153.2A CN110139118B (en) 2019-05-20 2019-05-20 Function running method, device, electronic device and storage medium of application program

Publications (2)

Publication Number Publication Date
CN110139118A true CN110139118A (en) 2019-08-16
CN110139118B CN110139118B (en) 2021-11-02

Family

ID=67571737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910419153.2A Active CN110139118B (en) 2019-05-20 2019-05-20 Function running method, device, electronic device and storage medium of application program

Country Status (1)

Country Link
CN (1) CN110139118B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532193A (en) * 2019-09-09 2019-12-03 珠海金山网络游戏科技有限公司 A kind of method for analyzing performance, calculates equipment and storage medium at device
CN112135162A (en) * 2020-09-25 2020-12-25 北京达佳互联信息技术有限公司 Service execution method, device and server
CN113852843A (en) * 2021-08-26 2021-12-28 北京乐我无限科技有限责任公司 Content synchronization method and device, electronic equipment and storage medium
CN115134613A (en) * 2021-03-29 2022-09-30 武汉斗鱼网络科技有限公司 Method and related device for acquiring information of live broadcast room
CN115203306A (en) * 2022-07-19 2022-10-18 平安付科技服务有限公司 Data exporting method and device, computer equipment and readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5909542A (en) * 1996-11-20 1999-06-01 Cfi Proservices, Inc. Distributed computing system for executing intercommunicating applications programs
CN103593191A (en) * 2013-11-19 2014-02-19 乐视致新电子科技(天津)有限公司 Method and device for calling application program data
US20180017937A1 (en) * 2016-07-18 2018-01-18 Paul de Tharso Lazzuri Guarini Real-time holographic content recording process
CN108536481A (en) * 2018-02-28 2018-09-14 努比亚技术有限公司 A kind of application program launching method, mobile terminal and computer storage media
CN108769725A (en) * 2018-06-07 2018-11-06 广州虎牙信息科技有限公司 Application program launching method, device, storage medium and computer equipment is broadcast live
CN108804158A (en) * 2018-06-05 2018-11-13 珠海市魅族科技有限公司 Application call method, the control method of terminal device, terminal device and computer readable storage medium
CN109558202A (en) * 2018-12-14 2019-04-02 平安城市建设科技(深圳)有限公司 Original list development approach, device, equipment and storage medium based on small routine
CN109683888A (en) * 2018-12-19 2019-04-26 睿驰达新能源汽车科技(北京)有限公司 A kind of multiplexing method and reusable business module of business module

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5909542A (en) * 1996-11-20 1999-06-01 Cfi Proservices, Inc. Distributed computing system for executing intercommunicating applications programs
CN103593191A (en) * 2013-11-19 2014-02-19 乐视致新电子科技(天津)有限公司 Method and device for calling application program data
US20180017937A1 (en) * 2016-07-18 2018-01-18 Paul de Tharso Lazzuri Guarini Real-time holographic content recording process
CN108536481A (en) * 2018-02-28 2018-09-14 努比亚技术有限公司 A kind of application program launching method, mobile terminal and computer storage media
CN108804158A (en) * 2018-06-05 2018-11-13 珠海市魅族科技有限公司 Application call method, the control method of terminal device, terminal device and computer readable storage medium
CN108769725A (en) * 2018-06-07 2018-11-06 广州虎牙信息科技有限公司 Application program launching method, device, storage medium and computer equipment is broadcast live
CN109558202A (en) * 2018-12-14 2019-04-02 平安城市建设科技(深圳)有限公司 Original list development approach, device, equipment and storage medium based on small routine
CN109683888A (en) * 2018-12-19 2019-04-26 睿驰达新能源汽车科技(北京)有限公司 A kind of multiplexing method and reusable business module of business module

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532193A (en) * 2019-09-09 2019-12-03 珠海金山网络游戏科技有限公司 A kind of method for analyzing performance, calculates equipment and storage medium at device
CN112135162A (en) * 2020-09-25 2020-12-25 北京达佳互联信息技术有限公司 Service execution method, device and server
CN112135162B (en) * 2020-09-25 2022-08-12 北京达佳互联信息技术有限公司 Service execution method, device and server
CN115134613A (en) * 2021-03-29 2022-09-30 武汉斗鱼网络科技有限公司 Method and related device for acquiring information of live broadcast room
CN113852843A (en) * 2021-08-26 2021-12-28 北京乐我无限科技有限责任公司 Content synchronization method and device, electronic equipment and storage medium
CN113852843B (en) * 2021-08-26 2024-03-22 北京乐我无限科技有限责任公司 Content synchronization method, device, electronic equipment and storage medium
CN115203306A (en) * 2022-07-19 2022-10-18 平安付科技服务有限公司 Data exporting method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN110139118B (en) 2021-11-02

Similar Documents

Publication Publication Date Title
US11240050B2 (en) Online document sharing method and apparatus, electronic device, and storage medium
CN110046021B (en) Page display method, device, system, equipment and storage medium
CN110139118A (en) Application program function operating method, device, electronic device, and storage medium
US11403117B2 (en) Methods for processing mini program, and related devices
US20220053068A1 (en) Methods, apparatuses and computer storage media for applet state synchronization
US9047469B2 (en) Modes for applications
CN111372115B (en) Application program access method and device and communication system
CN110069308B (en) Page launching method, apparatus, electronic device and storage medium
WO2020248745A1 (en) Method and device for displaying characters in user interface, electronic device, and storage medium
CN113302585B (en) Speed up application and sub-package installation
WO2020143555A1 (en) Method and device used for displaying information
CN111400625A (en) Page processing method and device, electronic equipment and computer readable storage medium
JP2015517165A (en) User interface web service
US10666707B2 (en) Nonconsecutive file downloading
CN113721807A (en) Information display method and device, electronic equipment and storage medium
CN108008925A (en) Application data sharing method, device, terminal and storage medium under span mode
WO2023231750A1 (en) Vehicle window display control method and apparatus, vehicle, and storage medium
CN109857503B (en) Page interaction effect self-adaption method and device and electronic equipment
CN114979686A (en) Live broadcast interaction method and device, electronic equipment and storage medium
CN111552537B (en) Theme switching method and device, computer equipment and storage medium
CN109614089B (en) Automatic generation method, device, equipment and storage medium of data access code
CN118118723A (en) Special effects processing method, device, electronic equipment and storage medium
JP2025521266A (en) Media content processing method, device and electronic device
CN114489697B (en) Application installation method and device
CN106375862A (en) A method, device and terminal for acquiring GIF images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant